github.com/cloudwan/edgelq-sdk@v1.15.4/alerting/resources/v1/common/specs.pb.object_ext.go (about) 1 // Code generated by protoc-gen-goten-object 2 // File: edgelq/alerting/proto/v1/specs.proto 3 // DO NOT EDIT!!! 4 5 package rcommon 6 7 import ( 8 "fmt" 9 "sort" 10 11 "google.golang.org/protobuf/proto" 12 googlefieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" 13 14 gotenobject "github.com/cloudwan/goten-sdk/runtime/object" 15 ) 16 17 // proto imports 18 import ( 19 logging_log "github.com/cloudwan/edgelq-sdk/logging/resources/v1/log" 20 monitoring_common "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/common" 21 monitoring_time_serie "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/time_serie" 22 meta_resource "github.com/cloudwan/goten-sdk/meta-service/resources/v1/resource" 23 durationpb "google.golang.org/protobuf/types/known/durationpb" 24 fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" 25 ) 26 27 // ensure the imports are used 28 var ( 29 _ = new(fmt.Stringer) 30 _ = new(sort.Interface) 31 32 _ = new(proto.Message) 33 _ = googlefieldmaskpb.FieldMask{} 34 35 _ = new(gotenobject.FieldPath) 36 ) 37 38 // make sure we're using proto imports 39 var ( 40 _ = &logging_log.Log{} 41 _ = &monitoring_common.LabelDescriptor{} 42 _ = &monitoring_time_serie.Point{} 43 _ = &durationpb.Duration{} 44 _ = &fieldmaskpb.FieldMask{} 45 _ = &meta_resource.Resource{} 46 ) 47 48 func (o *LogCndSpec) GotenObjectExt() {} 49 50 func (o *LogCndSpec) MakeFullFieldMask() *LogCndSpec_FieldMask { 51 return FullLogCndSpec_FieldMask() 52 } 53 54 func (o *LogCndSpec) MakeRawFullFieldMask() gotenobject.FieldMask { 55 return FullLogCndSpec_FieldMask() 56 } 57 58 func (o *LogCndSpec) MakeDiffFieldMask(other *LogCndSpec) *LogCndSpec_FieldMask { 59 if o == nil && other == nil { 60 return &LogCndSpec_FieldMask{} 61 } 62 if o == nil || other == nil { 63 return FullLogCndSpec_FieldMask() 64 } 65 66 res := &LogCndSpec_FieldMask{} 67 { 68 subMask := o.GetQuery().MakeDiffFieldMask(other.GetQuery()) 69 if subMask.IsFull() { 70 res.Paths = append(res.Paths, &LogCndSpec_FieldTerminalPath{selector: LogCndSpec_FieldPathSelectorQuery}) 71 } else { 72 for _, subpath := range subMask.Paths { 73 res.Paths = append(res.Paths, &LogCndSpec_FieldSubPath{selector: LogCndSpec_FieldPathSelectorQuery, subPath: subpath}) 74 } 75 } 76 } 77 78 if len(o.GetGroupByLabels()) == len(other.GetGroupByLabels()) { 79 for i, lValue := range o.GetGroupByLabels() { 80 rValue := other.GetGroupByLabels()[i] 81 if lValue != rValue { 82 res.Paths = append(res.Paths, &LogCndSpec_FieldTerminalPath{selector: LogCndSpec_FieldPathSelectorGroupByLabels}) 83 break 84 } 85 } 86 } else { 87 res.Paths = append(res.Paths, &LogCndSpec_FieldTerminalPath{selector: LogCndSpec_FieldPathSelectorGroupByLabels}) 88 } 89 return res 90 } 91 92 func (o *LogCndSpec) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 93 return o.MakeDiffFieldMask(other.(*LogCndSpec)) 94 } 95 96 func (o *LogCndSpec) Clone() *LogCndSpec { 97 if o == nil { 98 return nil 99 } 100 result := &LogCndSpec{} 101 result.Query = o.Query.Clone() 102 result.GroupByLabels = make([]string, len(o.GroupByLabels)) 103 for i, sourceValue := range o.GroupByLabels { 104 result.GroupByLabels[i] = sourceValue 105 } 106 return result 107 } 108 109 func (o *LogCndSpec) CloneRaw() gotenobject.GotenObjectExt { 110 return o.Clone() 111 } 112 113 func (o *LogCndSpec) Merge(source *LogCndSpec) { 114 if source.GetQuery() != nil { 115 if o.Query == nil { 116 o.Query = new(LogCndSpec_Query) 117 } 118 o.Query.Merge(source.GetQuery()) 119 } 120 for _, sourceValue := range source.GetGroupByLabels() { 121 exists := false 122 for _, currentValue := range o.GroupByLabels { 123 if currentValue == sourceValue { 124 exists = true 125 break 126 } 127 } 128 if !exists { 129 var newDstElement string 130 newDstElement = sourceValue 131 o.GroupByLabels = append(o.GroupByLabels, newDstElement) 132 } 133 } 134 135 } 136 137 func (o *LogCndSpec) MergeRaw(source gotenobject.GotenObjectExt) { 138 o.Merge(source.(*LogCndSpec)) 139 } 140 141 func (o *LogCndSpec_Query) GotenObjectExt() {} 142 143 func (o *LogCndSpec_Query) MakeFullFieldMask() *LogCndSpec_Query_FieldMask { 144 return FullLogCndSpec_Query_FieldMask() 145 } 146 147 func (o *LogCndSpec_Query) MakeRawFullFieldMask() gotenobject.FieldMask { 148 return FullLogCndSpec_Query_FieldMask() 149 } 150 151 func (o *LogCndSpec_Query) MakeDiffFieldMask(other *LogCndSpec_Query) *LogCndSpec_Query_FieldMask { 152 if o == nil && other == nil { 153 return &LogCndSpec_Query_FieldMask{} 154 } 155 if o == nil || other == nil { 156 return FullLogCndSpec_Query_FieldMask() 157 } 158 159 res := &LogCndSpec_Query_FieldMask{} 160 if o.GetFilter().String() != other.GetFilter().String() { 161 res.Paths = append(res.Paths, &LogCndSpecQuery_FieldTerminalPath{selector: LogCndSpecQuery_FieldPathSelectorFilter}) 162 } 163 if !proto.Equal(o.GetTrigger(), other.GetTrigger()) { 164 res.Paths = append(res.Paths, &LogCndSpecQuery_FieldTerminalPath{selector: LogCndSpecQuery_FieldPathSelectorTrigger}) 165 } 166 if !proto.Equal(o.GetMinDuration(), other.GetMinDuration()) { 167 res.Paths = append(res.Paths, &LogCndSpecQuery_FieldTerminalPath{selector: LogCndSpecQuery_FieldPathSelectorMinDuration}) 168 } 169 return res 170 } 171 172 func (o *LogCndSpec_Query) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 173 return o.MakeDiffFieldMask(other.(*LogCndSpec_Query)) 174 } 175 176 func (o *LogCndSpec_Query) Clone() *LogCndSpec_Query { 177 if o == nil { 178 return nil 179 } 180 result := &LogCndSpec_Query{} 181 if o.Filter == nil { 182 result.Filter = nil 183 } else if data, err := o.Filter.ProtoString(); err != nil { 184 panic(err) 185 } else { 186 result.Filter = &logging_log.Filter{} 187 if err := result.Filter.ParseProtoString(data); err != nil { 188 panic(err) 189 } 190 } 191 result.Trigger = proto.Clone(o.Trigger).(*LogCndSpec_Query_TriggerCnd) 192 result.MinDuration = proto.Clone(o.MinDuration).(*durationpb.Duration) 193 return result 194 } 195 196 func (o *LogCndSpec_Query) CloneRaw() gotenobject.GotenObjectExt { 197 return o.Clone() 198 } 199 200 func (o *LogCndSpec_Query) Merge(source *LogCndSpec_Query) { 201 if source.GetFilter() != nil { 202 if data, err := source.GetFilter().ProtoString(); err != nil { 203 panic(err) 204 } else { 205 o.Filter = &logging_log.Filter{} 206 if err := o.Filter.ParseProtoString(data); err != nil { 207 panic(err) 208 } 209 } 210 } else { 211 o.Filter = nil 212 } 213 if source.GetTrigger() != nil { 214 if o.Trigger == nil { 215 o.Trigger = new(LogCndSpec_Query_TriggerCnd) 216 } 217 proto.Merge(o.Trigger, source.GetTrigger()) 218 } 219 if source.GetMinDuration() != nil { 220 if o.MinDuration == nil { 221 o.MinDuration = new(durationpb.Duration) 222 } 223 proto.Merge(o.MinDuration, source.GetMinDuration()) 224 } 225 } 226 227 func (o *LogCndSpec_Query) MergeRaw(source gotenobject.GotenObjectExt) { 228 o.Merge(source.(*LogCndSpec_Query)) 229 } 230 231 func (o *LogCndSpec_Query_LabelTrigger) GotenObjectExt() {} 232 233 func (o *LogCndSpec_Query_LabelTrigger) MakeFullFieldMask() *LogCndSpec_Query_LabelTrigger_FieldMask { 234 return FullLogCndSpec_Query_LabelTrigger_FieldMask() 235 } 236 237 func (o *LogCndSpec_Query_LabelTrigger) MakeRawFullFieldMask() gotenobject.FieldMask { 238 return FullLogCndSpec_Query_LabelTrigger_FieldMask() 239 } 240 241 func (o *LogCndSpec_Query_LabelTrigger) MakeDiffFieldMask(other *LogCndSpec_Query_LabelTrigger) *LogCndSpec_Query_LabelTrigger_FieldMask { 242 if o == nil && other == nil { 243 return &LogCndSpec_Query_LabelTrigger_FieldMask{} 244 } 245 if o == nil || other == nil { 246 return FullLogCndSpec_Query_LabelTrigger_FieldMask() 247 } 248 249 res := &LogCndSpec_Query_LabelTrigger_FieldMask{} 250 if o.GetKey() != other.GetKey() { 251 res.Paths = append(res.Paths, &LogCndSpecQueryLabelTrigger_FieldTerminalPath{selector: LogCndSpecQueryLabelTrigger_FieldPathSelectorKey}) 252 } 253 254 if len(o.GetValues()) == len(other.GetValues()) { 255 for i, lValue := range o.GetValues() { 256 rValue := other.GetValues()[i] 257 if lValue != rValue { 258 res.Paths = append(res.Paths, &LogCndSpecQueryLabelTrigger_FieldTerminalPath{selector: LogCndSpecQueryLabelTrigger_FieldPathSelectorValues}) 259 break 260 } 261 } 262 } else { 263 res.Paths = append(res.Paths, &LogCndSpecQueryLabelTrigger_FieldTerminalPath{selector: LogCndSpecQueryLabelTrigger_FieldPathSelectorValues}) 264 } 265 return res 266 } 267 268 func (o *LogCndSpec_Query_LabelTrigger) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 269 return o.MakeDiffFieldMask(other.(*LogCndSpec_Query_LabelTrigger)) 270 } 271 272 func (o *LogCndSpec_Query_LabelTrigger) Clone() *LogCndSpec_Query_LabelTrigger { 273 if o == nil { 274 return nil 275 } 276 result := &LogCndSpec_Query_LabelTrigger{} 277 result.Key = o.Key 278 result.Values = make([]string, len(o.Values)) 279 for i, sourceValue := range o.Values { 280 result.Values[i] = sourceValue 281 } 282 return result 283 } 284 285 func (o *LogCndSpec_Query_LabelTrigger) CloneRaw() gotenobject.GotenObjectExt { 286 return o.Clone() 287 } 288 289 func (o *LogCndSpec_Query_LabelTrigger) Merge(source *LogCndSpec_Query_LabelTrigger) { 290 o.Key = source.GetKey() 291 for _, sourceValue := range source.GetValues() { 292 exists := false 293 for _, currentValue := range o.Values { 294 if currentValue == sourceValue { 295 exists = true 296 break 297 } 298 } 299 if !exists { 300 var newDstElement string 301 newDstElement = sourceValue 302 o.Values = append(o.Values, newDstElement) 303 } 304 } 305 306 } 307 308 func (o *LogCndSpec_Query_LabelTrigger) MergeRaw(source gotenobject.GotenObjectExt) { 309 o.Merge(source.(*LogCndSpec_Query_LabelTrigger)) 310 } 311 312 func (o *LogCndSpec_Query_StringPayloadTrigger) GotenObjectExt() {} 313 314 func (o *LogCndSpec_Query_StringPayloadTrigger) MakeFullFieldMask() *LogCndSpec_Query_StringPayloadTrigger_FieldMask { 315 return FullLogCndSpec_Query_StringPayloadTrigger_FieldMask() 316 } 317 318 func (o *LogCndSpec_Query_StringPayloadTrigger) MakeRawFullFieldMask() gotenobject.FieldMask { 319 return FullLogCndSpec_Query_StringPayloadTrigger_FieldMask() 320 } 321 322 func (o *LogCndSpec_Query_StringPayloadTrigger) MakeDiffFieldMask(other *LogCndSpec_Query_StringPayloadTrigger) *LogCndSpec_Query_StringPayloadTrigger_FieldMask { 323 if o == nil && other == nil { 324 return &LogCndSpec_Query_StringPayloadTrigger_FieldMask{} 325 } 326 if o == nil || other == nil { 327 return FullLogCndSpec_Query_StringPayloadTrigger_FieldMask() 328 } 329 330 res := &LogCndSpec_Query_StringPayloadTrigger_FieldMask{} 331 if o.GetObjectSelector() != other.GetObjectSelector() { 332 res.Paths = append(res.Paths, &LogCndSpecQueryStringPayloadTrigger_FieldTerminalPath{selector: LogCndSpecQueryStringPayloadTrigger_FieldPathSelectorObjectSelector}) 333 } 334 if o.GetRegex() != other.GetRegex() { 335 res.Paths = append(res.Paths, &LogCndSpecQueryStringPayloadTrigger_FieldTerminalPath{selector: LogCndSpecQueryStringPayloadTrigger_FieldPathSelectorRegex}) 336 } 337 return res 338 } 339 340 func (o *LogCndSpec_Query_StringPayloadTrigger) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 341 return o.MakeDiffFieldMask(other.(*LogCndSpec_Query_StringPayloadTrigger)) 342 } 343 344 func (o *LogCndSpec_Query_StringPayloadTrigger) Clone() *LogCndSpec_Query_StringPayloadTrigger { 345 if o == nil { 346 return nil 347 } 348 result := &LogCndSpec_Query_StringPayloadTrigger{} 349 result.ObjectSelector = o.ObjectSelector 350 result.Regex = o.Regex 351 return result 352 } 353 354 func (o *LogCndSpec_Query_StringPayloadTrigger) CloneRaw() gotenobject.GotenObjectExt { 355 return o.Clone() 356 } 357 358 func (o *LogCndSpec_Query_StringPayloadTrigger) Merge(source *LogCndSpec_Query_StringPayloadTrigger) { 359 o.ObjectSelector = source.GetObjectSelector() 360 o.Regex = source.GetRegex() 361 } 362 363 func (o *LogCndSpec_Query_StringPayloadTrigger) MergeRaw(source gotenobject.GotenObjectExt) { 364 o.Merge(source.(*LogCndSpec_Query_StringPayloadTrigger)) 365 } 366 367 func (o *LogCndSpec_Query_CompositeTrigger) GotenObjectExt() {} 368 369 func (o *LogCndSpec_Query_CompositeTrigger) MakeFullFieldMask() *LogCndSpec_Query_CompositeTrigger_FieldMask { 370 return FullLogCndSpec_Query_CompositeTrigger_FieldMask() 371 } 372 373 func (o *LogCndSpec_Query_CompositeTrigger) MakeRawFullFieldMask() gotenobject.FieldMask { 374 return FullLogCndSpec_Query_CompositeTrigger_FieldMask() 375 } 376 377 func (o *LogCndSpec_Query_CompositeTrigger) MakeDiffFieldMask(other *LogCndSpec_Query_CompositeTrigger) *LogCndSpec_Query_CompositeTrigger_FieldMask { 378 if o == nil && other == nil { 379 return &LogCndSpec_Query_CompositeTrigger_FieldMask{} 380 } 381 if o == nil || other == nil { 382 return FullLogCndSpec_Query_CompositeTrigger_FieldMask() 383 } 384 385 res := &LogCndSpec_Query_CompositeTrigger_FieldMask{} 386 387 if len(o.GetTriggers()) == len(other.GetTriggers()) { 388 for i, lValue := range o.GetTriggers() { 389 rValue := other.GetTriggers()[i] 390 if !proto.Equal(lValue, rValue) { 391 res.Paths = append(res.Paths, &LogCndSpecQueryCompositeTrigger_FieldTerminalPath{selector: LogCndSpecQueryCompositeTrigger_FieldPathSelectorTriggers}) 392 break 393 } 394 } 395 } else { 396 res.Paths = append(res.Paths, &LogCndSpecQueryCompositeTrigger_FieldTerminalPath{selector: LogCndSpecQueryCompositeTrigger_FieldPathSelectorTriggers}) 397 } 398 if o.GetOperator() != other.GetOperator() { 399 res.Paths = append(res.Paths, &LogCndSpecQueryCompositeTrigger_FieldTerminalPath{selector: LogCndSpecQueryCompositeTrigger_FieldPathSelectorOperator}) 400 } 401 return res 402 } 403 404 func (o *LogCndSpec_Query_CompositeTrigger) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 405 return o.MakeDiffFieldMask(other.(*LogCndSpec_Query_CompositeTrigger)) 406 } 407 408 func (o *LogCndSpec_Query_CompositeTrigger) Clone() *LogCndSpec_Query_CompositeTrigger { 409 if o == nil { 410 return nil 411 } 412 result := &LogCndSpec_Query_CompositeTrigger{} 413 result.Triggers = make([]*LogCndSpec_Query_TriggerCnd, len(o.Triggers)) 414 for i, sourceValue := range o.Triggers { 415 result.Triggers[i] = proto.Clone(sourceValue).(*LogCndSpec_Query_TriggerCnd) 416 } 417 result.Operator = o.Operator 418 return result 419 } 420 421 func (o *LogCndSpec_Query_CompositeTrigger) CloneRaw() gotenobject.GotenObjectExt { 422 return o.Clone() 423 } 424 425 func (o *LogCndSpec_Query_CompositeTrigger) Merge(source *LogCndSpec_Query_CompositeTrigger) { 426 for _, sourceValue := range source.GetTriggers() { 427 exists := false 428 for _, currentValue := range o.Triggers { 429 if proto.Equal(sourceValue, currentValue) { 430 exists = true 431 break 432 } 433 } 434 if !exists { 435 var newDstElement *LogCndSpec_Query_TriggerCnd 436 if sourceValue != nil { 437 newDstElement = new(LogCndSpec_Query_TriggerCnd) 438 proto.Merge(newDstElement, sourceValue) 439 } 440 o.Triggers = append(o.Triggers, newDstElement) 441 } 442 } 443 444 o.Operator = source.GetOperator() 445 } 446 447 func (o *LogCndSpec_Query_CompositeTrigger) MergeRaw(source gotenobject.GotenObjectExt) { 448 o.Merge(source.(*LogCndSpec_Query_CompositeTrigger)) 449 } 450 451 func (o *TsCndSpec) GotenObjectExt() {} 452 453 func (o *TsCndSpec) MakeFullFieldMask() *TsCndSpec_FieldMask { 454 return FullTsCndSpec_FieldMask() 455 } 456 457 func (o *TsCndSpec) MakeRawFullFieldMask() gotenobject.FieldMask { 458 return FullTsCndSpec_FieldMask() 459 } 460 461 func (o *TsCndSpec) MakeDiffFieldMask(other *TsCndSpec) *TsCndSpec_FieldMask { 462 if o == nil && other == nil { 463 return &TsCndSpec_FieldMask{} 464 } 465 if o == nil || other == nil { 466 return FullTsCndSpec_FieldMask() 467 } 468 469 res := &TsCndSpec_FieldMask{} 470 471 if len(o.GetQueries()) == len(other.GetQueries()) { 472 for i, lValue := range o.GetQueries() { 473 rValue := other.GetQueries()[i] 474 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 475 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorQueries}) 476 break 477 } 478 } 479 } else { 480 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorQueries}) 481 } 482 483 if len(o.GetQueryGroupBy()) == len(other.GetQueryGroupBy()) { 484 for i, lValue := range o.GetQueryGroupBy() { 485 rValue := other.GetQueryGroupBy()[i] 486 if lValue != rValue { 487 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorQueryGroupBy}) 488 break 489 } 490 } 491 } else { 492 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorQueryGroupBy}) 493 } 494 { 495 subMask := o.GetThresholdAlerting().MakeDiffFieldMask(other.GetThresholdAlerting()) 496 if subMask.IsFull() { 497 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorThresholdAlerting}) 498 } else { 499 for _, subpath := range subMask.Paths { 500 res.Paths = append(res.Paths, &TsCndSpec_FieldSubPath{selector: TsCndSpec_FieldPathSelectorThresholdAlerting, subPath: subpath}) 501 } 502 } 503 } 504 505 if len(o.GetAnomalyAlerting()) == len(other.GetAnomalyAlerting()) { 506 for i, lValue := range o.GetAnomalyAlerting() { 507 rValue := other.GetAnomalyAlerting()[i] 508 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 509 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorAnomalyAlerting}) 510 break 511 } 512 } 513 } else { 514 res.Paths = append(res.Paths, &TsCndSpec_FieldTerminalPath{selector: TsCndSpec_FieldPathSelectorAnomalyAlerting}) 515 } 516 return res 517 } 518 519 func (o *TsCndSpec) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 520 return o.MakeDiffFieldMask(other.(*TsCndSpec)) 521 } 522 523 func (o *TsCndSpec) Clone() *TsCndSpec { 524 if o == nil { 525 return nil 526 } 527 result := &TsCndSpec{} 528 result.Queries = make([]*TsCndSpec_Query, len(o.Queries)) 529 for i, sourceValue := range o.Queries { 530 result.Queries[i] = sourceValue.Clone() 531 } 532 result.QueryGroupBy = make([]string, len(o.QueryGroupBy)) 533 for i, sourceValue := range o.QueryGroupBy { 534 result.QueryGroupBy[i] = sourceValue 535 } 536 result.ThresholdAlerting = o.ThresholdAlerting.Clone() 537 result.AnomalyAlerting = make([]*TsCndSpec_AnomalyAlertingCfg, len(o.AnomalyAlerting)) 538 for i, sourceValue := range o.AnomalyAlerting { 539 result.AnomalyAlerting[i] = sourceValue.Clone() 540 } 541 return result 542 } 543 544 func (o *TsCndSpec) CloneRaw() gotenobject.GotenObjectExt { 545 return o.Clone() 546 } 547 548 func (o *TsCndSpec) Merge(source *TsCndSpec) { 549 for _, sourceValue := range source.GetQueries() { 550 exists := false 551 for _, currentValue := range o.Queries { 552 if proto.Equal(sourceValue, currentValue) { 553 exists = true 554 break 555 } 556 } 557 if !exists { 558 var newDstElement *TsCndSpec_Query 559 if sourceValue != nil { 560 newDstElement = new(TsCndSpec_Query) 561 newDstElement.Merge(sourceValue) 562 } 563 o.Queries = append(o.Queries, newDstElement) 564 } 565 } 566 567 for _, sourceValue := range source.GetQueryGroupBy() { 568 exists := false 569 for _, currentValue := range o.QueryGroupBy { 570 if currentValue == sourceValue { 571 exists = true 572 break 573 } 574 } 575 if !exists { 576 var newDstElement string 577 newDstElement = sourceValue 578 o.QueryGroupBy = append(o.QueryGroupBy, newDstElement) 579 } 580 } 581 582 if source.GetThresholdAlerting() != nil { 583 if o.ThresholdAlerting == nil { 584 o.ThresholdAlerting = new(TsCndSpec_ThresholdAlertingCfg) 585 } 586 o.ThresholdAlerting.Merge(source.GetThresholdAlerting()) 587 } 588 for _, sourceValue := range source.GetAnomalyAlerting() { 589 exists := false 590 for _, currentValue := range o.AnomalyAlerting { 591 if proto.Equal(sourceValue, currentValue) { 592 exists = true 593 break 594 } 595 } 596 if !exists { 597 var newDstElement *TsCndSpec_AnomalyAlertingCfg 598 if sourceValue != nil { 599 newDstElement = new(TsCndSpec_AnomalyAlertingCfg) 600 newDstElement.Merge(sourceValue) 601 } 602 o.AnomalyAlerting = append(o.AnomalyAlerting, newDstElement) 603 } 604 } 605 606 } 607 608 func (o *TsCndSpec) MergeRaw(source gotenobject.GotenObjectExt) { 609 o.Merge(source.(*TsCndSpec)) 610 } 611 612 func (o *TsCndSpec_Query) GotenObjectExt() {} 613 614 func (o *TsCndSpec_Query) MakeFullFieldMask() *TsCndSpec_Query_FieldMask { 615 return FullTsCndSpec_Query_FieldMask() 616 } 617 618 func (o *TsCndSpec_Query) MakeRawFullFieldMask() gotenobject.FieldMask { 619 return FullTsCndSpec_Query_FieldMask() 620 } 621 622 func (o *TsCndSpec_Query) MakeDiffFieldMask(other *TsCndSpec_Query) *TsCndSpec_Query_FieldMask { 623 if o == nil && other == nil { 624 return &TsCndSpec_Query_FieldMask{} 625 } 626 if o == nil || other == nil { 627 return FullTsCndSpec_Query_FieldMask() 628 } 629 630 res := &TsCndSpec_Query_FieldMask{} 631 if o.GetName() != other.GetName() { 632 res.Paths = append(res.Paths, &TsCndSpecQuery_FieldTerminalPath{selector: TsCndSpecQuery_FieldPathSelectorName}) 633 } 634 if o.GetFilter().String() != other.GetFilter().String() { 635 res.Paths = append(res.Paths, &TsCndSpecQuery_FieldTerminalPath{selector: TsCndSpecQuery_FieldPathSelectorFilter}) 636 } 637 if o.GetAligner() != other.GetAligner() { 638 res.Paths = append(res.Paths, &TsCndSpecQuery_FieldTerminalPath{selector: TsCndSpecQuery_FieldPathSelectorAligner}) 639 } 640 if o.GetReducer() != other.GetReducer() { 641 res.Paths = append(res.Paths, &TsCndSpecQuery_FieldTerminalPath{selector: TsCndSpecQuery_FieldPathSelectorReducer}) 642 } 643 if o.GetMaxValue() != other.GetMaxValue() { 644 res.Paths = append(res.Paths, &TsCndSpecQuery_FieldTerminalPath{selector: TsCndSpecQuery_FieldPathSelectorMaxValue}) 645 } 646 return res 647 } 648 649 func (o *TsCndSpec_Query) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 650 return o.MakeDiffFieldMask(other.(*TsCndSpec_Query)) 651 } 652 653 func (o *TsCndSpec_Query) Clone() *TsCndSpec_Query { 654 if o == nil { 655 return nil 656 } 657 result := &TsCndSpec_Query{} 658 result.Name = o.Name 659 if o.Filter == nil { 660 result.Filter = nil 661 } else if data, err := o.Filter.ProtoString(); err != nil { 662 panic(err) 663 } else { 664 result.Filter = &monitoring_time_serie.Filter{} 665 if err := result.Filter.ParseProtoString(data); err != nil { 666 panic(err) 667 } 668 } 669 result.Aligner = o.Aligner 670 result.Reducer = o.Reducer 671 result.MaxValue = o.MaxValue 672 return result 673 } 674 675 func (o *TsCndSpec_Query) CloneRaw() gotenobject.GotenObjectExt { 676 return o.Clone() 677 } 678 679 func (o *TsCndSpec_Query) Merge(source *TsCndSpec_Query) { 680 o.Name = source.GetName() 681 if source.GetFilter() != nil { 682 if data, err := source.GetFilter().ProtoString(); err != nil { 683 panic(err) 684 } else { 685 o.Filter = &monitoring_time_serie.Filter{} 686 if err := o.Filter.ParseProtoString(data); err != nil { 687 panic(err) 688 } 689 } 690 } else { 691 o.Filter = nil 692 } 693 o.Aligner = source.GetAligner() 694 o.Reducer = source.GetReducer() 695 o.MaxValue = source.GetMaxValue() 696 } 697 698 func (o *TsCndSpec_Query) MergeRaw(source gotenobject.GotenObjectExt) { 699 o.Merge(source.(*TsCndSpec_Query)) 700 } 701 702 func (o *TsCndSpec_ThresholdAlertingCfg) GotenObjectExt() {} 703 704 func (o *TsCndSpec_ThresholdAlertingCfg) MakeFullFieldMask() *TsCndSpec_ThresholdAlertingCfg_FieldMask { 705 return FullTsCndSpec_ThresholdAlertingCfg_FieldMask() 706 } 707 708 func (o *TsCndSpec_ThresholdAlertingCfg) MakeRawFullFieldMask() gotenobject.FieldMask { 709 return FullTsCndSpec_ThresholdAlertingCfg_FieldMask() 710 } 711 712 func (o *TsCndSpec_ThresholdAlertingCfg) MakeDiffFieldMask(other *TsCndSpec_ThresholdAlertingCfg) *TsCndSpec_ThresholdAlertingCfg_FieldMask { 713 if o == nil && other == nil { 714 return &TsCndSpec_ThresholdAlertingCfg_FieldMask{} 715 } 716 if o == nil || other == nil { 717 return FullTsCndSpec_ThresholdAlertingCfg_FieldMask() 718 } 719 720 res := &TsCndSpec_ThresholdAlertingCfg_FieldMask{} 721 if o.GetOperator() != other.GetOperator() { 722 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorOperator}) 723 } 724 if !proto.Equal(o.GetAlignmentPeriod(), other.GetAlignmentPeriod()) { 725 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorAlignmentPeriod}) 726 } 727 if !proto.Equal(o.GetRaiseAfter(), other.GetRaiseAfter()) { 728 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorRaiseAfter}) 729 } 730 if !proto.Equal(o.GetSilenceAfter(), other.GetSilenceAfter()) { 731 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorSilenceAfter}) 732 } 733 734 if len(o.GetPerQueryThresholds()) == len(other.GetPerQueryThresholds()) { 735 for i, lValue := range o.GetPerQueryThresholds() { 736 rValue := other.GetPerQueryThresholds()[i] 737 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 738 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorPerQueryThresholds}) 739 break 740 } 741 } 742 } else { 743 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorPerQueryThresholds}) 744 } 745 if !proto.Equal(o.GetAdaptiveThresholdsDetectionPeriod(), other.GetAdaptiveThresholdsDetectionPeriod()) { 746 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfg_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfg_FieldPathSelectorAdaptiveThresholdsDetectionPeriod}) 747 } 748 return res 749 } 750 751 func (o *TsCndSpec_ThresholdAlertingCfg) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 752 return o.MakeDiffFieldMask(other.(*TsCndSpec_ThresholdAlertingCfg)) 753 } 754 755 func (o *TsCndSpec_ThresholdAlertingCfg) Clone() *TsCndSpec_ThresholdAlertingCfg { 756 if o == nil { 757 return nil 758 } 759 result := &TsCndSpec_ThresholdAlertingCfg{} 760 result.Operator = o.Operator 761 result.AlignmentPeriod = proto.Clone(o.AlignmentPeriod).(*durationpb.Duration) 762 result.RaiseAfter = proto.Clone(o.RaiseAfter).(*durationpb.Duration) 763 result.SilenceAfter = proto.Clone(o.SilenceAfter).(*durationpb.Duration) 764 result.PerQueryThresholds = make([]*TsCndSpec_ThresholdAlertingCfg_AlertingThresholds, len(o.PerQueryThresholds)) 765 for i, sourceValue := range o.PerQueryThresholds { 766 result.PerQueryThresholds[i] = sourceValue.Clone() 767 } 768 result.AdaptiveThresholdsDetectionPeriod = proto.Clone(o.AdaptiveThresholdsDetectionPeriod).(*durationpb.Duration) 769 return result 770 } 771 772 func (o *TsCndSpec_ThresholdAlertingCfg) CloneRaw() gotenobject.GotenObjectExt { 773 return o.Clone() 774 } 775 776 func (o *TsCndSpec_ThresholdAlertingCfg) Merge(source *TsCndSpec_ThresholdAlertingCfg) { 777 o.Operator = source.GetOperator() 778 if source.GetAlignmentPeriod() != nil { 779 if o.AlignmentPeriod == nil { 780 o.AlignmentPeriod = new(durationpb.Duration) 781 } 782 proto.Merge(o.AlignmentPeriod, source.GetAlignmentPeriod()) 783 } 784 if source.GetRaiseAfter() != nil { 785 if o.RaiseAfter == nil { 786 o.RaiseAfter = new(durationpb.Duration) 787 } 788 proto.Merge(o.RaiseAfter, source.GetRaiseAfter()) 789 } 790 if source.GetSilenceAfter() != nil { 791 if o.SilenceAfter == nil { 792 o.SilenceAfter = new(durationpb.Duration) 793 } 794 proto.Merge(o.SilenceAfter, source.GetSilenceAfter()) 795 } 796 for _, sourceValue := range source.GetPerQueryThresholds() { 797 exists := false 798 for _, currentValue := range o.PerQueryThresholds { 799 if proto.Equal(sourceValue, currentValue) { 800 exists = true 801 break 802 } 803 } 804 if !exists { 805 var newDstElement *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds 806 if sourceValue != nil { 807 newDstElement = new(TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) 808 newDstElement.Merge(sourceValue) 809 } 810 o.PerQueryThresholds = append(o.PerQueryThresholds, newDstElement) 811 } 812 } 813 814 if source.GetAdaptiveThresholdsDetectionPeriod() != nil { 815 if o.AdaptiveThresholdsDetectionPeriod == nil { 816 o.AdaptiveThresholdsDetectionPeriod = new(durationpb.Duration) 817 } 818 proto.Merge(o.AdaptiveThresholdsDetectionPeriod, source.GetAdaptiveThresholdsDetectionPeriod()) 819 } 820 } 821 822 func (o *TsCndSpec_ThresholdAlertingCfg) MergeRaw(source gotenobject.GotenObjectExt) { 823 o.Merge(source.(*TsCndSpec_ThresholdAlertingCfg)) 824 } 825 826 func (o *TsCndSpec_AnomalyAlertingCfg) GotenObjectExt() {} 827 828 func (o *TsCndSpec_AnomalyAlertingCfg) MakeFullFieldMask() *TsCndSpec_AnomalyAlertingCfg_FieldMask { 829 return FullTsCndSpec_AnomalyAlertingCfg_FieldMask() 830 } 831 832 func (o *TsCndSpec_AnomalyAlertingCfg) MakeRawFullFieldMask() gotenobject.FieldMask { 833 return FullTsCndSpec_AnomalyAlertingCfg_FieldMask() 834 } 835 836 func (o *TsCndSpec_AnomalyAlertingCfg) MakeDiffFieldMask(other *TsCndSpec_AnomalyAlertingCfg) *TsCndSpec_AnomalyAlertingCfg_FieldMask { 837 if o == nil && other == nil { 838 return &TsCndSpec_AnomalyAlertingCfg_FieldMask{} 839 } 840 if o == nil || other == nil { 841 return FullTsCndSpec_AnomalyAlertingCfg_FieldMask() 842 } 843 844 res := &TsCndSpec_AnomalyAlertingCfg_FieldMask{} 845 if !proto.Equal(o.GetAnalysisWindow(), other.GetAnalysisWindow()) { 846 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorAnalysisWindow}) 847 } 848 if !proto.Equal(o.GetStepInterval(), other.GetStepInterval()) { 849 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorStepInterval}) 850 } 851 if !proto.Equal(o.GetTrainStepInterval(), other.GetTrainStepInterval()) { 852 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorTrainStepInterval}) 853 } 854 if !proto.Equal(o.GetAlignmentPeriod(), other.GetAlignmentPeriod()) { 855 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorAlignmentPeriod}) 856 } 857 { 858 _, leftSelected := o.Model.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder) 859 _, rightSelected := other.Model.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder) 860 if leftSelected == rightSelected { 861 subMask := o.GetLstmAutoencoder().MakeDiffFieldMask(other.GetLstmAutoencoder()) 862 if subMask.IsFull() { 863 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorLstmAutoencoder}) 864 } else { 865 for _, subpath := range subMask.Paths { 866 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldSubPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorLstmAutoencoder, subPath: subpath}) 867 } 868 } 869 } else { 870 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorLstmAutoencoder}) 871 } 872 } 873 if !proto.Equal(o.GetRaiseAfter(), other.GetRaiseAfter()) { 874 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorRaiseAfter}) 875 } 876 if !proto.Equal(o.GetSilenceAfter(), other.GetSilenceAfter()) { 877 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfg_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfg_FieldPathSelectorSilenceAfter}) 878 } 879 return res 880 } 881 882 func (o *TsCndSpec_AnomalyAlertingCfg) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 883 return o.MakeDiffFieldMask(other.(*TsCndSpec_AnomalyAlertingCfg)) 884 } 885 886 func (o *TsCndSpec_AnomalyAlertingCfg) Clone() *TsCndSpec_AnomalyAlertingCfg { 887 if o == nil { 888 return nil 889 } 890 result := &TsCndSpec_AnomalyAlertingCfg{} 891 result.AnalysisWindow = proto.Clone(o.AnalysisWindow).(*durationpb.Duration) 892 result.StepInterval = proto.Clone(o.StepInterval).(*durationpb.Duration) 893 result.TrainStepInterval = proto.Clone(o.TrainStepInterval).(*durationpb.Duration) 894 result.AlignmentPeriod = proto.Clone(o.AlignmentPeriod).(*durationpb.Duration) 895 if o, ok := o.Model.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder); ok { 896 result.Model = (*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder)(nil) 897 if o != nil { 898 result.Model = &TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder{} 899 result := result.Model.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder) 900 result.LstmAutoencoder = o.LstmAutoencoder.Clone() 901 } 902 } 903 result.RaiseAfter = proto.Clone(o.RaiseAfter).(*durationpb.Duration) 904 result.SilenceAfter = proto.Clone(o.SilenceAfter).(*durationpb.Duration) 905 return result 906 } 907 908 func (o *TsCndSpec_AnomalyAlertingCfg) CloneRaw() gotenobject.GotenObjectExt { 909 return o.Clone() 910 } 911 912 func (o *TsCndSpec_AnomalyAlertingCfg) Merge(source *TsCndSpec_AnomalyAlertingCfg) { 913 if source.GetAnalysisWindow() != nil { 914 if o.AnalysisWindow == nil { 915 o.AnalysisWindow = new(durationpb.Duration) 916 } 917 proto.Merge(o.AnalysisWindow, source.GetAnalysisWindow()) 918 } 919 if source.GetStepInterval() != nil { 920 if o.StepInterval == nil { 921 o.StepInterval = new(durationpb.Duration) 922 } 923 proto.Merge(o.StepInterval, source.GetStepInterval()) 924 } 925 if source.GetTrainStepInterval() != nil { 926 if o.TrainStepInterval == nil { 927 o.TrainStepInterval = new(durationpb.Duration) 928 } 929 proto.Merge(o.TrainStepInterval, source.GetTrainStepInterval()) 930 } 931 if source.GetAlignmentPeriod() != nil { 932 if o.AlignmentPeriod == nil { 933 o.AlignmentPeriod = new(durationpb.Duration) 934 } 935 proto.Merge(o.AlignmentPeriod, source.GetAlignmentPeriod()) 936 } 937 if source, ok := source.GetModel().(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder); ok { 938 if dstOneOf, ok := o.Model.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder); !ok || dstOneOf == nil { 939 o.Model = &TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder{} 940 } 941 if source != nil { 942 o := o.Model.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoencoder) 943 if source.LstmAutoencoder != nil { 944 if o.LstmAutoencoder == nil { 945 o.LstmAutoencoder = new(TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) 946 } 947 o.LstmAutoencoder.Merge(source.LstmAutoencoder) 948 } 949 } 950 } 951 if source.GetRaiseAfter() != nil { 952 if o.RaiseAfter == nil { 953 o.RaiseAfter = new(durationpb.Duration) 954 } 955 proto.Merge(o.RaiseAfter, source.GetRaiseAfter()) 956 } 957 if source.GetSilenceAfter() != nil { 958 if o.SilenceAfter == nil { 959 o.SilenceAfter = new(durationpb.Duration) 960 } 961 proto.Merge(o.SilenceAfter, source.GetSilenceAfter()) 962 } 963 } 964 965 func (o *TsCndSpec_AnomalyAlertingCfg) MergeRaw(source gotenobject.GotenObjectExt) { 966 o.Merge(source.(*TsCndSpec_AnomalyAlertingCfg)) 967 } 968 969 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) GotenObjectExt() {} 970 971 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) MakeFullFieldMask() *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask { 972 return FullTsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask() 973 } 974 975 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) MakeRawFullFieldMask() gotenobject.FieldMask { 976 return FullTsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask() 977 } 978 979 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) MakeDiffFieldMask(other *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask { 980 if o == nil && other == nil { 981 return &TsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask{} 982 } 983 if o == nil || other == nil { 984 return FullTsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask() 985 } 986 987 res := &TsCndSpec_ThresholdAlertingCfg_AlertingThresholds_FieldMask{} 988 if o.GetAutoAdaptUpper() != other.GetAutoAdaptUpper() { 989 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorAutoAdaptUpper}) 990 } 991 if o.GetAutoAdaptLower() != other.GetAutoAdaptLower() { 992 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorAutoAdaptLower}) 993 } 994 { 995 subMask := o.GetMaxUpper().MakeDiffFieldMask(other.GetMaxUpper()) 996 if subMask.IsFull() { 997 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMaxUpper}) 998 } else { 999 for _, subpath := range subMask.Paths { 1000 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldSubPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMaxUpper, subPath: subpath}) 1001 } 1002 } 1003 } 1004 { 1005 subMask := o.GetMaxLower().MakeDiffFieldMask(other.GetMaxLower()) 1006 if subMask.IsFull() { 1007 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMaxLower}) 1008 } else { 1009 for _, subpath := range subMask.Paths { 1010 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldSubPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMaxLower, subPath: subpath}) 1011 } 1012 } 1013 } 1014 { 1015 subMask := o.GetMinUpper().MakeDiffFieldMask(other.GetMinUpper()) 1016 if subMask.IsFull() { 1017 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMinUpper}) 1018 } else { 1019 for _, subpath := range subMask.Paths { 1020 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldSubPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMinUpper, subPath: subpath}) 1021 } 1022 } 1023 } 1024 { 1025 subMask := o.GetMinLower().MakeDiffFieldMask(other.GetMinLower()) 1026 if subMask.IsFull() { 1027 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldTerminalPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMinLower}) 1028 } else { 1029 for _, subpath := range subMask.Paths { 1030 res.Paths = append(res.Paths, &TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldSubPath{selector: TsCndSpecThresholdAlertingCfgAlertingThresholds_FieldPathSelectorMinLower, subPath: subpath}) 1031 } 1032 } 1033 } 1034 return res 1035 } 1036 1037 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1038 return o.MakeDiffFieldMask(other.(*TsCndSpec_ThresholdAlertingCfg_AlertingThresholds)) 1039 } 1040 1041 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) Clone() *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds { 1042 if o == nil { 1043 return nil 1044 } 1045 result := &TsCndSpec_ThresholdAlertingCfg_AlertingThresholds{} 1046 result.AutoAdaptUpper = o.AutoAdaptUpper 1047 result.AutoAdaptLower = o.AutoAdaptLower 1048 result.MaxUpper = o.MaxUpper.Clone() 1049 result.MaxLower = o.MaxLower.Clone() 1050 result.MinUpper = o.MinUpper.Clone() 1051 result.MinLower = o.MinLower.Clone() 1052 return result 1053 } 1054 1055 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) CloneRaw() gotenobject.GotenObjectExt { 1056 return o.Clone() 1057 } 1058 1059 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) Merge(source *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) { 1060 o.AutoAdaptUpper = source.GetAutoAdaptUpper() 1061 o.AutoAdaptLower = source.GetAutoAdaptLower() 1062 if source.GetMaxUpper() != nil { 1063 if o.MaxUpper == nil { 1064 o.MaxUpper = new(AlertingThreshold) 1065 } 1066 o.MaxUpper.Merge(source.GetMaxUpper()) 1067 } 1068 if source.GetMaxLower() != nil { 1069 if o.MaxLower == nil { 1070 o.MaxLower = new(AlertingThreshold) 1071 } 1072 o.MaxLower.Merge(source.GetMaxLower()) 1073 } 1074 if source.GetMinUpper() != nil { 1075 if o.MinUpper == nil { 1076 o.MinUpper = new(AlertingThreshold) 1077 } 1078 o.MinUpper.Merge(source.GetMinUpper()) 1079 } 1080 if source.GetMinLower() != nil { 1081 if o.MinLower == nil { 1082 o.MinLower = new(AlertingThreshold) 1083 } 1084 o.MinLower.Merge(source.GetMinLower()) 1085 } 1086 } 1087 1088 func (o *TsCndSpec_ThresholdAlertingCfg_AlertingThresholds) MergeRaw(source gotenobject.GotenObjectExt) { 1089 o.Merge(source.(*TsCndSpec_ThresholdAlertingCfg_AlertingThresholds)) 1090 } 1091 1092 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) GotenObjectExt() {} 1093 1094 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) MakeFullFieldMask() *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask { 1095 return FullTsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask() 1096 } 1097 1098 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) MakeRawFullFieldMask() gotenobject.FieldMask { 1099 return FullTsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask() 1100 } 1101 1102 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) MakeDiffFieldMask(other *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask { 1103 if o == nil && other == nil { 1104 return &TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask{} 1105 } 1106 if o == nil || other == nil { 1107 return FullTsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask() 1108 } 1109 1110 res := &TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder_FieldMask{} 1111 if o.GetHiddenSize() != other.GetHiddenSize() { 1112 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorHiddenSize}) 1113 } 1114 if o.GetLearnRate() != other.GetLearnRate() { 1115 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorLearnRate}) 1116 } 1117 if o.GetMaxTrainingEpochs() != other.GetMaxTrainingEpochs() { 1118 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorMaxTrainingEpochs}) 1119 } 1120 if o.GetMinTrainingEpochs() != other.GetMinTrainingEpochs() { 1121 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorMinTrainingEpochs}) 1122 } 1123 if o.GetAcceptableTrainingError() != other.GetAcceptableTrainingError() { 1124 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorAcceptableTrainingError}) 1125 } 1126 if !proto.Equal(o.GetTrainingPeriod(), other.GetTrainingPeriod()) { 1127 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorTrainingPeriod}) 1128 } 1129 if o.GetCheckPeriodFraction() != other.GetCheckPeriodFraction() { 1130 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorCheckPeriodFraction}) 1131 } 1132 if o.GetTeacherForceAtInference() != other.GetTeacherForceAtInference() { 1133 res.Paths = append(res.Paths, &TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldTerminalPath{selector: TsCndSpecAnomalyAlertingCfgLstmAutoEncoder_FieldPathSelectorTeacherForceAtInference}) 1134 } 1135 return res 1136 } 1137 1138 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1139 return o.MakeDiffFieldMask(other.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder)) 1140 } 1141 1142 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) Clone() *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder { 1143 if o == nil { 1144 return nil 1145 } 1146 result := &TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder{} 1147 result.HiddenSize = o.HiddenSize 1148 result.LearnRate = o.LearnRate 1149 result.MaxTrainingEpochs = o.MaxTrainingEpochs 1150 result.MinTrainingEpochs = o.MinTrainingEpochs 1151 result.AcceptableTrainingError = o.AcceptableTrainingError 1152 result.TrainingPeriod = proto.Clone(o.TrainingPeriod).(*durationpb.Duration) 1153 result.CheckPeriodFraction = o.CheckPeriodFraction 1154 result.TeacherForceAtInference = o.TeacherForceAtInference 1155 return result 1156 } 1157 1158 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) CloneRaw() gotenobject.GotenObjectExt { 1159 return o.Clone() 1160 } 1161 1162 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) Merge(source *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) { 1163 o.HiddenSize = source.GetHiddenSize() 1164 o.LearnRate = source.GetLearnRate() 1165 o.MaxTrainingEpochs = source.GetMaxTrainingEpochs() 1166 o.MinTrainingEpochs = source.GetMinTrainingEpochs() 1167 o.AcceptableTrainingError = source.GetAcceptableTrainingError() 1168 if source.GetTrainingPeriod() != nil { 1169 if o.TrainingPeriod == nil { 1170 o.TrainingPeriod = new(durationpb.Duration) 1171 } 1172 proto.Merge(o.TrainingPeriod, source.GetTrainingPeriod()) 1173 } 1174 o.CheckPeriodFraction = source.GetCheckPeriodFraction() 1175 o.TeacherForceAtInference = source.GetTeacherForceAtInference() 1176 } 1177 1178 func (o *TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder) MergeRaw(source gotenobject.GotenObjectExt) { 1179 o.Merge(source.(*TsCndSpec_AnomalyAlertingCfg_LstmAutoEncoder)) 1180 } 1181 1182 func (o *PolicySpec) GotenObjectExt() {} 1183 1184 func (o *PolicySpec) MakeFullFieldMask() *PolicySpec_FieldMask { 1185 return FullPolicySpec_FieldMask() 1186 } 1187 1188 func (o *PolicySpec) MakeRawFullFieldMask() gotenobject.FieldMask { 1189 return FullPolicySpec_FieldMask() 1190 } 1191 1192 func (o *PolicySpec) MakeDiffFieldMask(other *PolicySpec) *PolicySpec_FieldMask { 1193 if o == nil && other == nil { 1194 return &PolicySpec_FieldMask{} 1195 } 1196 if o == nil || other == nil { 1197 return FullPolicySpec_FieldMask() 1198 } 1199 1200 res := &PolicySpec_FieldMask{} 1201 if o.GetEnabled() != other.GetEnabled() { 1202 res.Paths = append(res.Paths, &PolicySpec_FieldTerminalPath{selector: PolicySpec_FieldPathSelectorEnabled}) 1203 } 1204 if o.GetProcessingLocation() != other.GetProcessingLocation() { 1205 res.Paths = append(res.Paths, &PolicySpec_FieldTerminalPath{selector: PolicySpec_FieldPathSelectorProcessingLocation}) 1206 } 1207 { 1208 subMask := o.GetResourceIdentity().MakeDiffFieldMask(other.GetResourceIdentity()) 1209 if subMask.IsFull() { 1210 res.Paths = append(res.Paths, &PolicySpec_FieldTerminalPath{selector: PolicySpec_FieldPathSelectorResourceIdentity}) 1211 } else { 1212 for _, subpath := range subMask.Paths { 1213 res.Paths = append(res.Paths, &PolicySpec_FieldSubPath{selector: PolicySpec_FieldPathSelectorResourceIdentity, subPath: subpath}) 1214 } 1215 } 1216 } 1217 1218 if len(o.GetSupportingQueries()) == len(other.GetSupportingQueries()) { 1219 for i, lValue := range o.GetSupportingQueries() { 1220 rValue := other.GetSupportingQueries()[i] 1221 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1222 res.Paths = append(res.Paths, &PolicySpec_FieldTerminalPath{selector: PolicySpec_FieldPathSelectorSupportingQueries}) 1223 break 1224 } 1225 } 1226 } else { 1227 res.Paths = append(res.Paths, &PolicySpec_FieldTerminalPath{selector: PolicySpec_FieldPathSelectorSupportingQueries}) 1228 } 1229 { 1230 subMask := o.GetAiAgent().MakeDiffFieldMask(other.GetAiAgent()) 1231 if subMask.IsFull() { 1232 res.Paths = append(res.Paths, &PolicySpec_FieldTerminalPath{selector: PolicySpec_FieldPathSelectorAiAgent}) 1233 } else { 1234 for _, subpath := range subMask.Paths { 1235 res.Paths = append(res.Paths, &PolicySpec_FieldSubPath{selector: PolicySpec_FieldPathSelectorAiAgent, subPath: subpath}) 1236 } 1237 } 1238 } 1239 return res 1240 } 1241 1242 func (o *PolicySpec) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1243 return o.MakeDiffFieldMask(other.(*PolicySpec)) 1244 } 1245 1246 func (o *PolicySpec) Clone() *PolicySpec { 1247 if o == nil { 1248 return nil 1249 } 1250 result := &PolicySpec{} 1251 result.Enabled = o.Enabled 1252 result.ProcessingLocation = o.ProcessingLocation 1253 result.ResourceIdentity = o.ResourceIdentity.Clone() 1254 result.SupportingQueries = make([]*PolicySpec_SupportingAlertQuery, len(o.SupportingQueries)) 1255 for i, sourceValue := range o.SupportingQueries { 1256 result.SupportingQueries[i] = sourceValue.Clone() 1257 } 1258 result.AiAgent = o.AiAgent.Clone() 1259 return result 1260 } 1261 1262 func (o *PolicySpec) CloneRaw() gotenobject.GotenObjectExt { 1263 return o.Clone() 1264 } 1265 1266 func (o *PolicySpec) Merge(source *PolicySpec) { 1267 o.Enabled = source.GetEnabled() 1268 o.ProcessingLocation = source.GetProcessingLocation() 1269 if source.GetResourceIdentity() != nil { 1270 if o.ResourceIdentity == nil { 1271 o.ResourceIdentity = new(PolicySpec_ResourceIdentity) 1272 } 1273 o.ResourceIdentity.Merge(source.GetResourceIdentity()) 1274 } 1275 for _, sourceValue := range source.GetSupportingQueries() { 1276 exists := false 1277 for _, currentValue := range o.SupportingQueries { 1278 if proto.Equal(sourceValue, currentValue) { 1279 exists = true 1280 break 1281 } 1282 } 1283 if !exists { 1284 var newDstElement *PolicySpec_SupportingAlertQuery 1285 if sourceValue != nil { 1286 newDstElement = new(PolicySpec_SupportingAlertQuery) 1287 newDstElement.Merge(sourceValue) 1288 } 1289 o.SupportingQueries = append(o.SupportingQueries, newDstElement) 1290 } 1291 } 1292 1293 if source.GetAiAgent() != nil { 1294 if o.AiAgent == nil { 1295 o.AiAgent = new(PolicySpec_AIAgentHandling) 1296 } 1297 o.AiAgent.Merge(source.GetAiAgent()) 1298 } 1299 } 1300 1301 func (o *PolicySpec) MergeRaw(source gotenobject.GotenObjectExt) { 1302 o.Merge(source.(*PolicySpec)) 1303 } 1304 1305 func (o *PolicySpec_ResourceIdentity) GotenObjectExt() {} 1306 1307 func (o *PolicySpec_ResourceIdentity) MakeFullFieldMask() *PolicySpec_ResourceIdentity_FieldMask { 1308 return FullPolicySpec_ResourceIdentity_FieldMask() 1309 } 1310 1311 func (o *PolicySpec_ResourceIdentity) MakeRawFullFieldMask() gotenobject.FieldMask { 1312 return FullPolicySpec_ResourceIdentity_FieldMask() 1313 } 1314 1315 func (o *PolicySpec_ResourceIdentity) MakeDiffFieldMask(other *PolicySpec_ResourceIdentity) *PolicySpec_ResourceIdentity_FieldMask { 1316 if o == nil && other == nil { 1317 return &PolicySpec_ResourceIdentity_FieldMask{} 1318 } 1319 if o == nil || other == nil { 1320 return FullPolicySpec_ResourceIdentity_FieldMask() 1321 } 1322 1323 res := &PolicySpec_ResourceIdentity_FieldMask{} 1324 if o.GetAlertingResource().String() != other.GetAlertingResource().String() { 1325 res.Paths = append(res.Paths, &PolicySpecResourceIdentity_FieldTerminalPath{selector: PolicySpecResourceIdentity_FieldPathSelectorAlertingResource}) 1326 } 1327 1328 if len(o.GetLabels()) == len(other.GetLabels()) { 1329 for i, lValue := range o.GetLabels() { 1330 rValue := other.GetLabels()[i] 1331 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1332 res.Paths = append(res.Paths, &PolicySpecResourceIdentity_FieldTerminalPath{selector: PolicySpecResourceIdentity_FieldPathSelectorLabels}) 1333 break 1334 } 1335 } 1336 } else { 1337 res.Paths = append(res.Paths, &PolicySpecResourceIdentity_FieldTerminalPath{selector: PolicySpecResourceIdentity_FieldPathSelectorLabels}) 1338 } 1339 1340 if len(o.GetNamePatterns()) == len(other.GetNamePatterns()) { 1341 for i, lValue := range o.GetNamePatterns() { 1342 rValue := other.GetNamePatterns()[i] 1343 if lValue != rValue { 1344 res.Paths = append(res.Paths, &PolicySpecResourceIdentity_FieldTerminalPath{selector: PolicySpecResourceIdentity_FieldPathSelectorNamePatterns}) 1345 break 1346 } 1347 } 1348 } else { 1349 res.Paths = append(res.Paths, &PolicySpecResourceIdentity_FieldTerminalPath{selector: PolicySpecResourceIdentity_FieldPathSelectorNamePatterns}) 1350 } 1351 return res 1352 } 1353 1354 func (o *PolicySpec_ResourceIdentity) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1355 return o.MakeDiffFieldMask(other.(*PolicySpec_ResourceIdentity)) 1356 } 1357 1358 func (o *PolicySpec_ResourceIdentity) Clone() *PolicySpec_ResourceIdentity { 1359 if o == nil { 1360 return nil 1361 } 1362 result := &PolicySpec_ResourceIdentity{} 1363 if o.AlertingResource == nil { 1364 result.AlertingResource = nil 1365 } else if data, err := o.AlertingResource.ProtoString(); err != nil { 1366 panic(err) 1367 } else { 1368 result.AlertingResource = &meta_resource.Reference{} 1369 if err := result.AlertingResource.ParseProtoString(data); err != nil { 1370 panic(err) 1371 } 1372 } 1373 result.Labels = make([]*PolicySpec_ResourceIdentity_LabelInfo, len(o.Labels)) 1374 for i, sourceValue := range o.Labels { 1375 result.Labels[i] = sourceValue.Clone() 1376 } 1377 result.NamePatterns = make([]string, len(o.NamePatterns)) 1378 for i, sourceValue := range o.NamePatterns { 1379 result.NamePatterns[i] = sourceValue 1380 } 1381 return result 1382 } 1383 1384 func (o *PolicySpec_ResourceIdentity) CloneRaw() gotenobject.GotenObjectExt { 1385 return o.Clone() 1386 } 1387 1388 func (o *PolicySpec_ResourceIdentity) Merge(source *PolicySpec_ResourceIdentity) { 1389 if source.GetAlertingResource() != nil { 1390 if data, err := source.GetAlertingResource().ProtoString(); err != nil { 1391 panic(err) 1392 } else { 1393 o.AlertingResource = &meta_resource.Reference{} 1394 if err := o.AlertingResource.ParseProtoString(data); err != nil { 1395 panic(err) 1396 } 1397 } 1398 } else { 1399 o.AlertingResource = nil 1400 } 1401 for _, sourceValue := range source.GetLabels() { 1402 exists := false 1403 for _, currentValue := range o.Labels { 1404 if proto.Equal(sourceValue, currentValue) { 1405 exists = true 1406 break 1407 } 1408 } 1409 if !exists { 1410 var newDstElement *PolicySpec_ResourceIdentity_LabelInfo 1411 if sourceValue != nil { 1412 newDstElement = new(PolicySpec_ResourceIdentity_LabelInfo) 1413 newDstElement.Merge(sourceValue) 1414 } 1415 o.Labels = append(o.Labels, newDstElement) 1416 } 1417 } 1418 1419 for _, sourceValue := range source.GetNamePatterns() { 1420 exists := false 1421 for _, currentValue := range o.NamePatterns { 1422 if currentValue == sourceValue { 1423 exists = true 1424 break 1425 } 1426 } 1427 if !exists { 1428 var newDstElement string 1429 newDstElement = sourceValue 1430 o.NamePatterns = append(o.NamePatterns, newDstElement) 1431 } 1432 } 1433 1434 } 1435 1436 func (o *PolicySpec_ResourceIdentity) MergeRaw(source gotenobject.GotenObjectExt) { 1437 o.Merge(source.(*PolicySpec_ResourceIdentity)) 1438 } 1439 1440 func (o *PolicySpec_SupportingAlertQuery) GotenObjectExt() {} 1441 1442 func (o *PolicySpec_SupportingAlertQuery) MakeFullFieldMask() *PolicySpec_SupportingAlertQuery_FieldMask { 1443 return FullPolicySpec_SupportingAlertQuery_FieldMask() 1444 } 1445 1446 func (o *PolicySpec_SupportingAlertQuery) MakeRawFullFieldMask() gotenobject.FieldMask { 1447 return FullPolicySpec_SupportingAlertQuery_FieldMask() 1448 } 1449 1450 func (o *PolicySpec_SupportingAlertQuery) MakeDiffFieldMask(other *PolicySpec_SupportingAlertQuery) *PolicySpec_SupportingAlertQuery_FieldMask { 1451 if o == nil && other == nil { 1452 return &PolicySpec_SupportingAlertQuery_FieldMask{} 1453 } 1454 if o == nil || other == nil { 1455 return FullPolicySpec_SupportingAlertQuery_FieldMask() 1456 } 1457 1458 res := &PolicySpec_SupportingAlertQuery_FieldMask{} 1459 { 1460 _, leftSelected := o.Query.(*PolicySpec_SupportingAlertQuery_TsQuery_) 1461 _, rightSelected := other.Query.(*PolicySpec_SupportingAlertQuery_TsQuery_) 1462 if leftSelected == rightSelected { 1463 subMask := o.GetTsQuery().MakeDiffFieldMask(other.GetTsQuery()) 1464 if subMask.IsFull() { 1465 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorTsQuery}) 1466 } else { 1467 for _, subpath := range subMask.Paths { 1468 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldSubPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorTsQuery, subPath: subpath}) 1469 } 1470 } 1471 } else { 1472 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorTsQuery}) 1473 } 1474 } 1475 { 1476 _, leftSelected := o.Query.(*PolicySpec_SupportingAlertQuery_LogQuery_) 1477 _, rightSelected := other.Query.(*PolicySpec_SupportingAlertQuery_LogQuery_) 1478 if leftSelected == rightSelected { 1479 subMask := o.GetLogQuery().MakeDiffFieldMask(other.GetLogQuery()) 1480 if subMask.IsFull() { 1481 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorLogQuery}) 1482 } else { 1483 for _, subpath := range subMask.Paths { 1484 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldSubPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorLogQuery, subPath: subpath}) 1485 } 1486 } 1487 } else { 1488 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorLogQuery}) 1489 } 1490 } 1491 { 1492 _, leftSelected := o.Query.(*PolicySpec_SupportingAlertQuery_RestGetQuery_) 1493 _, rightSelected := other.Query.(*PolicySpec_SupportingAlertQuery_RestGetQuery_) 1494 if leftSelected == rightSelected { 1495 subMask := o.GetRestGetQuery().MakeDiffFieldMask(other.GetRestGetQuery()) 1496 if subMask.IsFull() { 1497 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorRestGetQuery}) 1498 } else { 1499 for _, subpath := range subMask.Paths { 1500 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldSubPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorRestGetQuery, subPath: subpath}) 1501 } 1502 } 1503 } else { 1504 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorRestGetQuery}) 1505 } 1506 } 1507 { 1508 _, leftSelected := o.Query.(*PolicySpec_SupportingAlertQuery_RestListQuery_) 1509 _, rightSelected := other.Query.(*PolicySpec_SupportingAlertQuery_RestListQuery_) 1510 if leftSelected == rightSelected { 1511 subMask := o.GetRestListQuery().MakeDiffFieldMask(other.GetRestListQuery()) 1512 if subMask.IsFull() { 1513 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorRestListQuery}) 1514 } else { 1515 for _, subpath := range subMask.Paths { 1516 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldSubPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorRestListQuery, subPath: subpath}) 1517 } 1518 } 1519 } else { 1520 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQuery_FieldPathSelectorRestListQuery}) 1521 } 1522 } 1523 return res 1524 } 1525 1526 func (o *PolicySpec_SupportingAlertQuery) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1527 return o.MakeDiffFieldMask(other.(*PolicySpec_SupportingAlertQuery)) 1528 } 1529 1530 func (o *PolicySpec_SupportingAlertQuery) Clone() *PolicySpec_SupportingAlertQuery { 1531 if o == nil { 1532 return nil 1533 } 1534 result := &PolicySpec_SupportingAlertQuery{} 1535 if o, ok := o.Query.(*PolicySpec_SupportingAlertQuery_TsQuery_); ok { 1536 result.Query = (*PolicySpec_SupportingAlertQuery_TsQuery_)(nil) 1537 if o != nil { 1538 result.Query = &PolicySpec_SupportingAlertQuery_TsQuery_{} 1539 result := result.Query.(*PolicySpec_SupportingAlertQuery_TsQuery_) 1540 result.TsQuery = o.TsQuery.Clone() 1541 } 1542 } 1543 if o, ok := o.Query.(*PolicySpec_SupportingAlertQuery_LogQuery_); ok { 1544 result.Query = (*PolicySpec_SupportingAlertQuery_LogQuery_)(nil) 1545 if o != nil { 1546 result.Query = &PolicySpec_SupportingAlertQuery_LogQuery_{} 1547 result := result.Query.(*PolicySpec_SupportingAlertQuery_LogQuery_) 1548 result.LogQuery = o.LogQuery.Clone() 1549 } 1550 } 1551 if o, ok := o.Query.(*PolicySpec_SupportingAlertQuery_RestGetQuery_); ok { 1552 result.Query = (*PolicySpec_SupportingAlertQuery_RestGetQuery_)(nil) 1553 if o != nil { 1554 result.Query = &PolicySpec_SupportingAlertQuery_RestGetQuery_{} 1555 result := result.Query.(*PolicySpec_SupportingAlertQuery_RestGetQuery_) 1556 result.RestGetQuery = o.RestGetQuery.Clone() 1557 } 1558 } 1559 if o, ok := o.Query.(*PolicySpec_SupportingAlertQuery_RestListQuery_); ok { 1560 result.Query = (*PolicySpec_SupportingAlertQuery_RestListQuery_)(nil) 1561 if o != nil { 1562 result.Query = &PolicySpec_SupportingAlertQuery_RestListQuery_{} 1563 result := result.Query.(*PolicySpec_SupportingAlertQuery_RestListQuery_) 1564 result.RestListQuery = o.RestListQuery.Clone() 1565 } 1566 } 1567 return result 1568 } 1569 1570 func (o *PolicySpec_SupportingAlertQuery) CloneRaw() gotenobject.GotenObjectExt { 1571 return o.Clone() 1572 } 1573 1574 func (o *PolicySpec_SupportingAlertQuery) Merge(source *PolicySpec_SupportingAlertQuery) { 1575 if source, ok := source.GetQuery().(*PolicySpec_SupportingAlertQuery_TsQuery_); ok { 1576 if dstOneOf, ok := o.Query.(*PolicySpec_SupportingAlertQuery_TsQuery_); !ok || dstOneOf == nil { 1577 o.Query = &PolicySpec_SupportingAlertQuery_TsQuery_{} 1578 } 1579 if source != nil { 1580 o := o.Query.(*PolicySpec_SupportingAlertQuery_TsQuery_) 1581 if source.TsQuery != nil { 1582 if o.TsQuery == nil { 1583 o.TsQuery = new(PolicySpec_SupportingAlertQuery_TsQuery) 1584 } 1585 o.TsQuery.Merge(source.TsQuery) 1586 } 1587 } 1588 } 1589 if source, ok := source.GetQuery().(*PolicySpec_SupportingAlertQuery_LogQuery_); ok { 1590 if dstOneOf, ok := o.Query.(*PolicySpec_SupportingAlertQuery_LogQuery_); !ok || dstOneOf == nil { 1591 o.Query = &PolicySpec_SupportingAlertQuery_LogQuery_{} 1592 } 1593 if source != nil { 1594 o := o.Query.(*PolicySpec_SupportingAlertQuery_LogQuery_) 1595 if source.LogQuery != nil { 1596 if o.LogQuery == nil { 1597 o.LogQuery = new(PolicySpec_SupportingAlertQuery_LogQuery) 1598 } 1599 o.LogQuery.Merge(source.LogQuery) 1600 } 1601 } 1602 } 1603 if source, ok := source.GetQuery().(*PolicySpec_SupportingAlertQuery_RestGetQuery_); ok { 1604 if dstOneOf, ok := o.Query.(*PolicySpec_SupportingAlertQuery_RestGetQuery_); !ok || dstOneOf == nil { 1605 o.Query = &PolicySpec_SupportingAlertQuery_RestGetQuery_{} 1606 } 1607 if source != nil { 1608 o := o.Query.(*PolicySpec_SupportingAlertQuery_RestGetQuery_) 1609 if source.RestGetQuery != nil { 1610 if o.RestGetQuery == nil { 1611 o.RestGetQuery = new(PolicySpec_SupportingAlertQuery_RestGetQuery) 1612 } 1613 o.RestGetQuery.Merge(source.RestGetQuery) 1614 } 1615 } 1616 } 1617 if source, ok := source.GetQuery().(*PolicySpec_SupportingAlertQuery_RestListQuery_); ok { 1618 if dstOneOf, ok := o.Query.(*PolicySpec_SupportingAlertQuery_RestListQuery_); !ok || dstOneOf == nil { 1619 o.Query = &PolicySpec_SupportingAlertQuery_RestListQuery_{} 1620 } 1621 if source != nil { 1622 o := o.Query.(*PolicySpec_SupportingAlertQuery_RestListQuery_) 1623 if source.RestListQuery != nil { 1624 if o.RestListQuery == nil { 1625 o.RestListQuery = new(PolicySpec_SupportingAlertQuery_RestListQuery) 1626 } 1627 o.RestListQuery.Merge(source.RestListQuery) 1628 } 1629 } 1630 } 1631 } 1632 1633 func (o *PolicySpec_SupportingAlertQuery) MergeRaw(source gotenobject.GotenObjectExt) { 1634 o.Merge(source.(*PolicySpec_SupportingAlertQuery)) 1635 } 1636 1637 func (o *PolicySpec_AIAgentHandling) GotenObjectExt() {} 1638 1639 func (o *PolicySpec_AIAgentHandling) MakeFullFieldMask() *PolicySpec_AIAgentHandling_FieldMask { 1640 return FullPolicySpec_AIAgentHandling_FieldMask() 1641 } 1642 1643 func (o *PolicySpec_AIAgentHandling) MakeRawFullFieldMask() gotenobject.FieldMask { 1644 return FullPolicySpec_AIAgentHandling_FieldMask() 1645 } 1646 1647 func (o *PolicySpec_AIAgentHandling) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling) *PolicySpec_AIAgentHandling_FieldMask { 1648 if o == nil && other == nil { 1649 return &PolicySpec_AIAgentHandling_FieldMask{} 1650 } 1651 if o == nil || other == nil { 1652 return FullPolicySpec_AIAgentHandling_FieldMask() 1653 } 1654 1655 res := &PolicySpec_AIAgentHandling_FieldMask{} 1656 if o.GetEnabled() != other.GetEnabled() { 1657 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldTerminalPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorEnabled}) 1658 } 1659 if o.GetEnabledConnectivity() != other.GetEnabledConnectivity() { 1660 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldTerminalPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorEnabledConnectivity}) 1661 } 1662 if o.GetAutoAcceptRemediation() != other.GetAutoAcceptRemediation() { 1663 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldTerminalPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorAutoAcceptRemediation}) 1664 } 1665 { 1666 subMask := o.GetEdgeConnectivity().MakeDiffFieldMask(other.GetEdgeConnectivity()) 1667 if subMask.IsFull() { 1668 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldTerminalPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorEdgeConnectivity}) 1669 } else { 1670 for _, subpath := range subMask.Paths { 1671 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldSubPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorEdgeConnectivity, subPath: subpath}) 1672 } 1673 } 1674 } 1675 1676 if len(o.GetRemediationOptions()) == len(other.GetRemediationOptions()) { 1677 for i, lValue := range o.GetRemediationOptions() { 1678 rValue := other.GetRemediationOptions()[i] 1679 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1680 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldTerminalPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorRemediationOptions}) 1681 break 1682 } 1683 } 1684 } else { 1685 res.Paths = append(res.Paths, &PolicySpecAIAgentHandling_FieldTerminalPath{selector: PolicySpecAIAgentHandling_FieldPathSelectorRemediationOptions}) 1686 } 1687 return res 1688 } 1689 1690 func (o *PolicySpec_AIAgentHandling) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1691 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling)) 1692 } 1693 1694 func (o *PolicySpec_AIAgentHandling) Clone() *PolicySpec_AIAgentHandling { 1695 if o == nil { 1696 return nil 1697 } 1698 result := &PolicySpec_AIAgentHandling{} 1699 result.Enabled = o.Enabled 1700 result.EnabledConnectivity = o.EnabledConnectivity 1701 result.AutoAcceptRemediation = o.AutoAcceptRemediation 1702 result.EdgeConnectivity = o.EdgeConnectivity.Clone() 1703 result.RemediationOptions = make([]*PolicySpec_AIAgentHandling_Remediation, len(o.RemediationOptions)) 1704 for i, sourceValue := range o.RemediationOptions { 1705 result.RemediationOptions[i] = sourceValue.Clone() 1706 } 1707 return result 1708 } 1709 1710 func (o *PolicySpec_AIAgentHandling) CloneRaw() gotenobject.GotenObjectExt { 1711 return o.Clone() 1712 } 1713 1714 func (o *PolicySpec_AIAgentHandling) Merge(source *PolicySpec_AIAgentHandling) { 1715 o.Enabled = source.GetEnabled() 1716 o.EnabledConnectivity = source.GetEnabledConnectivity() 1717 o.AutoAcceptRemediation = source.GetAutoAcceptRemediation() 1718 if source.GetEdgeConnectivity() != nil { 1719 if o.EdgeConnectivity == nil { 1720 o.EdgeConnectivity = new(PolicySpec_AIAgentHandling_EdgeConnectivity) 1721 } 1722 o.EdgeConnectivity.Merge(source.GetEdgeConnectivity()) 1723 } 1724 for _, sourceValue := range source.GetRemediationOptions() { 1725 exists := false 1726 for _, currentValue := range o.RemediationOptions { 1727 if proto.Equal(sourceValue, currentValue) { 1728 exists = true 1729 break 1730 } 1731 } 1732 if !exists { 1733 var newDstElement *PolicySpec_AIAgentHandling_Remediation 1734 if sourceValue != nil { 1735 newDstElement = new(PolicySpec_AIAgentHandling_Remediation) 1736 newDstElement.Merge(sourceValue) 1737 } 1738 o.RemediationOptions = append(o.RemediationOptions, newDstElement) 1739 } 1740 } 1741 1742 } 1743 1744 func (o *PolicySpec_AIAgentHandling) MergeRaw(source gotenobject.GotenObjectExt) { 1745 o.Merge(source.(*PolicySpec_AIAgentHandling)) 1746 } 1747 1748 func (o *PolicySpec_ResourceIdentity_LabelInfo) GotenObjectExt() {} 1749 1750 func (o *PolicySpec_ResourceIdentity_LabelInfo) MakeFullFieldMask() *PolicySpec_ResourceIdentity_LabelInfo_FieldMask { 1751 return FullPolicySpec_ResourceIdentity_LabelInfo_FieldMask() 1752 } 1753 1754 func (o *PolicySpec_ResourceIdentity_LabelInfo) MakeRawFullFieldMask() gotenobject.FieldMask { 1755 return FullPolicySpec_ResourceIdentity_LabelInfo_FieldMask() 1756 } 1757 1758 func (o *PolicySpec_ResourceIdentity_LabelInfo) MakeDiffFieldMask(other *PolicySpec_ResourceIdentity_LabelInfo) *PolicySpec_ResourceIdentity_LabelInfo_FieldMask { 1759 if o == nil && other == nil { 1760 return &PolicySpec_ResourceIdentity_LabelInfo_FieldMask{} 1761 } 1762 if o == nil || other == nil { 1763 return FullPolicySpec_ResourceIdentity_LabelInfo_FieldMask() 1764 } 1765 1766 res := &PolicySpec_ResourceIdentity_LabelInfo_FieldMask{} 1767 if o.GetKey() != other.GetKey() { 1768 res.Paths = append(res.Paths, &PolicySpecResourceIdentityLabelInfo_FieldTerminalPath{selector: PolicySpecResourceIdentityLabelInfo_FieldPathSelectorKey}) 1769 } 1770 1771 if len(o.GetContexts()) == len(other.GetContexts()) { 1772 for i, lValue := range o.GetContexts() { 1773 rValue := other.GetContexts()[i] 1774 if lValue != rValue { 1775 res.Paths = append(res.Paths, &PolicySpecResourceIdentityLabelInfo_FieldTerminalPath{selector: PolicySpecResourceIdentityLabelInfo_FieldPathSelectorContexts}) 1776 break 1777 } 1778 } 1779 } else { 1780 res.Paths = append(res.Paths, &PolicySpecResourceIdentityLabelInfo_FieldTerminalPath{selector: PolicySpecResourceIdentityLabelInfo_FieldPathSelectorContexts}) 1781 } 1782 if o.GetMappedNameSegment() != other.GetMappedNameSegment() { 1783 res.Paths = append(res.Paths, &PolicySpecResourceIdentityLabelInfo_FieldTerminalPath{selector: PolicySpecResourceIdentityLabelInfo_FieldPathSelectorMappedNameSegment}) 1784 } 1785 return res 1786 } 1787 1788 func (o *PolicySpec_ResourceIdentity_LabelInfo) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1789 return o.MakeDiffFieldMask(other.(*PolicySpec_ResourceIdentity_LabelInfo)) 1790 } 1791 1792 func (o *PolicySpec_ResourceIdentity_LabelInfo) Clone() *PolicySpec_ResourceIdentity_LabelInfo { 1793 if o == nil { 1794 return nil 1795 } 1796 result := &PolicySpec_ResourceIdentity_LabelInfo{} 1797 result.Key = o.Key 1798 result.Contexts = make([]PolicySpec_ResourceIdentity_LabelInfo_UsageContext, len(o.Contexts)) 1799 for i, sourceValue := range o.Contexts { 1800 result.Contexts[i] = sourceValue 1801 } 1802 result.MappedNameSegment = o.MappedNameSegment 1803 return result 1804 } 1805 1806 func (o *PolicySpec_ResourceIdentity_LabelInfo) CloneRaw() gotenobject.GotenObjectExt { 1807 return o.Clone() 1808 } 1809 1810 func (o *PolicySpec_ResourceIdentity_LabelInfo) Merge(source *PolicySpec_ResourceIdentity_LabelInfo) { 1811 o.Key = source.GetKey() 1812 for _, sourceValue := range source.GetContexts() { 1813 exists := false 1814 for _, currentValue := range o.Contexts { 1815 if currentValue == sourceValue { 1816 exists = true 1817 break 1818 } 1819 } 1820 if !exists { 1821 var newDstElement PolicySpec_ResourceIdentity_LabelInfo_UsageContext 1822 newDstElement = sourceValue 1823 o.Contexts = append(o.Contexts, newDstElement) 1824 } 1825 } 1826 1827 o.MappedNameSegment = source.GetMappedNameSegment() 1828 } 1829 1830 func (o *PolicySpec_ResourceIdentity_LabelInfo) MergeRaw(source gotenobject.GotenObjectExt) { 1831 o.Merge(source.(*PolicySpec_ResourceIdentity_LabelInfo)) 1832 } 1833 1834 func (o *PolicySpec_SupportingAlertQuery_TsQuery) GotenObjectExt() {} 1835 1836 func (o *PolicySpec_SupportingAlertQuery_TsQuery) MakeFullFieldMask() *PolicySpec_SupportingAlertQuery_TsQuery_FieldMask { 1837 return FullPolicySpec_SupportingAlertQuery_TsQuery_FieldMask() 1838 } 1839 1840 func (o *PolicySpec_SupportingAlertQuery_TsQuery) MakeRawFullFieldMask() gotenobject.FieldMask { 1841 return FullPolicySpec_SupportingAlertQuery_TsQuery_FieldMask() 1842 } 1843 1844 func (o *PolicySpec_SupportingAlertQuery_TsQuery) MakeDiffFieldMask(other *PolicySpec_SupportingAlertQuery_TsQuery) *PolicySpec_SupportingAlertQuery_TsQuery_FieldMask { 1845 if o == nil && other == nil { 1846 return &PolicySpec_SupportingAlertQuery_TsQuery_FieldMask{} 1847 } 1848 if o == nil || other == nil { 1849 return FullPolicySpec_SupportingAlertQuery_TsQuery_FieldMask() 1850 } 1851 1852 res := &PolicySpec_SupportingAlertQuery_TsQuery_FieldMask{} 1853 if o.GetDescription() != other.GetDescription() { 1854 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryTsQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryTsQuery_FieldPathSelectorDescription}) 1855 } 1856 if o.GetFilterTemplate() != other.GetFilterTemplate() { 1857 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryTsQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryTsQuery_FieldPathSelectorFilterTemplate}) 1858 } 1859 { 1860 subMask := o.GetAggregation().MakeDiffFieldMask(other.GetAggregation()) 1861 if subMask.IsFull() { 1862 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryTsQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryTsQuery_FieldPathSelectorAggregation}) 1863 } else { 1864 for _, subpath := range subMask.Paths { 1865 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryTsQuery_FieldSubPath{selector: PolicySpecSupportingAlertQueryTsQuery_FieldPathSelectorAggregation, subPath: subpath}) 1866 } 1867 } 1868 } 1869 return res 1870 } 1871 1872 func (o *PolicySpec_SupportingAlertQuery_TsQuery) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1873 return o.MakeDiffFieldMask(other.(*PolicySpec_SupportingAlertQuery_TsQuery)) 1874 } 1875 1876 func (o *PolicySpec_SupportingAlertQuery_TsQuery) Clone() *PolicySpec_SupportingAlertQuery_TsQuery { 1877 if o == nil { 1878 return nil 1879 } 1880 result := &PolicySpec_SupportingAlertQuery_TsQuery{} 1881 result.Description = o.Description 1882 result.FilterTemplate = o.FilterTemplate 1883 result.Aggregation = o.Aggregation.Clone() 1884 return result 1885 } 1886 1887 func (o *PolicySpec_SupportingAlertQuery_TsQuery) CloneRaw() gotenobject.GotenObjectExt { 1888 return o.Clone() 1889 } 1890 1891 func (o *PolicySpec_SupportingAlertQuery_TsQuery) Merge(source *PolicySpec_SupportingAlertQuery_TsQuery) { 1892 o.Description = source.GetDescription() 1893 o.FilterTemplate = source.GetFilterTemplate() 1894 if source.GetAggregation() != nil { 1895 if o.Aggregation == nil { 1896 o.Aggregation = new(monitoring_common.Aggregation) 1897 } 1898 o.Aggregation.Merge(source.GetAggregation()) 1899 } 1900 } 1901 1902 func (o *PolicySpec_SupportingAlertQuery_TsQuery) MergeRaw(source gotenobject.GotenObjectExt) { 1903 o.Merge(source.(*PolicySpec_SupportingAlertQuery_TsQuery)) 1904 } 1905 1906 func (o *PolicySpec_SupportingAlertQuery_LogQuery) GotenObjectExt() {} 1907 1908 func (o *PolicySpec_SupportingAlertQuery_LogQuery) MakeFullFieldMask() *PolicySpec_SupportingAlertQuery_LogQuery_FieldMask { 1909 return FullPolicySpec_SupportingAlertQuery_LogQuery_FieldMask() 1910 } 1911 1912 func (o *PolicySpec_SupportingAlertQuery_LogQuery) MakeRawFullFieldMask() gotenobject.FieldMask { 1913 return FullPolicySpec_SupportingAlertQuery_LogQuery_FieldMask() 1914 } 1915 1916 func (o *PolicySpec_SupportingAlertQuery_LogQuery) MakeDiffFieldMask(other *PolicySpec_SupportingAlertQuery_LogQuery) *PolicySpec_SupportingAlertQuery_LogQuery_FieldMask { 1917 if o == nil && other == nil { 1918 return &PolicySpec_SupportingAlertQuery_LogQuery_FieldMask{} 1919 } 1920 if o == nil || other == nil { 1921 return FullPolicySpec_SupportingAlertQuery_LogQuery_FieldMask() 1922 } 1923 1924 res := &PolicySpec_SupportingAlertQuery_LogQuery_FieldMask{} 1925 if o.GetDescription() != other.GetDescription() { 1926 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryLogQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryLogQuery_FieldPathSelectorDescription}) 1927 } 1928 if o.GetFilterTemplate() != other.GetFilterTemplate() { 1929 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryLogQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryLogQuery_FieldPathSelectorFilterTemplate}) 1930 } 1931 return res 1932 } 1933 1934 func (o *PolicySpec_SupportingAlertQuery_LogQuery) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1935 return o.MakeDiffFieldMask(other.(*PolicySpec_SupportingAlertQuery_LogQuery)) 1936 } 1937 1938 func (o *PolicySpec_SupportingAlertQuery_LogQuery) Clone() *PolicySpec_SupportingAlertQuery_LogQuery { 1939 if o == nil { 1940 return nil 1941 } 1942 result := &PolicySpec_SupportingAlertQuery_LogQuery{} 1943 result.Description = o.Description 1944 result.FilterTemplate = o.FilterTemplate 1945 return result 1946 } 1947 1948 func (o *PolicySpec_SupportingAlertQuery_LogQuery) CloneRaw() gotenobject.GotenObjectExt { 1949 return o.Clone() 1950 } 1951 1952 func (o *PolicySpec_SupportingAlertQuery_LogQuery) Merge(source *PolicySpec_SupportingAlertQuery_LogQuery) { 1953 o.Description = source.GetDescription() 1954 o.FilterTemplate = source.GetFilterTemplate() 1955 } 1956 1957 func (o *PolicySpec_SupportingAlertQuery_LogQuery) MergeRaw(source gotenobject.GotenObjectExt) { 1958 o.Merge(source.(*PolicySpec_SupportingAlertQuery_LogQuery)) 1959 } 1960 1961 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) GotenObjectExt() {} 1962 1963 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) MakeFullFieldMask() *PolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask { 1964 return FullPolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask() 1965 } 1966 1967 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) MakeRawFullFieldMask() gotenobject.FieldMask { 1968 return FullPolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask() 1969 } 1970 1971 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) MakeDiffFieldMask(other *PolicySpec_SupportingAlertQuery_RestGetQuery) *PolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask { 1972 if o == nil && other == nil { 1973 return &PolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask{} 1974 } 1975 if o == nil || other == nil { 1976 return FullPolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask() 1977 } 1978 1979 res := &PolicySpec_SupportingAlertQuery_RestGetQuery_FieldMask{} 1980 if o.GetDescription() != other.GetDescription() { 1981 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestGetQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestGetQuery_FieldPathSelectorDescription}) 1982 } 1983 if o.GetEndpoint() != other.GetEndpoint() { 1984 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestGetQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestGetQuery_FieldPathSelectorEndpoint}) 1985 } 1986 if o.GetPathTemplate() != other.GetPathTemplate() { 1987 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestGetQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestGetQuery_FieldPathSelectorPathTemplate}) 1988 } 1989 if o.GetView() != other.GetView() { 1990 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestGetQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestGetQuery_FieldPathSelectorView}) 1991 } 1992 if o.GetFieldMask() != other.GetFieldMask() { 1993 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestGetQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestGetQuery_FieldPathSelectorFieldMask}) 1994 } 1995 return res 1996 } 1997 1998 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1999 return o.MakeDiffFieldMask(other.(*PolicySpec_SupportingAlertQuery_RestGetQuery)) 2000 } 2001 2002 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) Clone() *PolicySpec_SupportingAlertQuery_RestGetQuery { 2003 if o == nil { 2004 return nil 2005 } 2006 result := &PolicySpec_SupportingAlertQuery_RestGetQuery{} 2007 result.Description = o.Description 2008 result.Endpoint = o.Endpoint 2009 result.PathTemplate = o.PathTemplate 2010 result.View = o.View 2011 result.FieldMask = o.FieldMask 2012 return result 2013 } 2014 2015 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) CloneRaw() gotenobject.GotenObjectExt { 2016 return o.Clone() 2017 } 2018 2019 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) Merge(source *PolicySpec_SupportingAlertQuery_RestGetQuery) { 2020 o.Description = source.GetDescription() 2021 o.Endpoint = source.GetEndpoint() 2022 o.PathTemplate = source.GetPathTemplate() 2023 o.View = source.GetView() 2024 o.FieldMask = source.GetFieldMask() 2025 } 2026 2027 func (o *PolicySpec_SupportingAlertQuery_RestGetQuery) MergeRaw(source gotenobject.GotenObjectExt) { 2028 o.Merge(source.(*PolicySpec_SupportingAlertQuery_RestGetQuery)) 2029 } 2030 2031 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) GotenObjectExt() {} 2032 2033 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) MakeFullFieldMask() *PolicySpec_SupportingAlertQuery_RestListQuery_FieldMask { 2034 return FullPolicySpec_SupportingAlertQuery_RestListQuery_FieldMask() 2035 } 2036 2037 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) MakeRawFullFieldMask() gotenobject.FieldMask { 2038 return FullPolicySpec_SupportingAlertQuery_RestListQuery_FieldMask() 2039 } 2040 2041 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) MakeDiffFieldMask(other *PolicySpec_SupportingAlertQuery_RestListQuery) *PolicySpec_SupportingAlertQuery_RestListQuery_FieldMask { 2042 if o == nil && other == nil { 2043 return &PolicySpec_SupportingAlertQuery_RestListQuery_FieldMask{} 2044 } 2045 if o == nil || other == nil { 2046 return FullPolicySpec_SupportingAlertQuery_RestListQuery_FieldMask() 2047 } 2048 2049 res := &PolicySpec_SupportingAlertQuery_RestListQuery_FieldMask{} 2050 if o.GetDescription() != other.GetDescription() { 2051 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestListQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestListQuery_FieldPathSelectorDescription}) 2052 } 2053 if o.GetEndpoint() != other.GetEndpoint() { 2054 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestListQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestListQuery_FieldPathSelectorEndpoint}) 2055 } 2056 if o.GetPathTemplate() != other.GetPathTemplate() { 2057 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestListQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestListQuery_FieldPathSelectorPathTemplate}) 2058 } 2059 if o.GetView() != other.GetView() { 2060 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestListQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestListQuery_FieldPathSelectorView}) 2061 } 2062 if o.GetFieldMask() != other.GetFieldMask() { 2063 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestListQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestListQuery_FieldPathSelectorFieldMask}) 2064 } 2065 if o.GetFilterTemplate() != other.GetFilterTemplate() { 2066 res.Paths = append(res.Paths, &PolicySpecSupportingAlertQueryRestListQuery_FieldTerminalPath{selector: PolicySpecSupportingAlertQueryRestListQuery_FieldPathSelectorFilterTemplate}) 2067 } 2068 return res 2069 } 2070 2071 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2072 return o.MakeDiffFieldMask(other.(*PolicySpec_SupportingAlertQuery_RestListQuery)) 2073 } 2074 2075 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) Clone() *PolicySpec_SupportingAlertQuery_RestListQuery { 2076 if o == nil { 2077 return nil 2078 } 2079 result := &PolicySpec_SupportingAlertQuery_RestListQuery{} 2080 result.Description = o.Description 2081 result.Endpoint = o.Endpoint 2082 result.PathTemplate = o.PathTemplate 2083 result.View = o.View 2084 result.FieldMask = o.FieldMask 2085 result.FilterTemplate = o.FilterTemplate 2086 return result 2087 } 2088 2089 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) CloneRaw() gotenobject.GotenObjectExt { 2090 return o.Clone() 2091 } 2092 2093 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) Merge(source *PolicySpec_SupportingAlertQuery_RestListQuery) { 2094 o.Description = source.GetDescription() 2095 o.Endpoint = source.GetEndpoint() 2096 o.PathTemplate = source.GetPathTemplate() 2097 o.View = source.GetView() 2098 o.FieldMask = source.GetFieldMask() 2099 o.FilterTemplate = source.GetFilterTemplate() 2100 } 2101 2102 func (o *PolicySpec_SupportingAlertQuery_RestListQuery) MergeRaw(source gotenobject.GotenObjectExt) { 2103 o.Merge(source.(*PolicySpec_SupportingAlertQuery_RestListQuery)) 2104 } 2105 2106 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) GotenObjectExt() {} 2107 2108 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) MakeFullFieldMask() *PolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask { 2109 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask() 2110 } 2111 2112 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) MakeRawFullFieldMask() gotenobject.FieldMask { 2113 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask() 2114 } 2115 2116 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_EdgeConnectivity) *PolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask { 2117 if o == nil && other == nil { 2118 return &PolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask{} 2119 } 2120 if o == nil || other == nil { 2121 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask() 2122 } 2123 2124 res := &PolicySpec_AIAgentHandling_EdgeConnectivity_FieldMask{} 2125 { 2126 _, leftSelected := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh) 2127 _, rightSelected := other.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh) 2128 if leftSelected == rightSelected { 2129 subMask := o.GetDeviceSsh().MakeDiffFieldMask(other.GetDeviceSsh()) 2130 if subMask.IsFull() { 2131 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorDeviceSsh}) 2132 } else { 2133 for _, subpath := range subMask.Paths { 2134 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldSubPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorDeviceSsh, subPath: subpath}) 2135 } 2136 } 2137 } else { 2138 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorDeviceSsh}) 2139 } 2140 } 2141 { 2142 _, leftSelected := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh) 2143 _, rightSelected := other.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh) 2144 if leftSelected == rightSelected { 2145 subMask := o.GetProxiesSsh().MakeDiffFieldMask(other.GetProxiesSsh()) 2146 if subMask.IsFull() { 2147 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorProxiesSsh}) 2148 } else { 2149 for _, subpath := range subMask.Paths { 2150 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldSubPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorProxiesSsh, subPath: subpath}) 2151 } 2152 } 2153 } else { 2154 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorProxiesSsh}) 2155 } 2156 } 2157 { 2158 _, leftSelected := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh) 2159 _, rightSelected := other.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh) 2160 if leftSelected == rightSelected { 2161 subMask := o.GetPodSsh().MakeDiffFieldMask(other.GetPodSsh()) 2162 if subMask.IsFull() { 2163 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorPodSsh}) 2164 } else { 2165 for _, subpath := range subMask.Paths { 2166 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldSubPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorPodSsh, subPath: subpath}) 2167 } 2168 } 2169 } else { 2170 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorPodSsh}) 2171 } 2172 } 2173 2174 if len(o.GetAllowedBins()) == len(other.GetAllowedBins()) { 2175 for i, lValue := range o.GetAllowedBins() { 2176 rValue := other.GetAllowedBins()[i] 2177 if lValue != rValue { 2178 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorAllowedBins}) 2179 break 2180 } 2181 } 2182 } else { 2183 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivity_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivity_FieldPathSelectorAllowedBins}) 2184 } 2185 return res 2186 } 2187 2188 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2189 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_EdgeConnectivity)) 2190 } 2191 2192 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) Clone() *PolicySpec_AIAgentHandling_EdgeConnectivity { 2193 if o == nil { 2194 return nil 2195 } 2196 result := &PolicySpec_AIAgentHandling_EdgeConnectivity{} 2197 if o, ok := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh); ok { 2198 result.Type = (*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh)(nil) 2199 if o != nil { 2200 result.Type = &PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh{} 2201 result := result.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh) 2202 result.DeviceSsh = o.DeviceSsh.Clone() 2203 } 2204 } 2205 if o, ok := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh); ok { 2206 result.Type = (*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh)(nil) 2207 if o != nil { 2208 result.Type = &PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh{} 2209 result := result.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh) 2210 result.ProxiesSsh = o.ProxiesSsh.Clone() 2211 } 2212 } 2213 if o, ok := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh); ok { 2214 result.Type = (*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh)(nil) 2215 if o != nil { 2216 result.Type = &PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh{} 2217 result := result.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh) 2218 result.PodSsh = o.PodSsh.Clone() 2219 } 2220 } 2221 result.AllowedBins = make([]string, len(o.AllowedBins)) 2222 for i, sourceValue := range o.AllowedBins { 2223 result.AllowedBins[i] = sourceValue 2224 } 2225 return result 2226 } 2227 2228 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) CloneRaw() gotenobject.GotenObjectExt { 2229 return o.Clone() 2230 } 2231 2232 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) Merge(source *PolicySpec_AIAgentHandling_EdgeConnectivity) { 2233 if source, ok := source.GetType().(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh); ok { 2234 if dstOneOf, ok := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh); !ok || dstOneOf == nil { 2235 o.Type = &PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh{} 2236 } 2237 if source != nil { 2238 o := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSsh) 2239 if source.DeviceSsh != nil { 2240 if o.DeviceSsh == nil { 2241 o.DeviceSsh = new(PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) 2242 } 2243 o.DeviceSsh.Merge(source.DeviceSsh) 2244 } 2245 } 2246 } 2247 if source, ok := source.GetType().(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh); ok { 2248 if dstOneOf, ok := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh); !ok || dstOneOf == nil { 2249 o.Type = &PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh{} 2250 } 2251 if source != nil { 2252 o := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSsh) 2253 if source.ProxiesSsh != nil { 2254 if o.ProxiesSsh == nil { 2255 o.ProxiesSsh = new(PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) 2256 } 2257 o.ProxiesSsh.Merge(source.ProxiesSsh) 2258 } 2259 } 2260 } 2261 if source, ok := source.GetType().(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh); ok { 2262 if dstOneOf, ok := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh); !ok || dstOneOf == nil { 2263 o.Type = &PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh{} 2264 } 2265 if source != nil { 2266 o := o.Type.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSsh) 2267 if source.PodSsh != nil { 2268 if o.PodSsh == nil { 2269 o.PodSsh = new(PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) 2270 } 2271 o.PodSsh.Merge(source.PodSsh) 2272 } 2273 } 2274 } 2275 for _, sourceValue := range source.GetAllowedBins() { 2276 exists := false 2277 for _, currentValue := range o.AllowedBins { 2278 if currentValue == sourceValue { 2279 exists = true 2280 break 2281 } 2282 } 2283 if !exists { 2284 var newDstElement string 2285 newDstElement = sourceValue 2286 o.AllowedBins = append(o.AllowedBins, newDstElement) 2287 } 2288 } 2289 2290 } 2291 2292 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity) MergeRaw(source gotenobject.GotenObjectExt) { 2293 o.Merge(source.(*PolicySpec_AIAgentHandling_EdgeConnectivity)) 2294 } 2295 2296 func (o *PolicySpec_AIAgentHandling_Remediation) GotenObjectExt() {} 2297 2298 func (o *PolicySpec_AIAgentHandling_Remediation) MakeFullFieldMask() *PolicySpec_AIAgentHandling_Remediation_FieldMask { 2299 return FullPolicySpec_AIAgentHandling_Remediation_FieldMask() 2300 } 2301 2302 func (o *PolicySpec_AIAgentHandling_Remediation) MakeRawFullFieldMask() gotenobject.FieldMask { 2303 return FullPolicySpec_AIAgentHandling_Remediation_FieldMask() 2304 } 2305 2306 func (o *PolicySpec_AIAgentHandling_Remediation) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_Remediation) *PolicySpec_AIAgentHandling_Remediation_FieldMask { 2307 if o == nil && other == nil { 2308 return &PolicySpec_AIAgentHandling_Remediation_FieldMask{} 2309 } 2310 if o == nil || other == nil { 2311 return FullPolicySpec_AIAgentHandling_Remediation_FieldMask() 2312 } 2313 2314 res := &PolicySpec_AIAgentHandling_Remediation_FieldMask{} 2315 { 2316 _, leftSelected := o.Type.(*PolicySpec_AIAgentHandling_Remediation_FixInSsh) 2317 _, rightSelected := other.Type.(*PolicySpec_AIAgentHandling_Remediation_FixInSsh) 2318 if leftSelected == rightSelected { 2319 subMask := o.GetFixInSsh().MakeDiffFieldMask(other.GetFixInSsh()) 2320 if subMask.IsFull() { 2321 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingRemediation_FieldTerminalPath{selector: PolicySpecAIAgentHandlingRemediation_FieldPathSelectorFixInSsh}) 2322 } else { 2323 for _, subpath := range subMask.Paths { 2324 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingRemediation_FieldSubPath{selector: PolicySpecAIAgentHandlingRemediation_FieldPathSelectorFixInSsh, subPath: subpath}) 2325 } 2326 } 2327 } else { 2328 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingRemediation_FieldTerminalPath{selector: PolicySpecAIAgentHandlingRemediation_FieldPathSelectorFixInSsh}) 2329 } 2330 } 2331 { 2332 _, leftSelected := o.Type.(*PolicySpec_AIAgentHandling_Remediation_Reboot_) 2333 _, rightSelected := other.Type.(*PolicySpec_AIAgentHandling_Remediation_Reboot_) 2334 if leftSelected == rightSelected { 2335 subMask := o.GetReboot().MakeDiffFieldMask(other.GetReboot()) 2336 if subMask.IsFull() { 2337 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingRemediation_FieldTerminalPath{selector: PolicySpecAIAgentHandlingRemediation_FieldPathSelectorReboot}) 2338 } else { 2339 for _, subpath := range subMask.Paths { 2340 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingRemediation_FieldSubPath{selector: PolicySpecAIAgentHandlingRemediation_FieldPathSelectorReboot, subPath: subpath}) 2341 } 2342 } 2343 } else { 2344 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingRemediation_FieldTerminalPath{selector: PolicySpecAIAgentHandlingRemediation_FieldPathSelectorReboot}) 2345 } 2346 } 2347 return res 2348 } 2349 2350 func (o *PolicySpec_AIAgentHandling_Remediation) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2351 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_Remediation)) 2352 } 2353 2354 func (o *PolicySpec_AIAgentHandling_Remediation) Clone() *PolicySpec_AIAgentHandling_Remediation { 2355 if o == nil { 2356 return nil 2357 } 2358 result := &PolicySpec_AIAgentHandling_Remediation{} 2359 if o, ok := o.Type.(*PolicySpec_AIAgentHandling_Remediation_FixInSsh); ok { 2360 result.Type = (*PolicySpec_AIAgentHandling_Remediation_FixInSsh)(nil) 2361 if o != nil { 2362 result.Type = &PolicySpec_AIAgentHandling_Remediation_FixInSsh{} 2363 result := result.Type.(*PolicySpec_AIAgentHandling_Remediation_FixInSsh) 2364 result.FixInSsh = o.FixInSsh.Clone() 2365 } 2366 } 2367 if o, ok := o.Type.(*PolicySpec_AIAgentHandling_Remediation_Reboot_); ok { 2368 result.Type = (*PolicySpec_AIAgentHandling_Remediation_Reboot_)(nil) 2369 if o != nil { 2370 result.Type = &PolicySpec_AIAgentHandling_Remediation_Reboot_{} 2371 result := result.Type.(*PolicySpec_AIAgentHandling_Remediation_Reboot_) 2372 result.Reboot = o.Reboot.Clone() 2373 } 2374 } 2375 return result 2376 } 2377 2378 func (o *PolicySpec_AIAgentHandling_Remediation) CloneRaw() gotenobject.GotenObjectExt { 2379 return o.Clone() 2380 } 2381 2382 func (o *PolicySpec_AIAgentHandling_Remediation) Merge(source *PolicySpec_AIAgentHandling_Remediation) { 2383 if source, ok := source.GetType().(*PolicySpec_AIAgentHandling_Remediation_FixInSsh); ok { 2384 if dstOneOf, ok := o.Type.(*PolicySpec_AIAgentHandling_Remediation_FixInSsh); !ok || dstOneOf == nil { 2385 o.Type = &PolicySpec_AIAgentHandling_Remediation_FixInSsh{} 2386 } 2387 if source != nil { 2388 o := o.Type.(*PolicySpec_AIAgentHandling_Remediation_FixInSsh) 2389 if source.FixInSsh != nil { 2390 if o.FixInSsh == nil { 2391 o.FixInSsh = new(PolicySpec_AIAgentHandling_Remediation_FixInSSH) 2392 } 2393 o.FixInSsh.Merge(source.FixInSsh) 2394 } 2395 } 2396 } 2397 if source, ok := source.GetType().(*PolicySpec_AIAgentHandling_Remediation_Reboot_); ok { 2398 if dstOneOf, ok := o.Type.(*PolicySpec_AIAgentHandling_Remediation_Reboot_); !ok || dstOneOf == nil { 2399 o.Type = &PolicySpec_AIAgentHandling_Remediation_Reboot_{} 2400 } 2401 if source != nil { 2402 o := o.Type.(*PolicySpec_AIAgentHandling_Remediation_Reboot_) 2403 if source.Reboot != nil { 2404 if o.Reboot == nil { 2405 o.Reboot = new(PolicySpec_AIAgentHandling_Remediation_Reboot) 2406 } 2407 o.Reboot.Merge(source.Reboot) 2408 } 2409 } 2410 } 2411 } 2412 2413 func (o *PolicySpec_AIAgentHandling_Remediation) MergeRaw(source gotenobject.GotenObjectExt) { 2414 o.Merge(source.(*PolicySpec_AIAgentHandling_Remediation)) 2415 } 2416 2417 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) GotenObjectExt() {} 2418 2419 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) MakeFullFieldMask() *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask { 2420 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask() 2421 } 2422 2423 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) MakeRawFullFieldMask() gotenobject.FieldMask { 2424 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask() 2425 } 2426 2427 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask { 2428 if o == nil && other == nil { 2429 return &PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask{} 2430 } 2431 if o == nil || other == nil { 2432 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask() 2433 } 2434 2435 res := &PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH_FieldMask{} 2436 if o.GetClientName() != other.GetClientName() { 2437 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityDeviceSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityDeviceSSH_FieldPathSelectorClientName}) 2438 } 2439 return res 2440 } 2441 2442 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2443 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH)) 2444 } 2445 2446 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) Clone() *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH { 2447 if o == nil { 2448 return nil 2449 } 2450 result := &PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH{} 2451 result.ClientName = o.ClientName 2452 return result 2453 } 2454 2455 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) CloneRaw() gotenobject.GotenObjectExt { 2456 return o.Clone() 2457 } 2458 2459 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) Merge(source *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) { 2460 o.ClientName = source.GetClientName() 2461 } 2462 2463 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH) MergeRaw(source gotenobject.GotenObjectExt) { 2464 o.Merge(source.(*PolicySpec_AIAgentHandling_EdgeConnectivity_DeviceSSH)) 2465 } 2466 2467 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) GotenObjectExt() {} 2468 2469 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) MakeFullFieldMask() *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask { 2470 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask() 2471 } 2472 2473 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) MakeRawFullFieldMask() gotenobject.FieldMask { 2474 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask() 2475 } 2476 2477 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask { 2478 if o == nil && other == nil { 2479 return &PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask{} 2480 } 2481 if o == nil || other == nil { 2482 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask() 2483 } 2484 2485 res := &PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH_FieldMask{} 2486 if o.GetServiceDomain() != other.GetServiceDomain() { 2487 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldPathSelectorServiceDomain}) 2488 } 2489 if o.GetProviderNameTmpl() != other.GetProviderNameTmpl() { 2490 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldPathSelectorProviderNameTmpl}) 2491 } 2492 if o.GetClientName() != other.GetClientName() { 2493 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldPathSelectorClientName}) 2494 } 2495 if o.GetServiceName() != other.GetServiceName() { 2496 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityProxiesSSH_FieldPathSelectorServiceName}) 2497 } 2498 return res 2499 } 2500 2501 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2502 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH)) 2503 } 2504 2505 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) Clone() *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH { 2506 if o == nil { 2507 return nil 2508 } 2509 result := &PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH{} 2510 result.ServiceDomain = o.ServiceDomain 2511 result.ProviderNameTmpl = o.ProviderNameTmpl 2512 result.ClientName = o.ClientName 2513 result.ServiceName = o.ServiceName 2514 return result 2515 } 2516 2517 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) CloneRaw() gotenobject.GotenObjectExt { 2518 return o.Clone() 2519 } 2520 2521 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) Merge(source *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) { 2522 o.ServiceDomain = source.GetServiceDomain() 2523 o.ProviderNameTmpl = source.GetProviderNameTmpl() 2524 o.ClientName = source.GetClientName() 2525 o.ServiceName = source.GetServiceName() 2526 } 2527 2528 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH) MergeRaw(source gotenobject.GotenObjectExt) { 2529 o.Merge(source.(*PolicySpec_AIAgentHandling_EdgeConnectivity_ProxiesSSH)) 2530 } 2531 2532 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) GotenObjectExt() {} 2533 2534 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) MakeFullFieldMask() *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask { 2535 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask() 2536 } 2537 2538 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) MakeRawFullFieldMask() gotenobject.FieldMask { 2539 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask() 2540 } 2541 2542 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask { 2543 if o == nil && other == nil { 2544 return &PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask{} 2545 } 2546 if o == nil || other == nil { 2547 return FullPolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask() 2548 } 2549 2550 res := &PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH_FieldMask{} 2551 if o.GetClientName() != other.GetClientName() { 2552 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityPodSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityPodSSH_FieldPathSelectorClientName}) 2553 } 2554 if o.GetUsername() != other.GetUsername() { 2555 res.Paths = append(res.Paths, &PolicySpecAIAgentHandlingEdgeConnectivityPodSSH_FieldTerminalPath{selector: PolicySpecAIAgentHandlingEdgeConnectivityPodSSH_FieldPathSelectorUsername}) 2556 } 2557 return res 2558 } 2559 2560 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2561 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH)) 2562 } 2563 2564 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) Clone() *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH { 2565 if o == nil { 2566 return nil 2567 } 2568 result := &PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH{} 2569 result.ClientName = o.ClientName 2570 result.Username = o.Username 2571 return result 2572 } 2573 2574 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) CloneRaw() gotenobject.GotenObjectExt { 2575 return o.Clone() 2576 } 2577 2578 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) Merge(source *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) { 2579 o.ClientName = source.GetClientName() 2580 o.Username = source.GetUsername() 2581 } 2582 2583 func (o *PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH) MergeRaw(source gotenobject.GotenObjectExt) { 2584 o.Merge(source.(*PolicySpec_AIAgentHandling_EdgeConnectivity_PodSSH)) 2585 } 2586 2587 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) GotenObjectExt() {} 2588 2589 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) MakeFullFieldMask() *PolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask { 2590 return FullPolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask() 2591 } 2592 2593 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) MakeRawFullFieldMask() gotenobject.FieldMask { 2594 return FullPolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask() 2595 } 2596 2597 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_Remediation_FixInSSH) *PolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask { 2598 if o == nil && other == nil { 2599 return &PolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask{} 2600 } 2601 if o == nil || other == nil { 2602 return FullPolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask() 2603 } 2604 2605 res := &PolicySpec_AIAgentHandling_Remediation_FixInSSH_FieldMask{} 2606 return res 2607 } 2608 2609 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2610 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_Remediation_FixInSSH)) 2611 } 2612 2613 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) Clone() *PolicySpec_AIAgentHandling_Remediation_FixInSSH { 2614 if o == nil { 2615 return nil 2616 } 2617 result := &PolicySpec_AIAgentHandling_Remediation_FixInSSH{} 2618 return result 2619 } 2620 2621 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) CloneRaw() gotenobject.GotenObjectExt { 2622 return o.Clone() 2623 } 2624 2625 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) Merge(source *PolicySpec_AIAgentHandling_Remediation_FixInSSH) { 2626 } 2627 2628 func (o *PolicySpec_AIAgentHandling_Remediation_FixInSSH) MergeRaw(source gotenobject.GotenObjectExt) { 2629 o.Merge(source.(*PolicySpec_AIAgentHandling_Remediation_FixInSSH)) 2630 } 2631 2632 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) GotenObjectExt() {} 2633 2634 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) MakeFullFieldMask() *PolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask { 2635 return FullPolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask() 2636 } 2637 2638 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) MakeRawFullFieldMask() gotenobject.FieldMask { 2639 return FullPolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask() 2640 } 2641 2642 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) MakeDiffFieldMask(other *PolicySpec_AIAgentHandling_Remediation_Reboot) *PolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask { 2643 if o == nil && other == nil { 2644 return &PolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask{} 2645 } 2646 if o == nil || other == nil { 2647 return FullPolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask() 2648 } 2649 2650 res := &PolicySpec_AIAgentHandling_Remediation_Reboot_FieldMask{} 2651 return res 2652 } 2653 2654 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2655 return o.MakeDiffFieldMask(other.(*PolicySpec_AIAgentHandling_Remediation_Reboot)) 2656 } 2657 2658 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) Clone() *PolicySpec_AIAgentHandling_Remediation_Reboot { 2659 if o == nil { 2660 return nil 2661 } 2662 result := &PolicySpec_AIAgentHandling_Remediation_Reboot{} 2663 return result 2664 } 2665 2666 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) CloneRaw() gotenobject.GotenObjectExt { 2667 return o.Clone() 2668 } 2669 2670 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) Merge(source *PolicySpec_AIAgentHandling_Remediation_Reboot) { 2671 } 2672 2673 func (o *PolicySpec_AIAgentHandling_Remediation_Reboot) MergeRaw(source gotenobject.GotenObjectExt) { 2674 o.Merge(source.(*PolicySpec_AIAgentHandling_Remediation_Reboot)) 2675 } 2676 2677 func (o *NotificationChannelSpec) GotenObjectExt() {} 2678 2679 func (o *NotificationChannelSpec) MakeFullFieldMask() *NotificationChannelSpec_FieldMask { 2680 return FullNotificationChannelSpec_FieldMask() 2681 } 2682 2683 func (o *NotificationChannelSpec) MakeRawFullFieldMask() gotenobject.FieldMask { 2684 return FullNotificationChannelSpec_FieldMask() 2685 } 2686 2687 func (o *NotificationChannelSpec) MakeDiffFieldMask(other *NotificationChannelSpec) *NotificationChannelSpec_FieldMask { 2688 if o == nil && other == nil { 2689 return &NotificationChannelSpec_FieldMask{} 2690 } 2691 if o == nil || other == nil { 2692 return FullNotificationChannelSpec_FieldMask() 2693 } 2694 2695 res := &NotificationChannelSpec_FieldMask{} 2696 if o.GetEnabled() != other.GetEnabled() { 2697 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorEnabled}) 2698 } 2699 if o.GetType() != other.GetType() { 2700 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorType}) 2701 } 2702 2703 if len(o.GetEnabledKinds()) == len(other.GetEnabledKinds()) { 2704 for i, lValue := range o.GetEnabledKinds() { 2705 rValue := other.GetEnabledKinds()[i] 2706 if lValue != rValue { 2707 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorEnabledKinds}) 2708 break 2709 } 2710 } 2711 } else { 2712 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorEnabledKinds}) 2713 } 2714 { 2715 subMask := o.GetEmail().MakeDiffFieldMask(other.GetEmail()) 2716 if subMask.IsFull() { 2717 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorEmail}) 2718 } else { 2719 for _, subpath := range subMask.Paths { 2720 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldSubPath{selector: NotificationChannelSpec_FieldPathSelectorEmail, subPath: subpath}) 2721 } 2722 } 2723 } 2724 { 2725 subMask := o.GetSlack().MakeDiffFieldMask(other.GetSlack()) 2726 if subMask.IsFull() { 2727 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorSlack}) 2728 } else { 2729 for _, subpath := range subMask.Paths { 2730 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldSubPath{selector: NotificationChannelSpec_FieldPathSelectorSlack, subPath: subpath}) 2731 } 2732 } 2733 } 2734 { 2735 subMask := o.GetWebhook().MakeDiffFieldMask(other.GetWebhook()) 2736 if subMask.IsFull() { 2737 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorWebhook}) 2738 } else { 2739 for _, subpath := range subMask.Paths { 2740 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldSubPath{selector: NotificationChannelSpec_FieldPathSelectorWebhook, subPath: subpath}) 2741 } 2742 } 2743 } 2744 if o.GetNotificationLanguageCode() != other.GetNotificationLanguageCode() { 2745 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorNotificationLanguageCode}) 2746 } 2747 if !proto.Equal(o.GetNotificationMask(), other.GetNotificationMask()) { 2748 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorNotificationMask}) 2749 } 2750 if o.GetMaxAlertBodiesInMsg() != other.GetMaxAlertBodiesInMsg() { 2751 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorMaxAlertBodiesInMsg}) 2752 } 2753 if o.GetPutOnlyAlertsCounterWhenOverflowing() != other.GetPutOnlyAlertsCounterWhenOverflowing() { 2754 res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorPutOnlyAlertsCounterWhenOverflowing}) 2755 } 2756 return res 2757 } 2758 2759 func (o *NotificationChannelSpec) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2760 return o.MakeDiffFieldMask(other.(*NotificationChannelSpec)) 2761 } 2762 2763 func (o *NotificationChannelSpec) Clone() *NotificationChannelSpec { 2764 if o == nil { 2765 return nil 2766 } 2767 result := &NotificationChannelSpec{} 2768 result.Enabled = o.Enabled 2769 result.Type = o.Type 2770 result.EnabledKinds = make([]NotificationChannelSpec_EventKind, len(o.EnabledKinds)) 2771 for i, sourceValue := range o.EnabledKinds { 2772 result.EnabledKinds[i] = sourceValue 2773 } 2774 result.Email = o.Email.Clone() 2775 result.Slack = o.Slack.Clone() 2776 result.Webhook = o.Webhook.Clone() 2777 result.NotificationLanguageCode = o.NotificationLanguageCode 2778 result.NotificationMask = proto.Clone(o.NotificationMask).(*fieldmaskpb.FieldMask) 2779 result.MaxAlertBodiesInMsg = o.MaxAlertBodiesInMsg 2780 result.PutOnlyAlertsCounterWhenOverflowing = o.PutOnlyAlertsCounterWhenOverflowing 2781 return result 2782 } 2783 2784 func (o *NotificationChannelSpec) CloneRaw() gotenobject.GotenObjectExt { 2785 return o.Clone() 2786 } 2787 2788 func (o *NotificationChannelSpec) Merge(source *NotificationChannelSpec) { 2789 o.Enabled = source.GetEnabled() 2790 o.Type = source.GetType() 2791 for _, sourceValue := range source.GetEnabledKinds() { 2792 exists := false 2793 for _, currentValue := range o.EnabledKinds { 2794 if currentValue == sourceValue { 2795 exists = true 2796 break 2797 } 2798 } 2799 if !exists { 2800 var newDstElement NotificationChannelSpec_EventKind 2801 newDstElement = sourceValue 2802 o.EnabledKinds = append(o.EnabledKinds, newDstElement) 2803 } 2804 } 2805 2806 if source.GetEmail() != nil { 2807 if o.Email == nil { 2808 o.Email = new(NotificationChannelSpec_Email) 2809 } 2810 o.Email.Merge(source.GetEmail()) 2811 } 2812 if source.GetSlack() != nil { 2813 if o.Slack == nil { 2814 o.Slack = new(NotificationChannelSpec_Slack) 2815 } 2816 o.Slack.Merge(source.GetSlack()) 2817 } 2818 if source.GetWebhook() != nil { 2819 if o.Webhook == nil { 2820 o.Webhook = new(NotificationChannelSpec_Webhook) 2821 } 2822 o.Webhook.Merge(source.GetWebhook()) 2823 } 2824 o.NotificationLanguageCode = source.GetNotificationLanguageCode() 2825 if source.GetNotificationMask() != nil { 2826 if o.NotificationMask == nil { 2827 o.NotificationMask = new(fieldmaskpb.FieldMask) 2828 } 2829 proto.Merge(o.NotificationMask, source.GetNotificationMask()) 2830 } 2831 o.MaxAlertBodiesInMsg = source.GetMaxAlertBodiesInMsg() 2832 o.PutOnlyAlertsCounterWhenOverflowing = source.GetPutOnlyAlertsCounterWhenOverflowing() 2833 } 2834 2835 func (o *NotificationChannelSpec) MergeRaw(source gotenobject.GotenObjectExt) { 2836 o.Merge(source.(*NotificationChannelSpec)) 2837 } 2838 2839 func (o *NotificationChannelSpec_Email) GotenObjectExt() {} 2840 2841 func (o *NotificationChannelSpec_Email) MakeFullFieldMask() *NotificationChannelSpec_Email_FieldMask { 2842 return FullNotificationChannelSpec_Email_FieldMask() 2843 } 2844 2845 func (o *NotificationChannelSpec_Email) MakeRawFullFieldMask() gotenobject.FieldMask { 2846 return FullNotificationChannelSpec_Email_FieldMask() 2847 } 2848 2849 func (o *NotificationChannelSpec_Email) MakeDiffFieldMask(other *NotificationChannelSpec_Email) *NotificationChannelSpec_Email_FieldMask { 2850 if o == nil && other == nil { 2851 return &NotificationChannelSpec_Email_FieldMask{} 2852 } 2853 if o == nil || other == nil { 2854 return FullNotificationChannelSpec_Email_FieldMask() 2855 } 2856 2857 res := &NotificationChannelSpec_Email_FieldMask{} 2858 2859 if len(o.GetAddresses()) == len(other.GetAddresses()) { 2860 for i, lValue := range o.GetAddresses() { 2861 rValue := other.GetAddresses()[i] 2862 if lValue != rValue { 2863 res.Paths = append(res.Paths, &NotificationChannelSpecEmail_FieldTerminalPath{selector: NotificationChannelSpecEmail_FieldPathSelectorAddresses}) 2864 break 2865 } 2866 } 2867 } else { 2868 res.Paths = append(res.Paths, &NotificationChannelSpecEmail_FieldTerminalPath{selector: NotificationChannelSpecEmail_FieldPathSelectorAddresses}) 2869 } 2870 return res 2871 } 2872 2873 func (o *NotificationChannelSpec_Email) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2874 return o.MakeDiffFieldMask(other.(*NotificationChannelSpec_Email)) 2875 } 2876 2877 func (o *NotificationChannelSpec_Email) Clone() *NotificationChannelSpec_Email { 2878 if o == nil { 2879 return nil 2880 } 2881 result := &NotificationChannelSpec_Email{} 2882 result.Addresses = make([]string, len(o.Addresses)) 2883 for i, sourceValue := range o.Addresses { 2884 result.Addresses[i] = sourceValue 2885 } 2886 return result 2887 } 2888 2889 func (o *NotificationChannelSpec_Email) CloneRaw() gotenobject.GotenObjectExt { 2890 return o.Clone() 2891 } 2892 2893 func (o *NotificationChannelSpec_Email) Merge(source *NotificationChannelSpec_Email) { 2894 for _, sourceValue := range source.GetAddresses() { 2895 exists := false 2896 for _, currentValue := range o.Addresses { 2897 if currentValue == sourceValue { 2898 exists = true 2899 break 2900 } 2901 } 2902 if !exists { 2903 var newDstElement string 2904 newDstElement = sourceValue 2905 o.Addresses = append(o.Addresses, newDstElement) 2906 } 2907 } 2908 2909 } 2910 2911 func (o *NotificationChannelSpec_Email) MergeRaw(source gotenobject.GotenObjectExt) { 2912 o.Merge(source.(*NotificationChannelSpec_Email)) 2913 } 2914 2915 func (o *NotificationChannelSpec_Slack) GotenObjectExt() {} 2916 2917 func (o *NotificationChannelSpec_Slack) MakeFullFieldMask() *NotificationChannelSpec_Slack_FieldMask { 2918 return FullNotificationChannelSpec_Slack_FieldMask() 2919 } 2920 2921 func (o *NotificationChannelSpec_Slack) MakeRawFullFieldMask() gotenobject.FieldMask { 2922 return FullNotificationChannelSpec_Slack_FieldMask() 2923 } 2924 2925 func (o *NotificationChannelSpec_Slack) MakeDiffFieldMask(other *NotificationChannelSpec_Slack) *NotificationChannelSpec_Slack_FieldMask { 2926 if o == nil && other == nil { 2927 return &NotificationChannelSpec_Slack_FieldMask{} 2928 } 2929 if o == nil || other == nil { 2930 return FullNotificationChannelSpec_Slack_FieldMask() 2931 } 2932 2933 res := &NotificationChannelSpec_Slack_FieldMask{} 2934 if o.GetIncomingWebhook() != other.GetIncomingWebhook() { 2935 res.Paths = append(res.Paths, &NotificationChannelSpecSlack_FieldTerminalPath{selector: NotificationChannelSpecSlack_FieldPathSelectorIncomingWebhook}) 2936 } 2937 return res 2938 } 2939 2940 func (o *NotificationChannelSpec_Slack) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2941 return o.MakeDiffFieldMask(other.(*NotificationChannelSpec_Slack)) 2942 } 2943 2944 func (o *NotificationChannelSpec_Slack) Clone() *NotificationChannelSpec_Slack { 2945 if o == nil { 2946 return nil 2947 } 2948 result := &NotificationChannelSpec_Slack{} 2949 result.IncomingWebhook = o.IncomingWebhook 2950 return result 2951 } 2952 2953 func (o *NotificationChannelSpec_Slack) CloneRaw() gotenobject.GotenObjectExt { 2954 return o.Clone() 2955 } 2956 2957 func (o *NotificationChannelSpec_Slack) Merge(source *NotificationChannelSpec_Slack) { 2958 o.IncomingWebhook = source.GetIncomingWebhook() 2959 } 2960 2961 func (o *NotificationChannelSpec_Slack) MergeRaw(source gotenobject.GotenObjectExt) { 2962 o.Merge(source.(*NotificationChannelSpec_Slack)) 2963 } 2964 2965 func (o *NotificationChannelSpec_PagerDuty) GotenObjectExt() {} 2966 2967 func (o *NotificationChannelSpec_PagerDuty) MakeFullFieldMask() *NotificationChannelSpec_PagerDuty_FieldMask { 2968 return FullNotificationChannelSpec_PagerDuty_FieldMask() 2969 } 2970 2971 func (o *NotificationChannelSpec_PagerDuty) MakeRawFullFieldMask() gotenobject.FieldMask { 2972 return FullNotificationChannelSpec_PagerDuty_FieldMask() 2973 } 2974 2975 func (o *NotificationChannelSpec_PagerDuty) MakeDiffFieldMask(other *NotificationChannelSpec_PagerDuty) *NotificationChannelSpec_PagerDuty_FieldMask { 2976 if o == nil && other == nil { 2977 return &NotificationChannelSpec_PagerDuty_FieldMask{} 2978 } 2979 if o == nil || other == nil { 2980 return FullNotificationChannelSpec_PagerDuty_FieldMask() 2981 } 2982 2983 res := &NotificationChannelSpec_PagerDuty_FieldMask{} 2984 if o.GetServiceKey() != other.GetServiceKey() { 2985 res.Paths = append(res.Paths, &NotificationChannelSpecPagerDuty_FieldTerminalPath{selector: NotificationChannelSpecPagerDuty_FieldPathSelectorServiceKey}) 2986 } 2987 return res 2988 } 2989 2990 func (o *NotificationChannelSpec_PagerDuty) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2991 return o.MakeDiffFieldMask(other.(*NotificationChannelSpec_PagerDuty)) 2992 } 2993 2994 func (o *NotificationChannelSpec_PagerDuty) Clone() *NotificationChannelSpec_PagerDuty { 2995 if o == nil { 2996 return nil 2997 } 2998 result := &NotificationChannelSpec_PagerDuty{} 2999 result.ServiceKey = o.ServiceKey 3000 return result 3001 } 3002 3003 func (o *NotificationChannelSpec_PagerDuty) CloneRaw() gotenobject.GotenObjectExt { 3004 return o.Clone() 3005 } 3006 3007 func (o *NotificationChannelSpec_PagerDuty) Merge(source *NotificationChannelSpec_PagerDuty) { 3008 o.ServiceKey = source.GetServiceKey() 3009 } 3010 3011 func (o *NotificationChannelSpec_PagerDuty) MergeRaw(source gotenobject.GotenObjectExt) { 3012 o.Merge(source.(*NotificationChannelSpec_PagerDuty)) 3013 } 3014 3015 func (o *NotificationChannelSpec_Webhook) GotenObjectExt() {} 3016 3017 func (o *NotificationChannelSpec_Webhook) MakeFullFieldMask() *NotificationChannelSpec_Webhook_FieldMask { 3018 return FullNotificationChannelSpec_Webhook_FieldMask() 3019 } 3020 3021 func (o *NotificationChannelSpec_Webhook) MakeRawFullFieldMask() gotenobject.FieldMask { 3022 return FullNotificationChannelSpec_Webhook_FieldMask() 3023 } 3024 3025 func (o *NotificationChannelSpec_Webhook) MakeDiffFieldMask(other *NotificationChannelSpec_Webhook) *NotificationChannelSpec_Webhook_FieldMask { 3026 if o == nil && other == nil { 3027 return &NotificationChannelSpec_Webhook_FieldMask{} 3028 } 3029 if o == nil || other == nil { 3030 return FullNotificationChannelSpec_Webhook_FieldMask() 3031 } 3032 3033 res := &NotificationChannelSpec_Webhook_FieldMask{} 3034 if o.GetUrl() != other.GetUrl() { 3035 res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorUrl}) 3036 } 3037 3038 if len(o.GetHeaders()) == len(other.GetHeaders()) { 3039 for i, lValue := range o.GetHeaders() { 3040 rValue := other.GetHeaders()[i] 3041 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 3042 res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorHeaders}) 3043 break 3044 } 3045 } 3046 } else { 3047 res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorHeaders}) 3048 } 3049 if o.GetMaxMessageSizeMb() != other.GetMaxMessageSizeMb() { 3050 res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorMaxMessageSizeMb}) 3051 } 3052 return res 3053 } 3054 3055 func (o *NotificationChannelSpec_Webhook) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 3056 return o.MakeDiffFieldMask(other.(*NotificationChannelSpec_Webhook)) 3057 } 3058 3059 func (o *NotificationChannelSpec_Webhook) Clone() *NotificationChannelSpec_Webhook { 3060 if o == nil { 3061 return nil 3062 } 3063 result := &NotificationChannelSpec_Webhook{} 3064 result.Url = o.Url 3065 result.Headers = make([]*NotificationChannelSpec_Webhook_Header, len(o.Headers)) 3066 for i, sourceValue := range o.Headers { 3067 result.Headers[i] = sourceValue.Clone() 3068 } 3069 result.MaxMessageSizeMb = o.MaxMessageSizeMb 3070 return result 3071 } 3072 3073 func (o *NotificationChannelSpec_Webhook) CloneRaw() gotenobject.GotenObjectExt { 3074 return o.Clone() 3075 } 3076 3077 func (o *NotificationChannelSpec_Webhook) Merge(source *NotificationChannelSpec_Webhook) { 3078 o.Url = source.GetUrl() 3079 for _, sourceValue := range source.GetHeaders() { 3080 exists := false 3081 for _, currentValue := range o.Headers { 3082 if proto.Equal(sourceValue, currentValue) { 3083 exists = true 3084 break 3085 } 3086 } 3087 if !exists { 3088 var newDstElement *NotificationChannelSpec_Webhook_Header 3089 if sourceValue != nil { 3090 newDstElement = new(NotificationChannelSpec_Webhook_Header) 3091 newDstElement.Merge(sourceValue) 3092 } 3093 o.Headers = append(o.Headers, newDstElement) 3094 } 3095 } 3096 3097 o.MaxMessageSizeMb = source.GetMaxMessageSizeMb() 3098 } 3099 3100 func (o *NotificationChannelSpec_Webhook) MergeRaw(source gotenobject.GotenObjectExt) { 3101 o.Merge(source.(*NotificationChannelSpec_Webhook)) 3102 } 3103 3104 func (o *NotificationChannelSpec_Webhook_Header) GotenObjectExt() {} 3105 3106 func (o *NotificationChannelSpec_Webhook_Header) MakeFullFieldMask() *NotificationChannelSpec_Webhook_Header_FieldMask { 3107 return FullNotificationChannelSpec_Webhook_Header_FieldMask() 3108 } 3109 3110 func (o *NotificationChannelSpec_Webhook_Header) MakeRawFullFieldMask() gotenobject.FieldMask { 3111 return FullNotificationChannelSpec_Webhook_Header_FieldMask() 3112 } 3113 3114 func (o *NotificationChannelSpec_Webhook_Header) MakeDiffFieldMask(other *NotificationChannelSpec_Webhook_Header) *NotificationChannelSpec_Webhook_Header_FieldMask { 3115 if o == nil && other == nil { 3116 return &NotificationChannelSpec_Webhook_Header_FieldMask{} 3117 } 3118 if o == nil || other == nil { 3119 return FullNotificationChannelSpec_Webhook_Header_FieldMask() 3120 } 3121 3122 res := &NotificationChannelSpec_Webhook_Header_FieldMask{} 3123 if o.GetKey() != other.GetKey() { 3124 res.Paths = append(res.Paths, &NotificationChannelSpecWebhookHeader_FieldTerminalPath{selector: NotificationChannelSpecWebhookHeader_FieldPathSelectorKey}) 3125 } 3126 if o.GetValue() != other.GetValue() { 3127 res.Paths = append(res.Paths, &NotificationChannelSpecWebhookHeader_FieldTerminalPath{selector: NotificationChannelSpecWebhookHeader_FieldPathSelectorValue}) 3128 } 3129 return res 3130 } 3131 3132 func (o *NotificationChannelSpec_Webhook_Header) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 3133 return o.MakeDiffFieldMask(other.(*NotificationChannelSpec_Webhook_Header)) 3134 } 3135 3136 func (o *NotificationChannelSpec_Webhook_Header) Clone() *NotificationChannelSpec_Webhook_Header { 3137 if o == nil { 3138 return nil 3139 } 3140 result := &NotificationChannelSpec_Webhook_Header{} 3141 result.Key = o.Key 3142 result.Value = o.Value 3143 return result 3144 } 3145 3146 func (o *NotificationChannelSpec_Webhook_Header) CloneRaw() gotenobject.GotenObjectExt { 3147 return o.Clone() 3148 } 3149 3150 func (o *NotificationChannelSpec_Webhook_Header) Merge(source *NotificationChannelSpec_Webhook_Header) { 3151 o.Key = source.GetKey() 3152 o.Value = source.GetValue() 3153 } 3154 3155 func (o *NotificationChannelSpec_Webhook_Header) MergeRaw(source gotenobject.GotenObjectExt) { 3156 o.Merge(source.(*NotificationChannelSpec_Webhook_Header)) 3157 } 3158 3159 func (o *AlertingThreshold) GotenObjectExt() {} 3160 3161 func (o *AlertingThreshold) MakeFullFieldMask() *AlertingThreshold_FieldMask { 3162 return FullAlertingThreshold_FieldMask() 3163 } 3164 3165 func (o *AlertingThreshold) MakeRawFullFieldMask() gotenobject.FieldMask { 3166 return FullAlertingThreshold_FieldMask() 3167 } 3168 3169 func (o *AlertingThreshold) MakeDiffFieldMask(other *AlertingThreshold) *AlertingThreshold_FieldMask { 3170 if o == nil && other == nil { 3171 return &AlertingThreshold_FieldMask{} 3172 } 3173 if o == nil || other == nil { 3174 return FullAlertingThreshold_FieldMask() 3175 } 3176 3177 res := &AlertingThreshold_FieldMask{} 3178 if o.GetValue() != other.GetValue() { 3179 res.Paths = append(res.Paths, &AlertingThreshold_FieldTerminalPath{selector: AlertingThreshold_FieldPathSelectorValue}) 3180 } 3181 if o.GetIsInclusive() != other.GetIsInclusive() { 3182 res.Paths = append(res.Paths, &AlertingThreshold_FieldTerminalPath{selector: AlertingThreshold_FieldPathSelectorIsInclusive}) 3183 } 3184 return res 3185 } 3186 3187 func (o *AlertingThreshold) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 3188 return o.MakeDiffFieldMask(other.(*AlertingThreshold)) 3189 } 3190 3191 func (o *AlertingThreshold) Clone() *AlertingThreshold { 3192 if o == nil { 3193 return nil 3194 } 3195 result := &AlertingThreshold{} 3196 result.Value = o.Value 3197 result.IsInclusive = o.IsInclusive 3198 return result 3199 } 3200 3201 func (o *AlertingThreshold) CloneRaw() gotenobject.GotenObjectExt { 3202 return o.Clone() 3203 } 3204 3205 func (o *AlertingThreshold) Merge(source *AlertingThreshold) { 3206 o.Value = source.GetValue() 3207 o.IsInclusive = source.GetIsInclusive() 3208 } 3209 3210 func (o *AlertingThreshold) MergeRaw(source gotenobject.GotenObjectExt) { 3211 o.Merge(source.(*AlertingThreshold)) 3212 }