github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/resources/v4/metric_descriptor/metric_descriptor.pb.object_ext.go (about) 1 // Code generated by protoc-gen-goten-object 2 // File: edgelq/monitoring/proto/v4/metric_descriptor.proto 3 // DO NOT EDIT!!! 4 5 package metric_descriptor 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 api "github.com/cloudwan/edgelq-sdk/common/api" 20 common "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/common" 21 monitored_resource_descriptor "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/monitored_resource_descriptor" 22 project "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/project" 23 meta "github.com/cloudwan/goten-sdk/types/meta" 24 durationpb "google.golang.org/protobuf/types/known/durationpb" 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 _ = api.LaunchStage(0) 41 _ = &common.LabelDescriptor{} 42 _ = &monitored_resource_descriptor.MonitoredResourceDescriptor{} 43 _ = &project.Project{} 44 _ = &durationpb.Duration{} 45 _ = &meta.Meta{} 46 ) 47 48 func (o *MetricDescriptor) GotenObjectExt() {} 49 50 func (o *MetricDescriptor) MakeFullFieldMask() *MetricDescriptor_FieldMask { 51 return FullMetricDescriptor_FieldMask() 52 } 53 54 func (o *MetricDescriptor) MakeRawFullFieldMask() gotenobject.FieldMask { 55 return FullMetricDescriptor_FieldMask() 56 } 57 58 func (o *MetricDescriptor) MakeDiffFieldMask(other *MetricDescriptor) *MetricDescriptor_FieldMask { 59 if o == nil && other == nil { 60 return &MetricDescriptor_FieldMask{} 61 } 62 if o == nil || other == nil { 63 return FullMetricDescriptor_FieldMask() 64 } 65 66 res := &MetricDescriptor_FieldMask{} 67 if o.GetName().String() != other.GetName().String() { 68 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorName}) 69 } 70 { 71 subMask := o.GetMetadata().MakeDiffFieldMask(other.GetMetadata()) 72 if subMask.IsFull() { 73 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorMetadata}) 74 } else { 75 for _, subpath := range subMask.Paths { 76 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorMetadata, subPath: subpath}) 77 } 78 } 79 } 80 if o.GetType() != other.GetType() { 81 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorType}) 82 } 83 84 if len(o.GetResourceTypes()) == len(other.GetResourceTypes()) { 85 for i, lValue := range o.GetResourceTypes() { 86 rValue := other.GetResourceTypes()[i] 87 if lValue != rValue { 88 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorResourceTypes}) 89 break 90 } 91 } 92 } else { 93 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorResourceTypes}) 94 } 95 96 if len(o.GetLabels()) == len(other.GetLabels()) { 97 for i, lValue := range o.GetLabels() { 98 rValue := other.GetLabels()[i] 99 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 100 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorLabels}) 101 break 102 } 103 } 104 } else { 105 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorLabels}) 106 } 107 if o.GetMetricKind() != other.GetMetricKind() { 108 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorMetricKind}) 109 } 110 if o.GetValueType() != other.GetValueType() { 111 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorValueType}) 112 } 113 if o.GetUnit() != other.GetUnit() { 114 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorUnit}) 115 } 116 if o.GetDescription() != other.GetDescription() { 117 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorDescription}) 118 } 119 if o.GetDisplayName() != other.GetDisplayName() { 120 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorDisplayName}) 121 } 122 { 123 subMask := o.GetMetricDescriptorMetadata().MakeDiffFieldMask(other.GetMetricDescriptorMetadata()) 124 if subMask.IsFull() { 125 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorMetricDescriptorMetadata}) 126 } else { 127 for _, subpath := range subMask.Paths { 128 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorMetricDescriptorMetadata, subPath: subpath}) 129 } 130 } 131 } 132 { 133 subMask := o.GetDistributionBucketOptions().MakeDiffFieldMask(other.GetDistributionBucketOptions()) 134 if subMask.IsFull() { 135 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorDistributionBucketOptions}) 136 } else { 137 for _, subpath := range subMask.Paths { 138 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorDistributionBucketOptions, subPath: subpath}) 139 } 140 } 141 } 142 143 if len(o.GetPromotedLabelKeySets()) == len(other.GetPromotedLabelKeySets()) { 144 for i, lValue := range o.GetPromotedLabelKeySets() { 145 rValue := other.GetPromotedLabelKeySets()[i] 146 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 147 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorPromotedLabelKeySets}) 148 break 149 } 150 } 151 } else { 152 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorPromotedLabelKeySets}) 153 } 154 { 155 subMask := o.GetIndexSpec().MakeDiffFieldMask(other.GetIndexSpec()) 156 if subMask.IsFull() { 157 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorIndexSpec}) 158 } else { 159 for _, subpath := range subMask.Paths { 160 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorIndexSpec, subPath: subpath}) 161 } 162 } 163 } 164 { 165 subMask := o.GetIndices().MakeDiffFieldMask(other.GetIndices()) 166 if subMask.IsFull() { 167 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorIndices}) 168 } else { 169 for _, subpath := range subMask.Paths { 170 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorIndices, subPath: subpath}) 171 } 172 } 173 } 174 { 175 subMask := o.GetStorageConfig().MakeDiffFieldMask(other.GetStorageConfig()) 176 if subMask.IsFull() { 177 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorStorageConfig}) 178 } else { 179 for _, subpath := range subMask.Paths { 180 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorStorageConfig, subPath: subpath}) 181 } 182 } 183 } 184 { 185 subMask := o.GetBinaryIndices().MakeDiffFieldMask(other.GetBinaryIndices()) 186 if subMask.IsFull() { 187 res.Paths = append(res.Paths, &MetricDescriptor_FieldTerminalPath{selector: MetricDescriptor_FieldPathSelectorBinaryIndices}) 188 } else { 189 for _, subpath := range subMask.Paths { 190 res.Paths = append(res.Paths, &MetricDescriptor_FieldSubPath{selector: MetricDescriptor_FieldPathSelectorBinaryIndices, subPath: subpath}) 191 } 192 } 193 } 194 return res 195 } 196 197 func (o *MetricDescriptor) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 198 return o.MakeDiffFieldMask(other.(*MetricDescriptor)) 199 } 200 201 func (o *MetricDescriptor) Clone() *MetricDescriptor { 202 if o == nil { 203 return nil 204 } 205 result := &MetricDescriptor{} 206 if o.Name == nil { 207 result.Name = nil 208 } else if data, err := o.Name.ProtoString(); err != nil { 209 panic(err) 210 } else { 211 result.Name = &Name{} 212 if err := result.Name.ParseProtoString(data); err != nil { 213 panic(err) 214 } 215 } 216 result.Metadata = o.Metadata.Clone() 217 result.Type = o.Type 218 result.ResourceTypes = make([]string, len(o.ResourceTypes)) 219 for i, sourceValue := range o.ResourceTypes { 220 result.ResourceTypes[i] = sourceValue 221 } 222 result.Labels = make([]*common.LabelDescriptor, len(o.Labels)) 223 for i, sourceValue := range o.Labels { 224 result.Labels[i] = sourceValue.Clone() 225 } 226 result.MetricKind = o.MetricKind 227 result.ValueType = o.ValueType 228 result.Unit = o.Unit 229 result.Description = o.Description 230 result.DisplayName = o.DisplayName 231 result.MetricDescriptorMetadata = o.MetricDescriptorMetadata.Clone() 232 result.DistributionBucketOptions = o.DistributionBucketOptions.Clone() 233 result.PromotedLabelKeySets = make([]*common.LabelKeySet, len(o.PromotedLabelKeySets)) 234 for i, sourceValue := range o.PromotedLabelKeySets { 235 result.PromotedLabelKeySets[i] = sourceValue.Clone() 236 } 237 result.IndexSpec = o.IndexSpec.Clone() 238 result.Indices = o.Indices.Clone() 239 result.StorageConfig = o.StorageConfig.Clone() 240 result.BinaryIndices = o.BinaryIndices.Clone() 241 return result 242 } 243 244 func (o *MetricDescriptor) CloneRaw() gotenobject.GotenObjectExt { 245 return o.Clone() 246 } 247 248 func (o *MetricDescriptor) Merge(source *MetricDescriptor) { 249 if source.GetName() != nil { 250 if data, err := source.GetName().ProtoString(); err != nil { 251 panic(err) 252 } else { 253 o.Name = &Name{} 254 if err := o.Name.ParseProtoString(data); err != nil { 255 panic(err) 256 } 257 } 258 } else { 259 o.Name = nil 260 } 261 if source.GetMetadata() != nil { 262 if o.Metadata == nil { 263 o.Metadata = new(meta.Meta) 264 } 265 o.Metadata.Merge(source.GetMetadata()) 266 } 267 o.Type = source.GetType() 268 for _, sourceValue := range source.GetResourceTypes() { 269 exists := false 270 for _, currentValue := range o.ResourceTypes { 271 if currentValue == sourceValue { 272 exists = true 273 break 274 } 275 } 276 if !exists { 277 var newDstElement string 278 newDstElement = sourceValue 279 o.ResourceTypes = append(o.ResourceTypes, newDstElement) 280 } 281 } 282 283 for _, sourceValue := range source.GetLabels() { 284 exists := false 285 for _, currentValue := range o.Labels { 286 if proto.Equal(sourceValue, currentValue) { 287 exists = true 288 break 289 } 290 } 291 if !exists { 292 var newDstElement *common.LabelDescriptor 293 if sourceValue != nil { 294 newDstElement = new(common.LabelDescriptor) 295 newDstElement.Merge(sourceValue) 296 } 297 o.Labels = append(o.Labels, newDstElement) 298 } 299 } 300 301 o.MetricKind = source.GetMetricKind() 302 o.ValueType = source.GetValueType() 303 o.Unit = source.GetUnit() 304 o.Description = source.GetDescription() 305 o.DisplayName = source.GetDisplayName() 306 if source.GetMetricDescriptorMetadata() != nil { 307 if o.MetricDescriptorMetadata == nil { 308 o.MetricDescriptorMetadata = new(MetricDescriptor_MetricDescriptorMetadata) 309 } 310 o.MetricDescriptorMetadata.Merge(source.GetMetricDescriptorMetadata()) 311 } 312 if source.GetDistributionBucketOptions() != nil { 313 if o.DistributionBucketOptions == nil { 314 o.DistributionBucketOptions = new(common.Distribution_BucketOptions) 315 } 316 o.DistributionBucketOptions.Merge(source.GetDistributionBucketOptions()) 317 } 318 for _, sourceValue := range source.GetPromotedLabelKeySets() { 319 exists := false 320 for _, currentValue := range o.PromotedLabelKeySets { 321 if proto.Equal(sourceValue, currentValue) { 322 exists = true 323 break 324 } 325 } 326 if !exists { 327 var newDstElement *common.LabelKeySet 328 if sourceValue != nil { 329 newDstElement = new(common.LabelKeySet) 330 newDstElement.Merge(sourceValue) 331 } 332 o.PromotedLabelKeySets = append(o.PromotedLabelKeySets, newDstElement) 333 } 334 } 335 336 if source.GetIndexSpec() != nil { 337 if o.IndexSpec == nil { 338 o.IndexSpec = new(MetricDescriptor_IndexSpec) 339 } 340 o.IndexSpec.Merge(source.GetIndexSpec()) 341 } 342 if source.GetIndices() != nil { 343 if o.Indices == nil { 344 o.Indices = new(MetricDescriptor_Indices) 345 } 346 o.Indices.Merge(source.GetIndices()) 347 } 348 if source.GetStorageConfig() != nil { 349 if o.StorageConfig == nil { 350 o.StorageConfig = new(MetricDescriptor_StorageConfig) 351 } 352 o.StorageConfig.Merge(source.GetStorageConfig()) 353 } 354 if source.GetBinaryIndices() != nil { 355 if o.BinaryIndices == nil { 356 o.BinaryIndices = new(MetricDescriptor_BinaryIndices) 357 } 358 o.BinaryIndices.Merge(source.GetBinaryIndices()) 359 } 360 } 361 362 func (o *MetricDescriptor) MergeRaw(source gotenobject.GotenObjectExt) { 363 o.Merge(source.(*MetricDescriptor)) 364 } 365 366 func (o *MetricDescriptor_MetricDescriptorMetadata) GotenObjectExt() {} 367 368 func (o *MetricDescriptor_MetricDescriptorMetadata) MakeFullFieldMask() *MetricDescriptor_MetricDescriptorMetadata_FieldMask { 369 return FullMetricDescriptor_MetricDescriptorMetadata_FieldMask() 370 } 371 372 func (o *MetricDescriptor_MetricDescriptorMetadata) MakeRawFullFieldMask() gotenobject.FieldMask { 373 return FullMetricDescriptor_MetricDescriptorMetadata_FieldMask() 374 } 375 376 func (o *MetricDescriptor_MetricDescriptorMetadata) MakeDiffFieldMask(other *MetricDescriptor_MetricDescriptorMetadata) *MetricDescriptor_MetricDescriptorMetadata_FieldMask { 377 if o == nil && other == nil { 378 return &MetricDescriptor_MetricDescriptorMetadata_FieldMask{} 379 } 380 if o == nil || other == nil { 381 return FullMetricDescriptor_MetricDescriptorMetadata_FieldMask() 382 } 383 384 res := &MetricDescriptor_MetricDescriptorMetadata_FieldMask{} 385 if o.GetLaunchStage() != other.GetLaunchStage() { 386 res.Paths = append(res.Paths, &MetricDescriptorMetricDescriptorMetadata_FieldTerminalPath{selector: MetricDescriptorMetricDescriptorMetadata_FieldPathSelectorLaunchStage}) 387 } 388 return res 389 } 390 391 func (o *MetricDescriptor_MetricDescriptorMetadata) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 392 return o.MakeDiffFieldMask(other.(*MetricDescriptor_MetricDescriptorMetadata)) 393 } 394 395 func (o *MetricDescriptor_MetricDescriptorMetadata) Clone() *MetricDescriptor_MetricDescriptorMetadata { 396 if o == nil { 397 return nil 398 } 399 result := &MetricDescriptor_MetricDescriptorMetadata{} 400 result.LaunchStage = o.LaunchStage 401 return result 402 } 403 404 func (o *MetricDescriptor_MetricDescriptorMetadata) CloneRaw() gotenobject.GotenObjectExt { 405 return o.Clone() 406 } 407 408 func (o *MetricDescriptor_MetricDescriptorMetadata) Merge(source *MetricDescriptor_MetricDescriptorMetadata) { 409 o.LaunchStage = source.GetLaunchStage() 410 } 411 412 func (o *MetricDescriptor_MetricDescriptorMetadata) MergeRaw(source gotenobject.GotenObjectExt) { 413 o.Merge(source.(*MetricDescriptor_MetricDescriptorMetadata)) 414 } 415 416 func (o *MetricDescriptor_IndexSpec) GotenObjectExt() {} 417 418 func (o *MetricDescriptor_IndexSpec) MakeFullFieldMask() *MetricDescriptor_IndexSpec_FieldMask { 419 return FullMetricDescriptor_IndexSpec_FieldMask() 420 } 421 422 func (o *MetricDescriptor_IndexSpec) MakeRawFullFieldMask() gotenobject.FieldMask { 423 return FullMetricDescriptor_IndexSpec_FieldMask() 424 } 425 426 func (o *MetricDescriptor_IndexSpec) MakeDiffFieldMask(other *MetricDescriptor_IndexSpec) *MetricDescriptor_IndexSpec_FieldMask { 427 if o == nil && other == nil { 428 return &MetricDescriptor_IndexSpec_FieldMask{} 429 } 430 if o == nil || other == nil { 431 return FullMetricDescriptor_IndexSpec_FieldMask() 432 } 433 434 res := &MetricDescriptor_IndexSpec_FieldMask{} 435 436 if len(o.GetPerResource()) == len(other.GetPerResource()) { 437 for i, lValue := range o.GetPerResource() { 438 rValue := other.GetPerResource()[i] 439 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 440 res.Paths = append(res.Paths, &MetricDescriptorIndexSpec_FieldTerminalPath{selector: MetricDescriptorIndexSpec_FieldPathSelectorPerResource}) 441 break 442 } 443 } 444 } else { 445 res.Paths = append(res.Paths, &MetricDescriptorIndexSpec_FieldTerminalPath{selector: MetricDescriptorIndexSpec_FieldPathSelectorPerResource}) 446 } 447 return res 448 } 449 450 func (o *MetricDescriptor_IndexSpec) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 451 return o.MakeDiffFieldMask(other.(*MetricDescriptor_IndexSpec)) 452 } 453 454 func (o *MetricDescriptor_IndexSpec) Clone() *MetricDescriptor_IndexSpec { 455 if o == nil { 456 return nil 457 } 458 result := &MetricDescriptor_IndexSpec{} 459 result.PerResource = make([]*MetricDescriptor_IndexSpec_PerMonitoredResource, len(o.PerResource)) 460 for i, sourceValue := range o.PerResource { 461 result.PerResource[i] = sourceValue.Clone() 462 } 463 return result 464 } 465 466 func (o *MetricDescriptor_IndexSpec) CloneRaw() gotenobject.GotenObjectExt { 467 return o.Clone() 468 } 469 470 func (o *MetricDescriptor_IndexSpec) Merge(source *MetricDescriptor_IndexSpec) { 471 for _, sourceValue := range source.GetPerResource() { 472 exists := false 473 for _, currentValue := range o.PerResource { 474 if proto.Equal(sourceValue, currentValue) { 475 exists = true 476 break 477 } 478 } 479 if !exists { 480 var newDstElement *MetricDescriptor_IndexSpec_PerMonitoredResource 481 if sourceValue != nil { 482 newDstElement = new(MetricDescriptor_IndexSpec_PerMonitoredResource) 483 newDstElement.Merge(sourceValue) 484 } 485 o.PerResource = append(o.PerResource, newDstElement) 486 } 487 } 488 489 } 490 491 func (o *MetricDescriptor_IndexSpec) MergeRaw(source gotenobject.GotenObjectExt) { 492 o.Merge(source.(*MetricDescriptor_IndexSpec)) 493 } 494 495 func (o *MetricDescriptor_Indices) GotenObjectExt() {} 496 497 func (o *MetricDescriptor_Indices) MakeFullFieldMask() *MetricDescriptor_Indices_FieldMask { 498 return FullMetricDescriptor_Indices_FieldMask() 499 } 500 501 func (o *MetricDescriptor_Indices) MakeRawFullFieldMask() gotenobject.FieldMask { 502 return FullMetricDescriptor_Indices_FieldMask() 503 } 504 505 func (o *MetricDescriptor_Indices) MakeDiffFieldMask(other *MetricDescriptor_Indices) *MetricDescriptor_Indices_FieldMask { 506 if o == nil && other == nil { 507 return &MetricDescriptor_Indices_FieldMask{} 508 } 509 if o == nil || other == nil { 510 return FullMetricDescriptor_Indices_FieldMask() 511 } 512 513 res := &MetricDescriptor_Indices_FieldMask{} 514 { 515 subMask := o.GetBuiltIn().MakeDiffFieldMask(other.GetBuiltIn()) 516 if subMask.IsFull() { 517 res.Paths = append(res.Paths, &MetricDescriptorIndices_FieldTerminalPath{selector: MetricDescriptorIndices_FieldPathSelectorBuiltIn}) 518 } else { 519 for _, subpath := range subMask.Paths { 520 res.Paths = append(res.Paths, &MetricDescriptorIndices_FieldSubPath{selector: MetricDescriptorIndices_FieldPathSelectorBuiltIn, subPath: subpath}) 521 } 522 } 523 } 524 { 525 subMask := o.GetUserDefined().MakeDiffFieldMask(other.GetUserDefined()) 526 if subMask.IsFull() { 527 res.Paths = append(res.Paths, &MetricDescriptorIndices_FieldTerminalPath{selector: MetricDescriptorIndices_FieldPathSelectorUserDefined}) 528 } else { 529 for _, subpath := range subMask.Paths { 530 res.Paths = append(res.Paths, &MetricDescriptorIndices_FieldSubPath{selector: MetricDescriptorIndices_FieldPathSelectorUserDefined, subPath: subpath}) 531 } 532 } 533 } 534 535 if len(o.GetLegacyMigrated()) == len(other.GetLegacyMigrated()) { 536 for i, lValue := range o.GetLegacyMigrated() { 537 rValue := other.GetLegacyMigrated()[i] 538 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 539 res.Paths = append(res.Paths, &MetricDescriptorIndices_FieldTerminalPath{selector: MetricDescriptorIndices_FieldPathSelectorLegacyMigrated}) 540 break 541 } 542 } 543 } else { 544 res.Paths = append(res.Paths, &MetricDescriptorIndices_FieldTerminalPath{selector: MetricDescriptorIndices_FieldPathSelectorLegacyMigrated}) 545 } 546 return res 547 } 548 549 func (o *MetricDescriptor_Indices) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 550 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices)) 551 } 552 553 func (o *MetricDescriptor_Indices) Clone() *MetricDescriptor_Indices { 554 if o == nil { 555 return nil 556 } 557 result := &MetricDescriptor_Indices{} 558 result.BuiltIn = o.BuiltIn.Clone() 559 result.UserDefined = o.UserDefined.Clone() 560 result.LegacyMigrated = make([]*MetricDescriptor_Indices_NonAggregatedIndices, len(o.LegacyMigrated)) 561 for i, sourceValue := range o.LegacyMigrated { 562 result.LegacyMigrated[i] = sourceValue.Clone() 563 } 564 return result 565 } 566 567 func (o *MetricDescriptor_Indices) CloneRaw() gotenobject.GotenObjectExt { 568 return o.Clone() 569 } 570 571 func (o *MetricDescriptor_Indices) Merge(source *MetricDescriptor_Indices) { 572 if source.GetBuiltIn() != nil { 573 if o.BuiltIn == nil { 574 o.BuiltIn = new(MetricDescriptor_Indices_IndexGroups) 575 } 576 o.BuiltIn.Merge(source.GetBuiltIn()) 577 } 578 if source.GetUserDefined() != nil { 579 if o.UserDefined == nil { 580 o.UserDefined = new(MetricDescriptor_Indices_IndexGroups) 581 } 582 o.UserDefined.Merge(source.GetUserDefined()) 583 } 584 for _, sourceValue := range source.GetLegacyMigrated() { 585 exists := false 586 for _, currentValue := range o.LegacyMigrated { 587 if proto.Equal(sourceValue, currentValue) { 588 exists = true 589 break 590 } 591 } 592 if !exists { 593 var newDstElement *MetricDescriptor_Indices_NonAggregatedIndices 594 if sourceValue != nil { 595 newDstElement = new(MetricDescriptor_Indices_NonAggregatedIndices) 596 newDstElement.Merge(sourceValue) 597 } 598 o.LegacyMigrated = append(o.LegacyMigrated, newDstElement) 599 } 600 } 601 602 } 603 604 func (o *MetricDescriptor_Indices) MergeRaw(source gotenobject.GotenObjectExt) { 605 o.Merge(source.(*MetricDescriptor_Indices)) 606 } 607 608 func (o *MetricDescriptor_StorageConfig) GotenObjectExt() {} 609 610 func (o *MetricDescriptor_StorageConfig) MakeFullFieldMask() *MetricDescriptor_StorageConfig_FieldMask { 611 return FullMetricDescriptor_StorageConfig_FieldMask() 612 } 613 614 func (o *MetricDescriptor_StorageConfig) MakeRawFullFieldMask() gotenobject.FieldMask { 615 return FullMetricDescriptor_StorageConfig_FieldMask() 616 } 617 618 func (o *MetricDescriptor_StorageConfig) MakeDiffFieldMask(other *MetricDescriptor_StorageConfig) *MetricDescriptor_StorageConfig_FieldMask { 619 if o == nil && other == nil { 620 return &MetricDescriptor_StorageConfig_FieldMask{} 621 } 622 if o == nil || other == nil { 623 return FullMetricDescriptor_StorageConfig_FieldMask() 624 } 625 626 res := &MetricDescriptor_StorageConfig_FieldMask{} 627 if o.GetStoreRawPoints() != other.GetStoreRawPoints() { 628 res.Paths = append(res.Paths, &MetricDescriptorStorageConfig_FieldTerminalPath{selector: MetricDescriptorStorageConfig_FieldPathSelectorStoreRawPoints}) 629 } 630 if !proto.Equal(o.GetMaxAp(), other.GetMaxAp()) { 631 res.Paths = append(res.Paths, &MetricDescriptorStorageConfig_FieldTerminalPath{selector: MetricDescriptorStorageConfig_FieldPathSelectorMaxAp}) 632 } 633 return res 634 } 635 636 func (o *MetricDescriptor_StorageConfig) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 637 return o.MakeDiffFieldMask(other.(*MetricDescriptor_StorageConfig)) 638 } 639 640 func (o *MetricDescriptor_StorageConfig) Clone() *MetricDescriptor_StorageConfig { 641 if o == nil { 642 return nil 643 } 644 result := &MetricDescriptor_StorageConfig{} 645 result.StoreRawPoints = o.StoreRawPoints 646 result.MaxAp = proto.Clone(o.MaxAp).(*durationpb.Duration) 647 return result 648 } 649 650 func (o *MetricDescriptor_StorageConfig) CloneRaw() gotenobject.GotenObjectExt { 651 return o.Clone() 652 } 653 654 func (o *MetricDescriptor_StorageConfig) Merge(source *MetricDescriptor_StorageConfig) { 655 o.StoreRawPoints = source.GetStoreRawPoints() 656 if source.GetMaxAp() != nil { 657 if o.MaxAp == nil { 658 o.MaxAp = new(durationpb.Duration) 659 } 660 proto.Merge(o.MaxAp, source.GetMaxAp()) 661 } 662 } 663 664 func (o *MetricDescriptor_StorageConfig) MergeRaw(source gotenobject.GotenObjectExt) { 665 o.Merge(source.(*MetricDescriptor_StorageConfig)) 666 } 667 668 func (o *MetricDescriptor_BinaryIndices) GotenObjectExt() {} 669 670 func (o *MetricDescriptor_BinaryIndices) MakeFullFieldMask() *MetricDescriptor_BinaryIndices_FieldMask { 671 return FullMetricDescriptor_BinaryIndices_FieldMask() 672 } 673 674 func (o *MetricDescriptor_BinaryIndices) MakeRawFullFieldMask() gotenobject.FieldMask { 675 return FullMetricDescriptor_BinaryIndices_FieldMask() 676 } 677 678 func (o *MetricDescriptor_BinaryIndices) MakeDiffFieldMask(other *MetricDescriptor_BinaryIndices) *MetricDescriptor_BinaryIndices_FieldMask { 679 if o == nil && other == nil { 680 return &MetricDescriptor_BinaryIndices_FieldMask{} 681 } 682 if o == nil || other == nil { 683 return FullMetricDescriptor_BinaryIndices_FieldMask() 684 } 685 686 res := &MetricDescriptor_BinaryIndices_FieldMask{} 687 688 if len(o.GetByResources()) == len(other.GetByResources()) { 689 for i, lValue := range o.GetByResources() { 690 rValue := other.GetByResources()[i] 691 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 692 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndices_FieldTerminalPath{selector: MetricDescriptorBinaryIndices_FieldPathSelectorByResources}) 693 break 694 } 695 } 696 } else { 697 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndices_FieldTerminalPath{selector: MetricDescriptorBinaryIndices_FieldPathSelectorByResources}) 698 } 699 if o.GetRegion() != other.GetRegion() { 700 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndices_FieldTerminalPath{selector: MetricDescriptorBinaryIndices_FieldPathSelectorRegion}) 701 } 702 return res 703 } 704 705 func (o *MetricDescriptor_BinaryIndices) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 706 return o.MakeDiffFieldMask(other.(*MetricDescriptor_BinaryIndices)) 707 } 708 709 func (o *MetricDescriptor_BinaryIndices) Clone() *MetricDescriptor_BinaryIndices { 710 if o == nil { 711 return nil 712 } 713 result := &MetricDescriptor_BinaryIndices{} 714 result.ByResources = make([]*MetricDescriptor_BinaryIndices_ByResourceType, len(o.ByResources)) 715 for i, sourceValue := range o.ByResources { 716 result.ByResources[i] = sourceValue.Clone() 717 } 718 result.Region = o.Region 719 return result 720 } 721 722 func (o *MetricDescriptor_BinaryIndices) CloneRaw() gotenobject.GotenObjectExt { 723 return o.Clone() 724 } 725 726 func (o *MetricDescriptor_BinaryIndices) Merge(source *MetricDescriptor_BinaryIndices) { 727 for _, sourceValue := range source.GetByResources() { 728 exists := false 729 for _, currentValue := range o.ByResources { 730 if proto.Equal(sourceValue, currentValue) { 731 exists = true 732 break 733 } 734 } 735 if !exists { 736 var newDstElement *MetricDescriptor_BinaryIndices_ByResourceType 737 if sourceValue != nil { 738 newDstElement = new(MetricDescriptor_BinaryIndices_ByResourceType) 739 newDstElement.Merge(sourceValue) 740 } 741 o.ByResources = append(o.ByResources, newDstElement) 742 } 743 } 744 745 o.Region = source.GetRegion() 746 } 747 748 func (o *MetricDescriptor_BinaryIndices) MergeRaw(source gotenobject.GotenObjectExt) { 749 o.Merge(source.(*MetricDescriptor_BinaryIndices)) 750 } 751 752 func (o *MetricDescriptor_IndexSpec_Index) GotenObjectExt() {} 753 754 func (o *MetricDescriptor_IndexSpec_Index) MakeFullFieldMask() *MetricDescriptor_IndexSpec_Index_FieldMask { 755 return FullMetricDescriptor_IndexSpec_Index_FieldMask() 756 } 757 758 func (o *MetricDescriptor_IndexSpec_Index) MakeRawFullFieldMask() gotenobject.FieldMask { 759 return FullMetricDescriptor_IndexSpec_Index_FieldMask() 760 } 761 762 func (o *MetricDescriptor_IndexSpec_Index) MakeDiffFieldMask(other *MetricDescriptor_IndexSpec_Index) *MetricDescriptor_IndexSpec_Index_FieldMask { 763 if o == nil && other == nil { 764 return &MetricDescriptor_IndexSpec_Index_FieldMask{} 765 } 766 if o == nil || other == nil { 767 return FullMetricDescriptor_IndexSpec_Index_FieldMask() 768 } 769 770 res := &MetricDescriptor_IndexSpec_Index_FieldMask{} 771 772 if len(o.GetPromotedLabels()) == len(other.GetPromotedLabels()) { 773 for i, lValue := range o.GetPromotedLabels() { 774 rValue := other.GetPromotedLabels()[i] 775 if lValue != rValue { 776 res.Paths = append(res.Paths, &MetricDescriptorIndexSpecIndex_FieldTerminalPath{selector: MetricDescriptorIndexSpecIndex_FieldPathSelectorPromotedLabels}) 777 break 778 } 779 } 780 } else { 781 res.Paths = append(res.Paths, &MetricDescriptorIndexSpecIndex_FieldTerminalPath{selector: MetricDescriptorIndexSpecIndex_FieldPathSelectorPromotedLabels}) 782 } 783 return res 784 } 785 786 func (o *MetricDescriptor_IndexSpec_Index) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 787 return o.MakeDiffFieldMask(other.(*MetricDescriptor_IndexSpec_Index)) 788 } 789 790 func (o *MetricDescriptor_IndexSpec_Index) Clone() *MetricDescriptor_IndexSpec_Index { 791 if o == nil { 792 return nil 793 } 794 result := &MetricDescriptor_IndexSpec_Index{} 795 result.PromotedLabels = make([]string, len(o.PromotedLabels)) 796 for i, sourceValue := range o.PromotedLabels { 797 result.PromotedLabels[i] = sourceValue 798 } 799 return result 800 } 801 802 func (o *MetricDescriptor_IndexSpec_Index) CloneRaw() gotenobject.GotenObjectExt { 803 return o.Clone() 804 } 805 806 func (o *MetricDescriptor_IndexSpec_Index) Merge(source *MetricDescriptor_IndexSpec_Index) { 807 for _, sourceValue := range source.GetPromotedLabels() { 808 exists := false 809 for _, currentValue := range o.PromotedLabels { 810 if currentValue == sourceValue { 811 exists = true 812 break 813 } 814 } 815 if !exists { 816 var newDstElement string 817 newDstElement = sourceValue 818 o.PromotedLabels = append(o.PromotedLabels, newDstElement) 819 } 820 } 821 822 } 823 824 func (o *MetricDescriptor_IndexSpec_Index) MergeRaw(source gotenobject.GotenObjectExt) { 825 o.Merge(source.(*MetricDescriptor_IndexSpec_Index)) 826 } 827 828 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) GotenObjectExt() {} 829 830 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) MakeFullFieldMask() *MetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask { 831 return FullMetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask() 832 } 833 834 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) MakeRawFullFieldMask() gotenobject.FieldMask { 835 return FullMetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask() 836 } 837 838 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) MakeDiffFieldMask(other *MetricDescriptor_IndexSpec_PerMonitoredResource) *MetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask { 839 if o == nil && other == nil { 840 return &MetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask{} 841 } 842 if o == nil || other == nil { 843 return FullMetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask() 844 } 845 846 res := &MetricDescriptor_IndexSpec_PerMonitoredResource_FieldMask{} 847 if o.GetResource().String() != other.GetResource().String() { 848 res.Paths = append(res.Paths, &MetricDescriptorIndexSpecPerMonitoredResource_FieldTerminalPath{selector: MetricDescriptorIndexSpecPerMonitoredResource_FieldPathSelectorResource}) 849 } 850 851 if len(o.GetIndices()) == len(other.GetIndices()) { 852 for i, lValue := range o.GetIndices() { 853 rValue := other.GetIndices()[i] 854 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 855 res.Paths = append(res.Paths, &MetricDescriptorIndexSpecPerMonitoredResource_FieldTerminalPath{selector: MetricDescriptorIndexSpecPerMonitoredResource_FieldPathSelectorIndices}) 856 break 857 } 858 } 859 } else { 860 res.Paths = append(res.Paths, &MetricDescriptorIndexSpecPerMonitoredResource_FieldTerminalPath{selector: MetricDescriptorIndexSpecPerMonitoredResource_FieldPathSelectorIndices}) 861 } 862 return res 863 } 864 865 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 866 return o.MakeDiffFieldMask(other.(*MetricDescriptor_IndexSpec_PerMonitoredResource)) 867 } 868 869 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) Clone() *MetricDescriptor_IndexSpec_PerMonitoredResource { 870 if o == nil { 871 return nil 872 } 873 result := &MetricDescriptor_IndexSpec_PerMonitoredResource{} 874 if o.Resource == nil { 875 result.Resource = nil 876 } else if data, err := o.Resource.ProtoString(); err != nil { 877 panic(err) 878 } else { 879 result.Resource = &monitored_resource_descriptor.Reference{} 880 if err := result.Resource.ParseProtoString(data); err != nil { 881 panic(err) 882 } 883 } 884 result.Indices = make([]*MetricDescriptor_IndexSpec_Index, len(o.Indices)) 885 for i, sourceValue := range o.Indices { 886 result.Indices[i] = sourceValue.Clone() 887 } 888 return result 889 } 890 891 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) CloneRaw() gotenobject.GotenObjectExt { 892 return o.Clone() 893 } 894 895 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) Merge(source *MetricDescriptor_IndexSpec_PerMonitoredResource) { 896 if source.GetResource() != nil { 897 if data, err := source.GetResource().ProtoString(); err != nil { 898 panic(err) 899 } else { 900 o.Resource = &monitored_resource_descriptor.Reference{} 901 if err := o.Resource.ParseProtoString(data); err != nil { 902 panic(err) 903 } 904 } 905 } else { 906 o.Resource = nil 907 } 908 for _, sourceValue := range source.GetIndices() { 909 exists := false 910 for _, currentValue := range o.Indices { 911 if proto.Equal(sourceValue, currentValue) { 912 exists = true 913 break 914 } 915 } 916 if !exists { 917 var newDstElement *MetricDescriptor_IndexSpec_Index 918 if sourceValue != nil { 919 newDstElement = new(MetricDescriptor_IndexSpec_Index) 920 newDstElement.Merge(sourceValue) 921 } 922 o.Indices = append(o.Indices, newDstElement) 923 } 924 } 925 926 } 927 928 func (o *MetricDescriptor_IndexSpec_PerMonitoredResource) MergeRaw(source gotenobject.GotenObjectExt) { 929 o.Merge(source.(*MetricDescriptor_IndexSpec_PerMonitoredResource)) 930 } 931 932 func (o *MetricDescriptor_Indices_LabelsGroup) GotenObjectExt() {} 933 934 func (o *MetricDescriptor_Indices_LabelsGroup) MakeFullFieldMask() *MetricDescriptor_Indices_LabelsGroup_FieldMask { 935 return FullMetricDescriptor_Indices_LabelsGroup_FieldMask() 936 } 937 938 func (o *MetricDescriptor_Indices_LabelsGroup) MakeRawFullFieldMask() gotenobject.FieldMask { 939 return FullMetricDescriptor_Indices_LabelsGroup_FieldMask() 940 } 941 942 func (o *MetricDescriptor_Indices_LabelsGroup) MakeDiffFieldMask(other *MetricDescriptor_Indices_LabelsGroup) *MetricDescriptor_Indices_LabelsGroup_FieldMask { 943 if o == nil && other == nil { 944 return &MetricDescriptor_Indices_LabelsGroup_FieldMask{} 945 } 946 if o == nil || other == nil { 947 return FullMetricDescriptor_Indices_LabelsGroup_FieldMask() 948 } 949 950 res := &MetricDescriptor_Indices_LabelsGroup_FieldMask{} 951 if o.GetName() != other.GetName() { 952 res.Paths = append(res.Paths, &MetricDescriptorIndicesLabelsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesLabelsGroup_FieldPathSelectorName}) 953 } 954 955 if len(o.GetMetricKeys()) == len(other.GetMetricKeys()) { 956 for i, lValue := range o.GetMetricKeys() { 957 rValue := other.GetMetricKeys()[i] 958 if lValue != rValue { 959 res.Paths = append(res.Paths, &MetricDescriptorIndicesLabelsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesLabelsGroup_FieldPathSelectorMetricKeys}) 960 break 961 } 962 } 963 } else { 964 res.Paths = append(res.Paths, &MetricDescriptorIndicesLabelsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesLabelsGroup_FieldPathSelectorMetricKeys}) 965 } 966 967 if len(o.GetResourceKeys()) == len(other.GetResourceKeys()) { 968 for i, lValue := range o.GetResourceKeys() { 969 rValue := other.GetResourceKeys()[i] 970 if lValue != rValue { 971 res.Paths = append(res.Paths, &MetricDescriptorIndicesLabelsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesLabelsGroup_FieldPathSelectorResourceKeys}) 972 break 973 } 974 } 975 } else { 976 res.Paths = append(res.Paths, &MetricDescriptorIndicesLabelsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesLabelsGroup_FieldPathSelectorResourceKeys}) 977 } 978 if o.GetClosingStatus() != other.GetClosingStatus() { 979 res.Paths = append(res.Paths, &MetricDescriptorIndicesLabelsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesLabelsGroup_FieldPathSelectorClosingStatus}) 980 } 981 return res 982 } 983 984 func (o *MetricDescriptor_Indices_LabelsGroup) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 985 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_LabelsGroup)) 986 } 987 988 func (o *MetricDescriptor_Indices_LabelsGroup) Clone() *MetricDescriptor_Indices_LabelsGroup { 989 if o == nil { 990 return nil 991 } 992 result := &MetricDescriptor_Indices_LabelsGroup{} 993 result.Name = o.Name 994 result.MetricKeys = make([]string, len(o.MetricKeys)) 995 for i, sourceValue := range o.MetricKeys { 996 result.MetricKeys[i] = sourceValue 997 } 998 result.ResourceKeys = make([]string, len(o.ResourceKeys)) 999 for i, sourceValue := range o.ResourceKeys { 1000 result.ResourceKeys[i] = sourceValue 1001 } 1002 result.ClosingStatus = o.ClosingStatus 1003 return result 1004 } 1005 1006 func (o *MetricDescriptor_Indices_LabelsGroup) CloneRaw() gotenobject.GotenObjectExt { 1007 return o.Clone() 1008 } 1009 1010 func (o *MetricDescriptor_Indices_LabelsGroup) Merge(source *MetricDescriptor_Indices_LabelsGroup) { 1011 o.Name = source.GetName() 1012 for _, sourceValue := range source.GetMetricKeys() { 1013 exists := false 1014 for _, currentValue := range o.MetricKeys { 1015 if currentValue == sourceValue { 1016 exists = true 1017 break 1018 } 1019 } 1020 if !exists { 1021 var newDstElement string 1022 newDstElement = sourceValue 1023 o.MetricKeys = append(o.MetricKeys, newDstElement) 1024 } 1025 } 1026 1027 for _, sourceValue := range source.GetResourceKeys() { 1028 exists := false 1029 for _, currentValue := range o.ResourceKeys { 1030 if currentValue == sourceValue { 1031 exists = true 1032 break 1033 } 1034 } 1035 if !exists { 1036 var newDstElement string 1037 newDstElement = sourceValue 1038 o.ResourceKeys = append(o.ResourceKeys, newDstElement) 1039 } 1040 } 1041 1042 o.ClosingStatus = source.GetClosingStatus() 1043 } 1044 1045 func (o *MetricDescriptor_Indices_LabelsGroup) MergeRaw(source gotenobject.GotenObjectExt) { 1046 o.Merge(source.(*MetricDescriptor_Indices_LabelsGroup)) 1047 } 1048 1049 func (o *MetricDescriptor_Indices_PaginationView) GotenObjectExt() {} 1050 1051 func (o *MetricDescriptor_Indices_PaginationView) MakeFullFieldMask() *MetricDescriptor_Indices_PaginationView_FieldMask { 1052 return FullMetricDescriptor_Indices_PaginationView_FieldMask() 1053 } 1054 1055 func (o *MetricDescriptor_Indices_PaginationView) MakeRawFullFieldMask() gotenobject.FieldMask { 1056 return FullMetricDescriptor_Indices_PaginationView_FieldMask() 1057 } 1058 1059 func (o *MetricDescriptor_Indices_PaginationView) MakeDiffFieldMask(other *MetricDescriptor_Indices_PaginationView) *MetricDescriptor_Indices_PaginationView_FieldMask { 1060 if o == nil && other == nil { 1061 return &MetricDescriptor_Indices_PaginationView_FieldMask{} 1062 } 1063 if o == nil || other == nil { 1064 return FullMetricDescriptor_Indices_PaginationView_FieldMask() 1065 } 1066 1067 res := &MetricDescriptor_Indices_PaginationView_FieldMask{} 1068 if o.GetName() != other.GetName() { 1069 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorName}) 1070 } 1071 1072 if len(o.GetFilterableMetricKeys()) == len(other.GetFilterableMetricKeys()) { 1073 for i, lValue := range o.GetFilterableMetricKeys() { 1074 rValue := other.GetFilterableMetricKeys()[i] 1075 if lValue != rValue { 1076 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorFilterableMetricKeys}) 1077 break 1078 } 1079 } 1080 } else { 1081 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorFilterableMetricKeys}) 1082 } 1083 1084 if len(o.GetFilterableResourceKeys()) == len(other.GetFilterableResourceKeys()) { 1085 for i, lValue := range o.GetFilterableResourceKeys() { 1086 rValue := other.GetFilterableResourceKeys()[i] 1087 if lValue != rValue { 1088 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorFilterableResourceKeys}) 1089 break 1090 } 1091 } 1092 } else { 1093 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorFilterableResourceKeys}) 1094 } 1095 1096 if len(o.GetPaginatedMetricKeys()) == len(other.GetPaginatedMetricKeys()) { 1097 for i, lValue := range o.GetPaginatedMetricKeys() { 1098 rValue := other.GetPaginatedMetricKeys()[i] 1099 if lValue != rValue { 1100 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorPaginatedMetricKeys}) 1101 break 1102 } 1103 } 1104 } else { 1105 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorPaginatedMetricKeys}) 1106 } 1107 1108 if len(o.GetPaginatedResourceKeys()) == len(other.GetPaginatedResourceKeys()) { 1109 for i, lValue := range o.GetPaginatedResourceKeys() { 1110 rValue := other.GetPaginatedResourceKeys()[i] 1111 if lValue != rValue { 1112 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorPaginatedResourceKeys}) 1113 break 1114 } 1115 } 1116 } else { 1117 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorPaginatedResourceKeys}) 1118 } 1119 if o.GetClosingStatus() != other.GetClosingStatus() { 1120 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationView_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationView_FieldPathSelectorClosingStatus}) 1121 } 1122 return res 1123 } 1124 1125 func (o *MetricDescriptor_Indices_PaginationView) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1126 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_PaginationView)) 1127 } 1128 1129 func (o *MetricDescriptor_Indices_PaginationView) Clone() *MetricDescriptor_Indices_PaginationView { 1130 if o == nil { 1131 return nil 1132 } 1133 result := &MetricDescriptor_Indices_PaginationView{} 1134 result.Name = o.Name 1135 result.FilterableMetricKeys = make([]string, len(o.FilterableMetricKeys)) 1136 for i, sourceValue := range o.FilterableMetricKeys { 1137 result.FilterableMetricKeys[i] = sourceValue 1138 } 1139 result.FilterableResourceKeys = make([]string, len(o.FilterableResourceKeys)) 1140 for i, sourceValue := range o.FilterableResourceKeys { 1141 result.FilterableResourceKeys[i] = sourceValue 1142 } 1143 result.PaginatedMetricKeys = make([]string, len(o.PaginatedMetricKeys)) 1144 for i, sourceValue := range o.PaginatedMetricKeys { 1145 result.PaginatedMetricKeys[i] = sourceValue 1146 } 1147 result.PaginatedResourceKeys = make([]string, len(o.PaginatedResourceKeys)) 1148 for i, sourceValue := range o.PaginatedResourceKeys { 1149 result.PaginatedResourceKeys[i] = sourceValue 1150 } 1151 result.ClosingStatus = o.ClosingStatus 1152 return result 1153 } 1154 1155 func (o *MetricDescriptor_Indices_PaginationView) CloneRaw() gotenobject.GotenObjectExt { 1156 return o.Clone() 1157 } 1158 1159 func (o *MetricDescriptor_Indices_PaginationView) Merge(source *MetricDescriptor_Indices_PaginationView) { 1160 o.Name = source.GetName() 1161 for _, sourceValue := range source.GetFilterableMetricKeys() { 1162 exists := false 1163 for _, currentValue := range o.FilterableMetricKeys { 1164 if currentValue == sourceValue { 1165 exists = true 1166 break 1167 } 1168 } 1169 if !exists { 1170 var newDstElement string 1171 newDstElement = sourceValue 1172 o.FilterableMetricKeys = append(o.FilterableMetricKeys, newDstElement) 1173 } 1174 } 1175 1176 for _, sourceValue := range source.GetFilterableResourceKeys() { 1177 exists := false 1178 for _, currentValue := range o.FilterableResourceKeys { 1179 if currentValue == sourceValue { 1180 exists = true 1181 break 1182 } 1183 } 1184 if !exists { 1185 var newDstElement string 1186 newDstElement = sourceValue 1187 o.FilterableResourceKeys = append(o.FilterableResourceKeys, newDstElement) 1188 } 1189 } 1190 1191 for _, sourceValue := range source.GetPaginatedMetricKeys() { 1192 exists := false 1193 for _, currentValue := range o.PaginatedMetricKeys { 1194 if currentValue == sourceValue { 1195 exists = true 1196 break 1197 } 1198 } 1199 if !exists { 1200 var newDstElement string 1201 newDstElement = sourceValue 1202 o.PaginatedMetricKeys = append(o.PaginatedMetricKeys, newDstElement) 1203 } 1204 } 1205 1206 for _, sourceValue := range source.GetPaginatedResourceKeys() { 1207 exists := false 1208 for _, currentValue := range o.PaginatedResourceKeys { 1209 if currentValue == sourceValue { 1210 exists = true 1211 break 1212 } 1213 } 1214 if !exists { 1215 var newDstElement string 1216 newDstElement = sourceValue 1217 o.PaginatedResourceKeys = append(o.PaginatedResourceKeys, newDstElement) 1218 } 1219 } 1220 1221 o.ClosingStatus = source.GetClosingStatus() 1222 } 1223 1224 func (o *MetricDescriptor_Indices_PaginationView) MergeRaw(source gotenobject.GotenObjectExt) { 1225 o.Merge(source.(*MetricDescriptor_Indices_PaginationView)) 1226 } 1227 1228 func (o *MetricDescriptor_Indices_AggregationsGroup) GotenObjectExt() {} 1229 1230 func (o *MetricDescriptor_Indices_AggregationsGroup) MakeFullFieldMask() *MetricDescriptor_Indices_AggregationsGroup_FieldMask { 1231 return FullMetricDescriptor_Indices_AggregationsGroup_FieldMask() 1232 } 1233 1234 func (o *MetricDescriptor_Indices_AggregationsGroup) MakeRawFullFieldMask() gotenobject.FieldMask { 1235 return FullMetricDescriptor_Indices_AggregationsGroup_FieldMask() 1236 } 1237 1238 func (o *MetricDescriptor_Indices_AggregationsGroup) MakeDiffFieldMask(other *MetricDescriptor_Indices_AggregationsGroup) *MetricDescriptor_Indices_AggregationsGroup_FieldMask { 1239 if o == nil && other == nil { 1240 return &MetricDescriptor_Indices_AggregationsGroup_FieldMask{} 1241 } 1242 if o == nil || other == nil { 1243 return FullMetricDescriptor_Indices_AggregationsGroup_FieldMask() 1244 } 1245 1246 res := &MetricDescriptor_Indices_AggregationsGroup_FieldMask{} 1247 if o.GetName() != other.GetName() { 1248 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorName}) 1249 } 1250 1251 if len(o.GetPerSeriesAligners()) == len(other.GetPerSeriesAligners()) { 1252 for i, lValue := range o.GetPerSeriesAligners() { 1253 rValue := other.GetPerSeriesAligners()[i] 1254 if lValue != rValue { 1255 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorPerSeriesAligners}) 1256 break 1257 } 1258 } 1259 } else { 1260 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorPerSeriesAligners}) 1261 } 1262 1263 if len(o.GetCrossSeriesReducers()) == len(other.GetCrossSeriesReducers()) { 1264 for i, lValue := range o.GetCrossSeriesReducers() { 1265 rValue := other.GetCrossSeriesReducers()[i] 1266 if lValue != rValue { 1267 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorCrossSeriesReducers}) 1268 break 1269 } 1270 } 1271 } else { 1272 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorCrossSeriesReducers}) 1273 } 1274 if o.GetClosingStatus() != other.GetClosingStatus() { 1275 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorClosingStatus}) 1276 } 1277 1278 if len(o.GetStorageAligners()) == len(other.GetStorageAligners()) { 1279 for i, lValue := range o.GetStorageAligners() { 1280 rValue := other.GetStorageAligners()[i] 1281 if lValue != rValue { 1282 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorStorageAligners}) 1283 break 1284 } 1285 } 1286 } else { 1287 res.Paths = append(res.Paths, &MetricDescriptorIndicesAggregationsGroup_FieldTerminalPath{selector: MetricDescriptorIndicesAggregationsGroup_FieldPathSelectorStorageAligners}) 1288 } 1289 return res 1290 } 1291 1292 func (o *MetricDescriptor_Indices_AggregationsGroup) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1293 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_AggregationsGroup)) 1294 } 1295 1296 func (o *MetricDescriptor_Indices_AggregationsGroup) Clone() *MetricDescriptor_Indices_AggregationsGroup { 1297 if o == nil { 1298 return nil 1299 } 1300 result := &MetricDescriptor_Indices_AggregationsGroup{} 1301 result.Name = o.Name 1302 result.PerSeriesAligners = make([]common.Aggregation_Aligner, len(o.PerSeriesAligners)) 1303 for i, sourceValue := range o.PerSeriesAligners { 1304 result.PerSeriesAligners[i] = sourceValue 1305 } 1306 result.CrossSeriesReducers = make([]common.Aggregation_Reducer, len(o.CrossSeriesReducers)) 1307 for i, sourceValue := range o.CrossSeriesReducers { 1308 result.CrossSeriesReducers[i] = sourceValue 1309 } 1310 result.ClosingStatus = o.ClosingStatus 1311 result.StorageAligners = make([]common.Aggregation_Aligner, len(o.StorageAligners)) 1312 for i, sourceValue := range o.StorageAligners { 1313 result.StorageAligners[i] = sourceValue 1314 } 1315 return result 1316 } 1317 1318 func (o *MetricDescriptor_Indices_AggregationsGroup) CloneRaw() gotenobject.GotenObjectExt { 1319 return o.Clone() 1320 } 1321 1322 func (o *MetricDescriptor_Indices_AggregationsGroup) Merge(source *MetricDescriptor_Indices_AggregationsGroup) { 1323 o.Name = source.GetName() 1324 for _, sourceValue := range source.GetPerSeriesAligners() { 1325 exists := false 1326 for _, currentValue := range o.PerSeriesAligners { 1327 if currentValue == sourceValue { 1328 exists = true 1329 break 1330 } 1331 } 1332 if !exists { 1333 var newDstElement common.Aggregation_Aligner 1334 newDstElement = sourceValue 1335 o.PerSeriesAligners = append(o.PerSeriesAligners, newDstElement) 1336 } 1337 } 1338 1339 for _, sourceValue := range source.GetCrossSeriesReducers() { 1340 exists := false 1341 for _, currentValue := range o.CrossSeriesReducers { 1342 if currentValue == sourceValue { 1343 exists = true 1344 break 1345 } 1346 } 1347 if !exists { 1348 var newDstElement common.Aggregation_Reducer 1349 newDstElement = sourceValue 1350 o.CrossSeriesReducers = append(o.CrossSeriesReducers, newDstElement) 1351 } 1352 } 1353 1354 o.ClosingStatus = source.GetClosingStatus() 1355 for _, sourceValue := range source.GetStorageAligners() { 1356 exists := false 1357 for _, currentValue := range o.StorageAligners { 1358 if currentValue == sourceValue { 1359 exists = true 1360 break 1361 } 1362 } 1363 if !exists { 1364 var newDstElement common.Aggregation_Aligner 1365 newDstElement = sourceValue 1366 o.StorageAligners = append(o.StorageAligners, newDstElement) 1367 } 1368 } 1369 1370 } 1371 1372 func (o *MetricDescriptor_Indices_AggregationsGroup) MergeRaw(source gotenobject.GotenObjectExt) { 1373 o.Merge(source.(*MetricDescriptor_Indices_AggregationsGroup)) 1374 } 1375 1376 func (o *MetricDescriptor_Indices_SortingFunction) GotenObjectExt() {} 1377 1378 func (o *MetricDescriptor_Indices_SortingFunction) MakeFullFieldMask() *MetricDescriptor_Indices_SortingFunction_FieldMask { 1379 return FullMetricDescriptor_Indices_SortingFunction_FieldMask() 1380 } 1381 1382 func (o *MetricDescriptor_Indices_SortingFunction) MakeRawFullFieldMask() gotenobject.FieldMask { 1383 return FullMetricDescriptor_Indices_SortingFunction_FieldMask() 1384 } 1385 1386 func (o *MetricDescriptor_Indices_SortingFunction) MakeDiffFieldMask(other *MetricDescriptor_Indices_SortingFunction) *MetricDescriptor_Indices_SortingFunction_FieldMask { 1387 if o == nil && other == nil { 1388 return &MetricDescriptor_Indices_SortingFunction_FieldMask{} 1389 } 1390 if o == nil || other == nil { 1391 return FullMetricDescriptor_Indices_SortingFunction_FieldMask() 1392 } 1393 1394 res := &MetricDescriptor_Indices_SortingFunction_FieldMask{} 1395 if o.GetName() != other.GetName() { 1396 res.Paths = append(res.Paths, &MetricDescriptorIndicesSortingFunction_FieldTerminalPath{selector: MetricDescriptorIndicesSortingFunction_FieldPathSelectorName}) 1397 } 1398 if o.GetAligner() != other.GetAligner() { 1399 res.Paths = append(res.Paths, &MetricDescriptorIndicesSortingFunction_FieldTerminalPath{selector: MetricDescriptorIndicesSortingFunction_FieldPathSelectorAligner}) 1400 } 1401 if o.GetReducer() != other.GetReducer() { 1402 res.Paths = append(res.Paths, &MetricDescriptorIndicesSortingFunction_FieldTerminalPath{selector: MetricDescriptorIndicesSortingFunction_FieldPathSelectorReducer}) 1403 } 1404 if o.GetClosingStatus() != other.GetClosingStatus() { 1405 res.Paths = append(res.Paths, &MetricDescriptorIndicesSortingFunction_FieldTerminalPath{selector: MetricDescriptorIndicesSortingFunction_FieldPathSelectorClosingStatus}) 1406 } 1407 if o.GetSorting() != other.GetSorting() { 1408 res.Paths = append(res.Paths, &MetricDescriptorIndicesSortingFunction_FieldTerminalPath{selector: MetricDescriptorIndicesSortingFunction_FieldPathSelectorSorting}) 1409 } 1410 return res 1411 } 1412 1413 func (o *MetricDescriptor_Indices_SortingFunction) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1414 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_SortingFunction)) 1415 } 1416 1417 func (o *MetricDescriptor_Indices_SortingFunction) Clone() *MetricDescriptor_Indices_SortingFunction { 1418 if o == nil { 1419 return nil 1420 } 1421 result := &MetricDescriptor_Indices_SortingFunction{} 1422 result.Name = o.Name 1423 result.Aligner = o.Aligner 1424 result.Reducer = o.Reducer 1425 result.ClosingStatus = o.ClosingStatus 1426 result.Sorting = o.Sorting 1427 return result 1428 } 1429 1430 func (o *MetricDescriptor_Indices_SortingFunction) CloneRaw() gotenobject.GotenObjectExt { 1431 return o.Clone() 1432 } 1433 1434 func (o *MetricDescriptor_Indices_SortingFunction) Merge(source *MetricDescriptor_Indices_SortingFunction) { 1435 o.Name = source.GetName() 1436 o.Aligner = source.GetAligner() 1437 o.Reducer = source.GetReducer() 1438 o.ClosingStatus = source.GetClosingStatus() 1439 o.Sorting = source.GetSorting() 1440 } 1441 1442 func (o *MetricDescriptor_Indices_SortingFunction) MergeRaw(source gotenobject.GotenObjectExt) { 1443 o.Merge(source.(*MetricDescriptor_Indices_SortingFunction)) 1444 } 1445 1446 func (o *MetricDescriptor_Indices_PreAggregatedIndices) GotenObjectExt() {} 1447 1448 func (o *MetricDescriptor_Indices_PreAggregatedIndices) MakeFullFieldMask() *MetricDescriptor_Indices_PreAggregatedIndices_FieldMask { 1449 return FullMetricDescriptor_Indices_PreAggregatedIndices_FieldMask() 1450 } 1451 1452 func (o *MetricDescriptor_Indices_PreAggregatedIndices) MakeRawFullFieldMask() gotenobject.FieldMask { 1453 return FullMetricDescriptor_Indices_PreAggregatedIndices_FieldMask() 1454 } 1455 1456 func (o *MetricDescriptor_Indices_PreAggregatedIndices) MakeDiffFieldMask(other *MetricDescriptor_Indices_PreAggregatedIndices) *MetricDescriptor_Indices_PreAggregatedIndices_FieldMask { 1457 if o == nil && other == nil { 1458 return &MetricDescriptor_Indices_PreAggregatedIndices_FieldMask{} 1459 } 1460 if o == nil || other == nil { 1461 return FullMetricDescriptor_Indices_PreAggregatedIndices_FieldMask() 1462 } 1463 1464 res := &MetricDescriptor_Indices_PreAggregatedIndices_FieldMask{} 1465 if o.GetName() != other.GetName() { 1466 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorName}) 1467 } 1468 1469 if len(o.GetResourceTypes()) == len(other.GetResourceTypes()) { 1470 for i, lValue := range o.GetResourceTypes() { 1471 rValue := other.GetResourceTypes()[i] 1472 if lValue != rValue { 1473 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorResourceTypes}) 1474 break 1475 } 1476 } 1477 } else { 1478 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorResourceTypes}) 1479 } 1480 1481 if len(o.GetPartitionLabelSets()) == len(other.GetPartitionLabelSets()) { 1482 for i, lValue := range o.GetPartitionLabelSets() { 1483 rValue := other.GetPartitionLabelSets()[i] 1484 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1485 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorPartitionLabelSets}) 1486 break 1487 } 1488 } 1489 } else { 1490 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorPartitionLabelSets}) 1491 } 1492 1493 if len(o.GetFilterAndGroupLabelSets()) == len(other.GetFilterAndGroupLabelSets()) { 1494 for i, lValue := range o.GetFilterAndGroupLabelSets() { 1495 rValue := other.GetFilterAndGroupLabelSets()[i] 1496 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1497 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorFilterAndGroupLabelSets}) 1498 break 1499 } 1500 } 1501 } else { 1502 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorFilterAndGroupLabelSets}) 1503 } 1504 1505 if len(o.GetSupportedAggregations()) == len(other.GetSupportedAggregations()) { 1506 for i, lValue := range o.GetSupportedAggregations() { 1507 rValue := other.GetSupportedAggregations()[i] 1508 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1509 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorSupportedAggregations}) 1510 break 1511 } 1512 } 1513 } else { 1514 res.Paths = append(res.Paths, &MetricDescriptorIndicesPreAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPreAggregatedIndices_FieldPathSelectorSupportedAggregations}) 1515 } 1516 return res 1517 } 1518 1519 func (o *MetricDescriptor_Indices_PreAggregatedIndices) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1520 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_PreAggregatedIndices)) 1521 } 1522 1523 func (o *MetricDescriptor_Indices_PreAggregatedIndices) Clone() *MetricDescriptor_Indices_PreAggregatedIndices { 1524 if o == nil { 1525 return nil 1526 } 1527 result := &MetricDescriptor_Indices_PreAggregatedIndices{} 1528 result.Name = o.Name 1529 result.ResourceTypes = make([]string, len(o.ResourceTypes)) 1530 for i, sourceValue := range o.ResourceTypes { 1531 result.ResourceTypes[i] = sourceValue 1532 } 1533 result.PartitionLabelSets = make([]*MetricDescriptor_Indices_LabelsGroup, len(o.PartitionLabelSets)) 1534 for i, sourceValue := range o.PartitionLabelSets { 1535 result.PartitionLabelSets[i] = sourceValue.Clone() 1536 } 1537 result.FilterAndGroupLabelSets = make([]*MetricDescriptor_Indices_LabelsGroup, len(o.FilterAndGroupLabelSets)) 1538 for i, sourceValue := range o.FilterAndGroupLabelSets { 1539 result.FilterAndGroupLabelSets[i] = sourceValue.Clone() 1540 } 1541 result.SupportedAggregations = make([]*MetricDescriptor_Indices_AggregationsGroup, len(o.SupportedAggregations)) 1542 for i, sourceValue := range o.SupportedAggregations { 1543 result.SupportedAggregations[i] = sourceValue.Clone() 1544 } 1545 return result 1546 } 1547 1548 func (o *MetricDescriptor_Indices_PreAggregatedIndices) CloneRaw() gotenobject.GotenObjectExt { 1549 return o.Clone() 1550 } 1551 1552 func (o *MetricDescriptor_Indices_PreAggregatedIndices) Merge(source *MetricDescriptor_Indices_PreAggregatedIndices) { 1553 o.Name = source.GetName() 1554 for _, sourceValue := range source.GetResourceTypes() { 1555 exists := false 1556 for _, currentValue := range o.ResourceTypes { 1557 if currentValue == sourceValue { 1558 exists = true 1559 break 1560 } 1561 } 1562 if !exists { 1563 var newDstElement string 1564 newDstElement = sourceValue 1565 o.ResourceTypes = append(o.ResourceTypes, newDstElement) 1566 } 1567 } 1568 1569 for _, sourceValue := range source.GetPartitionLabelSets() { 1570 exists := false 1571 for _, currentValue := range o.PartitionLabelSets { 1572 if proto.Equal(sourceValue, currentValue) { 1573 exists = true 1574 break 1575 } 1576 } 1577 if !exists { 1578 var newDstElement *MetricDescriptor_Indices_LabelsGroup 1579 if sourceValue != nil { 1580 newDstElement = new(MetricDescriptor_Indices_LabelsGroup) 1581 newDstElement.Merge(sourceValue) 1582 } 1583 o.PartitionLabelSets = append(o.PartitionLabelSets, newDstElement) 1584 } 1585 } 1586 1587 for _, sourceValue := range source.GetFilterAndGroupLabelSets() { 1588 exists := false 1589 for _, currentValue := range o.FilterAndGroupLabelSets { 1590 if proto.Equal(sourceValue, currentValue) { 1591 exists = true 1592 break 1593 } 1594 } 1595 if !exists { 1596 var newDstElement *MetricDescriptor_Indices_LabelsGroup 1597 if sourceValue != nil { 1598 newDstElement = new(MetricDescriptor_Indices_LabelsGroup) 1599 newDstElement.Merge(sourceValue) 1600 } 1601 o.FilterAndGroupLabelSets = append(o.FilterAndGroupLabelSets, newDstElement) 1602 } 1603 } 1604 1605 for _, sourceValue := range source.GetSupportedAggregations() { 1606 exists := false 1607 for _, currentValue := range o.SupportedAggregations { 1608 if proto.Equal(sourceValue, currentValue) { 1609 exists = true 1610 break 1611 } 1612 } 1613 if !exists { 1614 var newDstElement *MetricDescriptor_Indices_AggregationsGroup 1615 if sourceValue != nil { 1616 newDstElement = new(MetricDescriptor_Indices_AggregationsGroup) 1617 newDstElement.Merge(sourceValue) 1618 } 1619 o.SupportedAggregations = append(o.SupportedAggregations, newDstElement) 1620 } 1621 } 1622 1623 } 1624 1625 func (o *MetricDescriptor_Indices_PreAggregatedIndices) MergeRaw(source gotenobject.GotenObjectExt) { 1626 o.Merge(source.(*MetricDescriptor_Indices_PreAggregatedIndices)) 1627 } 1628 1629 func (o *MetricDescriptor_Indices_NonAggregatedIndices) GotenObjectExt() {} 1630 1631 func (o *MetricDescriptor_Indices_NonAggregatedIndices) MakeFullFieldMask() *MetricDescriptor_Indices_NonAggregatedIndices_FieldMask { 1632 return FullMetricDescriptor_Indices_NonAggregatedIndices_FieldMask() 1633 } 1634 1635 func (o *MetricDescriptor_Indices_NonAggregatedIndices) MakeRawFullFieldMask() gotenobject.FieldMask { 1636 return FullMetricDescriptor_Indices_NonAggregatedIndices_FieldMask() 1637 } 1638 1639 func (o *MetricDescriptor_Indices_NonAggregatedIndices) MakeDiffFieldMask(other *MetricDescriptor_Indices_NonAggregatedIndices) *MetricDescriptor_Indices_NonAggregatedIndices_FieldMask { 1640 if o == nil && other == nil { 1641 return &MetricDescriptor_Indices_NonAggregatedIndices_FieldMask{} 1642 } 1643 if o == nil || other == nil { 1644 return FullMetricDescriptor_Indices_NonAggregatedIndices_FieldMask() 1645 } 1646 1647 res := &MetricDescriptor_Indices_NonAggregatedIndices_FieldMask{} 1648 if o.GetName() != other.GetName() { 1649 res.Paths = append(res.Paths, &MetricDescriptorIndicesNonAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesNonAggregatedIndices_FieldPathSelectorName}) 1650 } 1651 1652 if len(o.GetResourceTypes()) == len(other.GetResourceTypes()) { 1653 for i, lValue := range o.GetResourceTypes() { 1654 rValue := other.GetResourceTypes()[i] 1655 if lValue != rValue { 1656 res.Paths = append(res.Paths, &MetricDescriptorIndicesNonAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesNonAggregatedIndices_FieldPathSelectorResourceTypes}) 1657 break 1658 } 1659 } 1660 } else { 1661 res.Paths = append(res.Paths, &MetricDescriptorIndicesNonAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesNonAggregatedIndices_FieldPathSelectorResourceTypes}) 1662 } 1663 1664 if len(o.GetPartitionLabelSets()) == len(other.GetPartitionLabelSets()) { 1665 for i, lValue := range o.GetPartitionLabelSets() { 1666 rValue := other.GetPartitionLabelSets()[i] 1667 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1668 res.Paths = append(res.Paths, &MetricDescriptorIndicesNonAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesNonAggregatedIndices_FieldPathSelectorPartitionLabelSets}) 1669 break 1670 } 1671 } 1672 } else { 1673 res.Paths = append(res.Paths, &MetricDescriptorIndicesNonAggregatedIndices_FieldTerminalPath{selector: MetricDescriptorIndicesNonAggregatedIndices_FieldPathSelectorPartitionLabelSets}) 1674 } 1675 return res 1676 } 1677 1678 func (o *MetricDescriptor_Indices_NonAggregatedIndices) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1679 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_NonAggregatedIndices)) 1680 } 1681 1682 func (o *MetricDescriptor_Indices_NonAggregatedIndices) Clone() *MetricDescriptor_Indices_NonAggregatedIndices { 1683 if o == nil { 1684 return nil 1685 } 1686 result := &MetricDescriptor_Indices_NonAggregatedIndices{} 1687 result.Name = o.Name 1688 result.ResourceTypes = make([]string, len(o.ResourceTypes)) 1689 for i, sourceValue := range o.ResourceTypes { 1690 result.ResourceTypes[i] = sourceValue 1691 } 1692 result.PartitionLabelSets = make([]*MetricDescriptor_Indices_LabelsGroup, len(o.PartitionLabelSets)) 1693 for i, sourceValue := range o.PartitionLabelSets { 1694 result.PartitionLabelSets[i] = sourceValue.Clone() 1695 } 1696 return result 1697 } 1698 1699 func (o *MetricDescriptor_Indices_NonAggregatedIndices) CloneRaw() gotenobject.GotenObjectExt { 1700 return o.Clone() 1701 } 1702 1703 func (o *MetricDescriptor_Indices_NonAggregatedIndices) Merge(source *MetricDescriptor_Indices_NonAggregatedIndices) { 1704 o.Name = source.GetName() 1705 for _, sourceValue := range source.GetResourceTypes() { 1706 exists := false 1707 for _, currentValue := range o.ResourceTypes { 1708 if currentValue == sourceValue { 1709 exists = true 1710 break 1711 } 1712 } 1713 if !exists { 1714 var newDstElement string 1715 newDstElement = sourceValue 1716 o.ResourceTypes = append(o.ResourceTypes, newDstElement) 1717 } 1718 } 1719 1720 for _, sourceValue := range source.GetPartitionLabelSets() { 1721 exists := false 1722 for _, currentValue := range o.PartitionLabelSets { 1723 if proto.Equal(sourceValue, currentValue) { 1724 exists = true 1725 break 1726 } 1727 } 1728 if !exists { 1729 var newDstElement *MetricDescriptor_Indices_LabelsGroup 1730 if sourceValue != nil { 1731 newDstElement = new(MetricDescriptor_Indices_LabelsGroup) 1732 newDstElement.Merge(sourceValue) 1733 } 1734 o.PartitionLabelSets = append(o.PartitionLabelSets, newDstElement) 1735 } 1736 } 1737 1738 } 1739 1740 func (o *MetricDescriptor_Indices_NonAggregatedIndices) MergeRaw(source gotenobject.GotenObjectExt) { 1741 o.Merge(source.(*MetricDescriptor_Indices_NonAggregatedIndices)) 1742 } 1743 1744 func (o *MetricDescriptor_Indices_PaginationIndices) GotenObjectExt() {} 1745 1746 func (o *MetricDescriptor_Indices_PaginationIndices) MakeFullFieldMask() *MetricDescriptor_Indices_PaginationIndices_FieldMask { 1747 return FullMetricDescriptor_Indices_PaginationIndices_FieldMask() 1748 } 1749 1750 func (o *MetricDescriptor_Indices_PaginationIndices) MakeRawFullFieldMask() gotenobject.FieldMask { 1751 return FullMetricDescriptor_Indices_PaginationIndices_FieldMask() 1752 } 1753 1754 func (o *MetricDescriptor_Indices_PaginationIndices) MakeDiffFieldMask(other *MetricDescriptor_Indices_PaginationIndices) *MetricDescriptor_Indices_PaginationIndices_FieldMask { 1755 if o == nil && other == nil { 1756 return &MetricDescriptor_Indices_PaginationIndices_FieldMask{} 1757 } 1758 if o == nil || other == nil { 1759 return FullMetricDescriptor_Indices_PaginationIndices_FieldMask() 1760 } 1761 1762 res := &MetricDescriptor_Indices_PaginationIndices_FieldMask{} 1763 if o.GetName() != other.GetName() { 1764 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorName}) 1765 } 1766 1767 if len(o.GetResourceTypes()) == len(other.GetResourceTypes()) { 1768 for i, lValue := range o.GetResourceTypes() { 1769 rValue := other.GetResourceTypes()[i] 1770 if lValue != rValue { 1771 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorResourceTypes}) 1772 break 1773 } 1774 } 1775 } else { 1776 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorResourceTypes}) 1777 } 1778 1779 if len(o.GetPartitionLabelSets()) == len(other.GetPartitionLabelSets()) { 1780 for i, lValue := range o.GetPartitionLabelSets() { 1781 rValue := other.GetPartitionLabelSets()[i] 1782 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1783 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorPartitionLabelSets}) 1784 break 1785 } 1786 } 1787 } else { 1788 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorPartitionLabelSets}) 1789 } 1790 1791 if len(o.GetViews()) == len(other.GetViews()) { 1792 for i, lValue := range o.GetViews() { 1793 rValue := other.GetViews()[i] 1794 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1795 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorViews}) 1796 break 1797 } 1798 } 1799 } else { 1800 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorViews}) 1801 } 1802 1803 if len(o.GetFunctions()) == len(other.GetFunctions()) { 1804 for i, lValue := range o.GetFunctions() { 1805 rValue := other.GetFunctions()[i] 1806 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1807 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorFunctions}) 1808 break 1809 } 1810 } 1811 } else { 1812 res.Paths = append(res.Paths, &MetricDescriptorIndicesPaginationIndices_FieldTerminalPath{selector: MetricDescriptorIndicesPaginationIndices_FieldPathSelectorFunctions}) 1813 } 1814 return res 1815 } 1816 1817 func (o *MetricDescriptor_Indices_PaginationIndices) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1818 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_PaginationIndices)) 1819 } 1820 1821 func (o *MetricDescriptor_Indices_PaginationIndices) Clone() *MetricDescriptor_Indices_PaginationIndices { 1822 if o == nil { 1823 return nil 1824 } 1825 result := &MetricDescriptor_Indices_PaginationIndices{} 1826 result.Name = o.Name 1827 result.ResourceTypes = make([]string, len(o.ResourceTypes)) 1828 for i, sourceValue := range o.ResourceTypes { 1829 result.ResourceTypes[i] = sourceValue 1830 } 1831 result.PartitionLabelSets = make([]*MetricDescriptor_Indices_LabelsGroup, len(o.PartitionLabelSets)) 1832 for i, sourceValue := range o.PartitionLabelSets { 1833 result.PartitionLabelSets[i] = sourceValue.Clone() 1834 } 1835 result.Views = make([]*MetricDescriptor_Indices_PaginationView, len(o.Views)) 1836 for i, sourceValue := range o.Views { 1837 result.Views[i] = sourceValue.Clone() 1838 } 1839 result.Functions = make([]*MetricDescriptor_Indices_SortingFunction, len(o.Functions)) 1840 for i, sourceValue := range o.Functions { 1841 result.Functions[i] = sourceValue.Clone() 1842 } 1843 return result 1844 } 1845 1846 func (o *MetricDescriptor_Indices_PaginationIndices) CloneRaw() gotenobject.GotenObjectExt { 1847 return o.Clone() 1848 } 1849 1850 func (o *MetricDescriptor_Indices_PaginationIndices) Merge(source *MetricDescriptor_Indices_PaginationIndices) { 1851 o.Name = source.GetName() 1852 for _, sourceValue := range source.GetResourceTypes() { 1853 exists := false 1854 for _, currentValue := range o.ResourceTypes { 1855 if currentValue == sourceValue { 1856 exists = true 1857 break 1858 } 1859 } 1860 if !exists { 1861 var newDstElement string 1862 newDstElement = sourceValue 1863 o.ResourceTypes = append(o.ResourceTypes, newDstElement) 1864 } 1865 } 1866 1867 for _, sourceValue := range source.GetPartitionLabelSets() { 1868 exists := false 1869 for _, currentValue := range o.PartitionLabelSets { 1870 if proto.Equal(sourceValue, currentValue) { 1871 exists = true 1872 break 1873 } 1874 } 1875 if !exists { 1876 var newDstElement *MetricDescriptor_Indices_LabelsGroup 1877 if sourceValue != nil { 1878 newDstElement = new(MetricDescriptor_Indices_LabelsGroup) 1879 newDstElement.Merge(sourceValue) 1880 } 1881 o.PartitionLabelSets = append(o.PartitionLabelSets, newDstElement) 1882 } 1883 } 1884 1885 for _, sourceValue := range source.GetViews() { 1886 exists := false 1887 for _, currentValue := range o.Views { 1888 if proto.Equal(sourceValue, currentValue) { 1889 exists = true 1890 break 1891 } 1892 } 1893 if !exists { 1894 var newDstElement *MetricDescriptor_Indices_PaginationView 1895 if sourceValue != nil { 1896 newDstElement = new(MetricDescriptor_Indices_PaginationView) 1897 newDstElement.Merge(sourceValue) 1898 } 1899 o.Views = append(o.Views, newDstElement) 1900 } 1901 } 1902 1903 for _, sourceValue := range source.GetFunctions() { 1904 exists := false 1905 for _, currentValue := range o.Functions { 1906 if proto.Equal(sourceValue, currentValue) { 1907 exists = true 1908 break 1909 } 1910 } 1911 if !exists { 1912 var newDstElement *MetricDescriptor_Indices_SortingFunction 1913 if sourceValue != nil { 1914 newDstElement = new(MetricDescriptor_Indices_SortingFunction) 1915 newDstElement.Merge(sourceValue) 1916 } 1917 o.Functions = append(o.Functions, newDstElement) 1918 } 1919 } 1920 1921 } 1922 1923 func (o *MetricDescriptor_Indices_PaginationIndices) MergeRaw(source gotenobject.GotenObjectExt) { 1924 o.Merge(source.(*MetricDescriptor_Indices_PaginationIndices)) 1925 } 1926 1927 func (o *MetricDescriptor_Indices_IndexGroups) GotenObjectExt() {} 1928 1929 func (o *MetricDescriptor_Indices_IndexGroups) MakeFullFieldMask() *MetricDescriptor_Indices_IndexGroups_FieldMask { 1930 return FullMetricDescriptor_Indices_IndexGroups_FieldMask() 1931 } 1932 1933 func (o *MetricDescriptor_Indices_IndexGroups) MakeRawFullFieldMask() gotenobject.FieldMask { 1934 return FullMetricDescriptor_Indices_IndexGroups_FieldMask() 1935 } 1936 1937 func (o *MetricDescriptor_Indices_IndexGroups) MakeDiffFieldMask(other *MetricDescriptor_Indices_IndexGroups) *MetricDescriptor_Indices_IndexGroups_FieldMask { 1938 if o == nil && other == nil { 1939 return &MetricDescriptor_Indices_IndexGroups_FieldMask{} 1940 } 1941 if o == nil || other == nil { 1942 return FullMetricDescriptor_Indices_IndexGroups_FieldMask() 1943 } 1944 1945 res := &MetricDescriptor_Indices_IndexGroups_FieldMask{} 1946 1947 if len(o.GetPreAggregatedIndices()) == len(other.GetPreAggregatedIndices()) { 1948 for i, lValue := range o.GetPreAggregatedIndices() { 1949 rValue := other.GetPreAggregatedIndices()[i] 1950 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1951 res.Paths = append(res.Paths, &MetricDescriptorIndicesIndexGroups_FieldTerminalPath{selector: MetricDescriptorIndicesIndexGroups_FieldPathSelectorPreAggregatedIndices}) 1952 break 1953 } 1954 } 1955 } else { 1956 res.Paths = append(res.Paths, &MetricDescriptorIndicesIndexGroups_FieldTerminalPath{selector: MetricDescriptorIndicesIndexGroups_FieldPathSelectorPreAggregatedIndices}) 1957 } 1958 1959 if len(o.GetNonAggregatedIndices()) == len(other.GetNonAggregatedIndices()) { 1960 for i, lValue := range o.GetNonAggregatedIndices() { 1961 rValue := other.GetNonAggregatedIndices()[i] 1962 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1963 res.Paths = append(res.Paths, &MetricDescriptorIndicesIndexGroups_FieldTerminalPath{selector: MetricDescriptorIndicesIndexGroups_FieldPathSelectorNonAggregatedIndices}) 1964 break 1965 } 1966 } 1967 } else { 1968 res.Paths = append(res.Paths, &MetricDescriptorIndicesIndexGroups_FieldTerminalPath{selector: MetricDescriptorIndicesIndexGroups_FieldPathSelectorNonAggregatedIndices}) 1969 } 1970 1971 if len(o.GetPaginationIndices()) == len(other.GetPaginationIndices()) { 1972 for i, lValue := range o.GetPaginationIndices() { 1973 rValue := other.GetPaginationIndices()[i] 1974 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 1975 res.Paths = append(res.Paths, &MetricDescriptorIndicesIndexGroups_FieldTerminalPath{selector: MetricDescriptorIndicesIndexGroups_FieldPathSelectorPaginationIndices}) 1976 break 1977 } 1978 } 1979 } else { 1980 res.Paths = append(res.Paths, &MetricDescriptorIndicesIndexGroups_FieldTerminalPath{selector: MetricDescriptorIndicesIndexGroups_FieldPathSelectorPaginationIndices}) 1981 } 1982 return res 1983 } 1984 1985 func (o *MetricDescriptor_Indices_IndexGroups) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 1986 return o.MakeDiffFieldMask(other.(*MetricDescriptor_Indices_IndexGroups)) 1987 } 1988 1989 func (o *MetricDescriptor_Indices_IndexGroups) Clone() *MetricDescriptor_Indices_IndexGroups { 1990 if o == nil { 1991 return nil 1992 } 1993 result := &MetricDescriptor_Indices_IndexGroups{} 1994 result.PreAggregatedIndices = make([]*MetricDescriptor_Indices_PreAggregatedIndices, len(o.PreAggregatedIndices)) 1995 for i, sourceValue := range o.PreAggregatedIndices { 1996 result.PreAggregatedIndices[i] = sourceValue.Clone() 1997 } 1998 result.NonAggregatedIndices = make([]*MetricDescriptor_Indices_NonAggregatedIndices, len(o.NonAggregatedIndices)) 1999 for i, sourceValue := range o.NonAggregatedIndices { 2000 result.NonAggregatedIndices[i] = sourceValue.Clone() 2001 } 2002 result.PaginationIndices = make([]*MetricDescriptor_Indices_PaginationIndices, len(o.PaginationIndices)) 2003 for i, sourceValue := range o.PaginationIndices { 2004 result.PaginationIndices[i] = sourceValue.Clone() 2005 } 2006 return result 2007 } 2008 2009 func (o *MetricDescriptor_Indices_IndexGroups) CloneRaw() gotenobject.GotenObjectExt { 2010 return o.Clone() 2011 } 2012 2013 func (o *MetricDescriptor_Indices_IndexGroups) Merge(source *MetricDescriptor_Indices_IndexGroups) { 2014 for _, sourceValue := range source.GetPreAggregatedIndices() { 2015 exists := false 2016 for _, currentValue := range o.PreAggregatedIndices { 2017 if proto.Equal(sourceValue, currentValue) { 2018 exists = true 2019 break 2020 } 2021 } 2022 if !exists { 2023 var newDstElement *MetricDescriptor_Indices_PreAggregatedIndices 2024 if sourceValue != nil { 2025 newDstElement = new(MetricDescriptor_Indices_PreAggregatedIndices) 2026 newDstElement.Merge(sourceValue) 2027 } 2028 o.PreAggregatedIndices = append(o.PreAggregatedIndices, newDstElement) 2029 } 2030 } 2031 2032 for _, sourceValue := range source.GetNonAggregatedIndices() { 2033 exists := false 2034 for _, currentValue := range o.NonAggregatedIndices { 2035 if proto.Equal(sourceValue, currentValue) { 2036 exists = true 2037 break 2038 } 2039 } 2040 if !exists { 2041 var newDstElement *MetricDescriptor_Indices_NonAggregatedIndices 2042 if sourceValue != nil { 2043 newDstElement = new(MetricDescriptor_Indices_NonAggregatedIndices) 2044 newDstElement.Merge(sourceValue) 2045 } 2046 o.NonAggregatedIndices = append(o.NonAggregatedIndices, newDstElement) 2047 } 2048 } 2049 2050 for _, sourceValue := range source.GetPaginationIndices() { 2051 exists := false 2052 for _, currentValue := range o.PaginationIndices { 2053 if proto.Equal(sourceValue, currentValue) { 2054 exists = true 2055 break 2056 } 2057 } 2058 if !exists { 2059 var newDstElement *MetricDescriptor_Indices_PaginationIndices 2060 if sourceValue != nil { 2061 newDstElement = new(MetricDescriptor_Indices_PaginationIndices) 2062 newDstElement.Merge(sourceValue) 2063 } 2064 o.PaginationIndices = append(o.PaginationIndices, newDstElement) 2065 } 2066 } 2067 2068 } 2069 2070 func (o *MetricDescriptor_Indices_IndexGroups) MergeRaw(source gotenobject.GotenObjectExt) { 2071 o.Merge(source.(*MetricDescriptor_Indices_IndexGroups)) 2072 } 2073 2074 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) GotenObjectExt() {} 2075 2076 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) MakeFullFieldMask() *MetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask { 2077 return FullMetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask() 2078 } 2079 2080 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) MakeRawFullFieldMask() gotenobject.FieldMask { 2081 return FullMetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask() 2082 } 2083 2084 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) MakeDiffFieldMask(other *MetricDescriptor_BinaryIndices_PreAggregatedIndex) *MetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask { 2085 if o == nil && other == nil { 2086 return &MetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask{} 2087 } 2088 if o == nil || other == nil { 2089 return FullMetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask() 2090 } 2091 2092 res := &MetricDescriptor_BinaryIndices_PreAggregatedIndex_FieldMask{} 2093 if string(o.GetKeyData()) != string(other.GetKeyData()) { 2094 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldPathSelectorKeyData}) 2095 } 2096 2097 if len(o.GetWritingAligners()) == len(other.GetWritingAligners()) { 2098 for i, lValue := range o.GetWritingAligners() { 2099 rValue := other.GetWritingAligners()[i] 2100 if string(lValue) != string(rValue) { 2101 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldPathSelectorWritingAligners}) 2102 break 2103 } 2104 } 2105 } else { 2106 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldPathSelectorWritingAligners}) 2107 } 2108 2109 if len(o.GetClosedAligners()) == len(other.GetClosedAligners()) { 2110 for i, lValue := range o.GetClosedAligners() { 2111 rValue := other.GetClosedAligners()[i] 2112 if string(lValue) != string(rValue) { 2113 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldPathSelectorClosedAligners}) 2114 break 2115 } 2116 } 2117 } else { 2118 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPreAggregatedIndex_FieldPathSelectorClosedAligners}) 2119 } 2120 return res 2121 } 2122 2123 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2124 return o.MakeDiffFieldMask(other.(*MetricDescriptor_BinaryIndices_PreAggregatedIndex)) 2125 } 2126 2127 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) Clone() *MetricDescriptor_BinaryIndices_PreAggregatedIndex { 2128 if o == nil { 2129 return nil 2130 } 2131 result := &MetricDescriptor_BinaryIndices_PreAggregatedIndex{} 2132 result.KeyData = make([]byte, len(o.KeyData)) 2133 for i, bt := range o.KeyData { 2134 result.KeyData[i] = bt 2135 } 2136 result.WritingAligners = make([][]byte, len(o.WritingAligners)) 2137 for i, sourceValue := range o.WritingAligners { 2138 result.WritingAligners[i] = sourceValue 2139 } 2140 result.ClosedAligners = make([][]byte, len(o.ClosedAligners)) 2141 for i, sourceValue := range o.ClosedAligners { 2142 result.ClosedAligners[i] = sourceValue 2143 } 2144 return result 2145 } 2146 2147 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) CloneRaw() gotenobject.GotenObjectExt { 2148 return o.Clone() 2149 } 2150 2151 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) Merge(source *MetricDescriptor_BinaryIndices_PreAggregatedIndex) { 2152 o.KeyData = make([]byte, len(source.GetKeyData())) 2153 for i, bt := range source.GetKeyData() { 2154 o.KeyData[i] = bt 2155 } 2156 for _, sourceValue := range source.GetWritingAligners() { 2157 exists := false 2158 for _, currentValue := range o.WritingAligners { 2159 if string(currentValue) == string(sourceValue) { 2160 exists = true 2161 break 2162 } 2163 } 2164 if !exists { 2165 var newDstElement []byte 2166 newDstElement = sourceValue 2167 o.WritingAligners = append(o.WritingAligners, newDstElement) 2168 } 2169 } 2170 2171 for _, sourceValue := range source.GetClosedAligners() { 2172 exists := false 2173 for _, currentValue := range o.ClosedAligners { 2174 if string(currentValue) == string(sourceValue) { 2175 exists = true 2176 break 2177 } 2178 } 2179 if !exists { 2180 var newDstElement []byte 2181 newDstElement = sourceValue 2182 o.ClosedAligners = append(o.ClosedAligners, newDstElement) 2183 } 2184 } 2185 2186 } 2187 2188 func (o *MetricDescriptor_BinaryIndices_PreAggregatedIndex) MergeRaw(source gotenobject.GotenObjectExt) { 2189 o.Merge(source.(*MetricDescriptor_BinaryIndices_PreAggregatedIndex)) 2190 } 2191 2192 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) GotenObjectExt() {} 2193 2194 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) MakeFullFieldMask() *MetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask { 2195 return FullMetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask() 2196 } 2197 2198 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) MakeRawFullFieldMask() gotenobject.FieldMask { 2199 return FullMetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask() 2200 } 2201 2202 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) MakeDiffFieldMask(other *MetricDescriptor_BinaryIndices_PaginatingIndex) *MetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask { 2203 if o == nil && other == nil { 2204 return &MetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask{} 2205 } 2206 if o == nil || other == nil { 2207 return FullMetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask() 2208 } 2209 2210 res := &MetricDescriptor_BinaryIndices_PaginatingIndex_FieldMask{} 2211 if string(o.GetKeyData()) != string(other.GetKeyData()) { 2212 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPaginatingIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPaginatingIndex_FieldPathSelectorKeyData}) 2213 } 2214 2215 if len(o.GetWritingFunctions()) == len(other.GetWritingFunctions()) { 2216 for i, lValue := range o.GetWritingFunctions() { 2217 rValue := other.GetWritingFunctions()[i] 2218 if string(lValue) != string(rValue) { 2219 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPaginatingIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPaginatingIndex_FieldPathSelectorWritingFunctions}) 2220 break 2221 } 2222 } 2223 } else { 2224 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPaginatingIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPaginatingIndex_FieldPathSelectorWritingFunctions}) 2225 } 2226 2227 if len(o.GetClosedFunctions()) == len(other.GetClosedFunctions()) { 2228 for i, lValue := range o.GetClosedFunctions() { 2229 rValue := other.GetClosedFunctions()[i] 2230 if string(lValue) != string(rValue) { 2231 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPaginatingIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPaginatingIndex_FieldPathSelectorClosedFunctions}) 2232 break 2233 } 2234 } 2235 } else { 2236 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesPaginatingIndex_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesPaginatingIndex_FieldPathSelectorClosedFunctions}) 2237 } 2238 return res 2239 } 2240 2241 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2242 return o.MakeDiffFieldMask(other.(*MetricDescriptor_BinaryIndices_PaginatingIndex)) 2243 } 2244 2245 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) Clone() *MetricDescriptor_BinaryIndices_PaginatingIndex { 2246 if o == nil { 2247 return nil 2248 } 2249 result := &MetricDescriptor_BinaryIndices_PaginatingIndex{} 2250 result.KeyData = make([]byte, len(o.KeyData)) 2251 for i, bt := range o.KeyData { 2252 result.KeyData[i] = bt 2253 } 2254 result.WritingFunctions = make([][]byte, len(o.WritingFunctions)) 2255 for i, sourceValue := range o.WritingFunctions { 2256 result.WritingFunctions[i] = sourceValue 2257 } 2258 result.ClosedFunctions = make([][]byte, len(o.ClosedFunctions)) 2259 for i, sourceValue := range o.ClosedFunctions { 2260 result.ClosedFunctions[i] = sourceValue 2261 } 2262 return result 2263 } 2264 2265 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) CloneRaw() gotenobject.GotenObjectExt { 2266 return o.Clone() 2267 } 2268 2269 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) Merge(source *MetricDescriptor_BinaryIndices_PaginatingIndex) { 2270 o.KeyData = make([]byte, len(source.GetKeyData())) 2271 for i, bt := range source.GetKeyData() { 2272 o.KeyData[i] = bt 2273 } 2274 for _, sourceValue := range source.GetWritingFunctions() { 2275 exists := false 2276 for _, currentValue := range o.WritingFunctions { 2277 if string(currentValue) == string(sourceValue) { 2278 exists = true 2279 break 2280 } 2281 } 2282 if !exists { 2283 var newDstElement []byte 2284 newDstElement = sourceValue 2285 o.WritingFunctions = append(o.WritingFunctions, newDstElement) 2286 } 2287 } 2288 2289 for _, sourceValue := range source.GetClosedFunctions() { 2290 exists := false 2291 for _, currentValue := range o.ClosedFunctions { 2292 if string(currentValue) == string(sourceValue) { 2293 exists = true 2294 break 2295 } 2296 } 2297 if !exists { 2298 var newDstElement []byte 2299 newDstElement = sourceValue 2300 o.ClosedFunctions = append(o.ClosedFunctions, newDstElement) 2301 } 2302 } 2303 2304 } 2305 2306 func (o *MetricDescriptor_BinaryIndices_PaginatingIndex) MergeRaw(source gotenobject.GotenObjectExt) { 2307 o.Merge(source.(*MetricDescriptor_BinaryIndices_PaginatingIndex)) 2308 } 2309 2310 func (o *MetricDescriptor_BinaryIndices_ByResourceType) GotenObjectExt() {} 2311 2312 func (o *MetricDescriptor_BinaryIndices_ByResourceType) MakeFullFieldMask() *MetricDescriptor_BinaryIndices_ByResourceType_FieldMask { 2313 return FullMetricDescriptor_BinaryIndices_ByResourceType_FieldMask() 2314 } 2315 2316 func (o *MetricDescriptor_BinaryIndices_ByResourceType) MakeRawFullFieldMask() gotenobject.FieldMask { 2317 return FullMetricDescriptor_BinaryIndices_ByResourceType_FieldMask() 2318 } 2319 2320 func (o *MetricDescriptor_BinaryIndices_ByResourceType) MakeDiffFieldMask(other *MetricDescriptor_BinaryIndices_ByResourceType) *MetricDescriptor_BinaryIndices_ByResourceType_FieldMask { 2321 if o == nil && other == nil { 2322 return &MetricDescriptor_BinaryIndices_ByResourceType_FieldMask{} 2323 } 2324 if o == nil || other == nil { 2325 return FullMetricDescriptor_BinaryIndices_ByResourceType_FieldMask() 2326 } 2327 2328 res := &MetricDescriptor_BinaryIndices_ByResourceType_FieldMask{} 2329 if o.GetResourceType() != other.GetResourceType() { 2330 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorResourceType}) 2331 } 2332 2333 if len(o.GetAggsEncoder()) == len(other.GetAggsEncoder()) { 2334 for i, lValue := range o.GetAggsEncoder() { 2335 rValue := other.GetAggsEncoder()[i] 2336 if string(lValue) != string(rValue) { 2337 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorAggsEncoder}) 2338 break 2339 } 2340 } 2341 } else { 2342 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorAggsEncoder}) 2343 } 2344 2345 if len(o.GetPreAggregatedIndices()) == len(other.GetPreAggregatedIndices()) { 2346 for i, lValue := range o.GetPreAggregatedIndices() { 2347 rValue := other.GetPreAggregatedIndices()[i] 2348 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 2349 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorPreAggregatedIndices}) 2350 break 2351 } 2352 } 2353 } else { 2354 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorPreAggregatedIndices}) 2355 } 2356 2357 if len(o.GetPaginatingIndices()) == len(other.GetPaginatingIndices()) { 2358 for i, lValue := range o.GetPaginatingIndices() { 2359 rValue := other.GetPaginatingIndices()[i] 2360 if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 { 2361 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorPaginatingIndices}) 2362 break 2363 } 2364 } 2365 } else { 2366 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorPaginatingIndices}) 2367 } 2368 2369 if len(o.GetNonAggregatedIndices()) == len(other.GetNonAggregatedIndices()) { 2370 for i, lValue := range o.GetNonAggregatedIndices() { 2371 rValue := other.GetNonAggregatedIndices()[i] 2372 if string(lValue) != string(rValue) { 2373 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorNonAggregatedIndices}) 2374 break 2375 } 2376 } 2377 } else { 2378 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorNonAggregatedIndices}) 2379 } 2380 2381 if len(o.GetNameParts()) == len(other.GetNameParts()) { 2382 for i, lValue := range o.GetNameParts() { 2383 rValue := other.GetNameParts()[i] 2384 if lValue != rValue { 2385 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorNameParts}) 2386 break 2387 } 2388 } 2389 } else { 2390 res.Paths = append(res.Paths, &MetricDescriptorBinaryIndicesByResourceType_FieldTerminalPath{selector: MetricDescriptorBinaryIndicesByResourceType_FieldPathSelectorNameParts}) 2391 } 2392 return res 2393 } 2394 2395 func (o *MetricDescriptor_BinaryIndices_ByResourceType) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask { 2396 return o.MakeDiffFieldMask(other.(*MetricDescriptor_BinaryIndices_ByResourceType)) 2397 } 2398 2399 func (o *MetricDescriptor_BinaryIndices_ByResourceType) Clone() *MetricDescriptor_BinaryIndices_ByResourceType { 2400 if o == nil { 2401 return nil 2402 } 2403 result := &MetricDescriptor_BinaryIndices_ByResourceType{} 2404 result.ResourceType = o.ResourceType 2405 result.AggsEncoder = make([][]byte, len(o.AggsEncoder)) 2406 for i, sourceValue := range o.AggsEncoder { 2407 result.AggsEncoder[i] = sourceValue 2408 } 2409 result.PreAggregatedIndices = make([]*MetricDescriptor_BinaryIndices_PreAggregatedIndex, len(o.PreAggregatedIndices)) 2410 for i, sourceValue := range o.PreAggregatedIndices { 2411 result.PreAggregatedIndices[i] = sourceValue.Clone() 2412 } 2413 result.PaginatingIndices = make([]*MetricDescriptor_BinaryIndices_PaginatingIndex, len(o.PaginatingIndices)) 2414 for i, sourceValue := range o.PaginatingIndices { 2415 result.PaginatingIndices[i] = sourceValue.Clone() 2416 } 2417 result.NonAggregatedIndices = make([][]byte, len(o.NonAggregatedIndices)) 2418 for i, sourceValue := range o.NonAggregatedIndices { 2419 result.NonAggregatedIndices[i] = sourceValue 2420 } 2421 result.NameParts = make([]string, len(o.NameParts)) 2422 for i, sourceValue := range o.NameParts { 2423 result.NameParts[i] = sourceValue 2424 } 2425 return result 2426 } 2427 2428 func (o *MetricDescriptor_BinaryIndices_ByResourceType) CloneRaw() gotenobject.GotenObjectExt { 2429 return o.Clone() 2430 } 2431 2432 func (o *MetricDescriptor_BinaryIndices_ByResourceType) Merge(source *MetricDescriptor_BinaryIndices_ByResourceType) { 2433 o.ResourceType = source.GetResourceType() 2434 for _, sourceValue := range source.GetAggsEncoder() { 2435 exists := false 2436 for _, currentValue := range o.AggsEncoder { 2437 if string(currentValue) == string(sourceValue) { 2438 exists = true 2439 break 2440 } 2441 } 2442 if !exists { 2443 var newDstElement []byte 2444 newDstElement = sourceValue 2445 o.AggsEncoder = append(o.AggsEncoder, newDstElement) 2446 } 2447 } 2448 2449 for _, sourceValue := range source.GetPreAggregatedIndices() { 2450 exists := false 2451 for _, currentValue := range o.PreAggregatedIndices { 2452 if proto.Equal(sourceValue, currentValue) { 2453 exists = true 2454 break 2455 } 2456 } 2457 if !exists { 2458 var newDstElement *MetricDescriptor_BinaryIndices_PreAggregatedIndex 2459 if sourceValue != nil { 2460 newDstElement = new(MetricDescriptor_BinaryIndices_PreAggregatedIndex) 2461 newDstElement.Merge(sourceValue) 2462 } 2463 o.PreAggregatedIndices = append(o.PreAggregatedIndices, newDstElement) 2464 } 2465 } 2466 2467 for _, sourceValue := range source.GetPaginatingIndices() { 2468 exists := false 2469 for _, currentValue := range o.PaginatingIndices { 2470 if proto.Equal(sourceValue, currentValue) { 2471 exists = true 2472 break 2473 } 2474 } 2475 if !exists { 2476 var newDstElement *MetricDescriptor_BinaryIndices_PaginatingIndex 2477 if sourceValue != nil { 2478 newDstElement = new(MetricDescriptor_BinaryIndices_PaginatingIndex) 2479 newDstElement.Merge(sourceValue) 2480 } 2481 o.PaginatingIndices = append(o.PaginatingIndices, newDstElement) 2482 } 2483 } 2484 2485 for _, sourceValue := range source.GetNonAggregatedIndices() { 2486 exists := false 2487 for _, currentValue := range o.NonAggregatedIndices { 2488 if string(currentValue) == string(sourceValue) { 2489 exists = true 2490 break 2491 } 2492 } 2493 if !exists { 2494 var newDstElement []byte 2495 newDstElement = sourceValue 2496 o.NonAggregatedIndices = append(o.NonAggregatedIndices, newDstElement) 2497 } 2498 } 2499 2500 for _, sourceValue := range source.GetNameParts() { 2501 exists := false 2502 for _, currentValue := range o.NameParts { 2503 if currentValue == sourceValue { 2504 exists = true 2505 break 2506 } 2507 } 2508 if !exists { 2509 var newDstElement string 2510 newDstElement = sourceValue 2511 o.NameParts = append(o.NameParts, newDstElement) 2512 } 2513 } 2514 2515 } 2516 2517 func (o *MetricDescriptor_BinaryIndices_ByResourceType) MergeRaw(source gotenobject.GotenObjectExt) { 2518 o.Merge(source.(*MetricDescriptor_BinaryIndices_ByResourceType)) 2519 }