github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/resources/v4/notification_channel/notification_channel.pb.object_ext.go (about)

     1  // Code generated by protoc-gen-goten-object
     2  // File: edgelq/monitoring/proto/v4/notification_channel.proto
     3  // DO NOT EDIT!!!
     4  
     5  package notification_channel
     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  	project "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/project"
    20  	meta "github.com/cloudwan/goten-sdk/types/meta"
    21  	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
    22  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
    23  )
    24  
    25  // ensure the imports are used
    26  var (
    27  	_ = new(fmt.Stringer)
    28  	_ = new(sort.Interface)
    29  
    30  	_ = new(proto.Message)
    31  	_ = googlefieldmaskpb.FieldMask{}
    32  
    33  	_ = new(gotenobject.FieldPath)
    34  )
    35  
    36  // make sure we're using proto imports
    37  var (
    38  	_ = &project.Project{}
    39  	_ = &fieldmaskpb.FieldMask{}
    40  	_ = &timestamppb.Timestamp{}
    41  	_ = &meta.Meta{}
    42  )
    43  
    44  func (o *NotificationChannel) GotenObjectExt() {}
    45  
    46  func (o *NotificationChannel) MakeFullFieldMask() *NotificationChannel_FieldMask {
    47  	return FullNotificationChannel_FieldMask()
    48  }
    49  
    50  func (o *NotificationChannel) MakeRawFullFieldMask() gotenobject.FieldMask {
    51  	return FullNotificationChannel_FieldMask()
    52  }
    53  
    54  func (o *NotificationChannel) MakeDiffFieldMask(other *NotificationChannel) *NotificationChannel_FieldMask {
    55  	if o == nil && other == nil {
    56  		return &NotificationChannel_FieldMask{}
    57  	}
    58  	if o == nil || other == nil {
    59  		return FullNotificationChannel_FieldMask()
    60  	}
    61  
    62  	res := &NotificationChannel_FieldMask{}
    63  	if o.GetName().String() != other.GetName().String() {
    64  		res.Paths = append(res.Paths, &NotificationChannel_FieldTerminalPath{selector: NotificationChannel_FieldPathSelectorName})
    65  	}
    66  	{
    67  		subMask := o.GetMetadata().MakeDiffFieldMask(other.GetMetadata())
    68  		if subMask.IsFull() {
    69  			res.Paths = append(res.Paths, &NotificationChannel_FieldTerminalPath{selector: NotificationChannel_FieldPathSelectorMetadata})
    70  		} else {
    71  			for _, subpath := range subMask.Paths {
    72  				res.Paths = append(res.Paths, &NotificationChannel_FieldSubPath{selector: NotificationChannel_FieldPathSelectorMetadata, subPath: subpath})
    73  			}
    74  		}
    75  	}
    76  	if o.GetDisplayName() != other.GetDisplayName() {
    77  		res.Paths = append(res.Paths, &NotificationChannel_FieldTerminalPath{selector: NotificationChannel_FieldPathSelectorDisplayName})
    78  	}
    79  	{
    80  		subMask := o.GetSpec().MakeDiffFieldMask(other.GetSpec())
    81  		if subMask.IsFull() {
    82  			res.Paths = append(res.Paths, &NotificationChannel_FieldTerminalPath{selector: NotificationChannel_FieldPathSelectorSpec})
    83  		} else {
    84  			for _, subpath := range subMask.Paths {
    85  				res.Paths = append(res.Paths, &NotificationChannel_FieldSubPath{selector: NotificationChannel_FieldPathSelectorSpec, subPath: subpath})
    86  			}
    87  		}
    88  	}
    89  	{
    90  		subMask := o.GetState().MakeDiffFieldMask(other.GetState())
    91  		if subMask.IsFull() {
    92  			res.Paths = append(res.Paths, &NotificationChannel_FieldTerminalPath{selector: NotificationChannel_FieldPathSelectorState})
    93  		} else {
    94  			for _, subpath := range subMask.Paths {
    95  				res.Paths = append(res.Paths, &NotificationChannel_FieldSubPath{selector: NotificationChannel_FieldPathSelectorState, subPath: subpath})
    96  			}
    97  		}
    98  	}
    99  	if o.GetDescription() != other.GetDescription() {
   100  		res.Paths = append(res.Paths, &NotificationChannel_FieldTerminalPath{selector: NotificationChannel_FieldPathSelectorDescription})
   101  	}
   102  	return res
   103  }
   104  
   105  func (o *NotificationChannel) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   106  	return o.MakeDiffFieldMask(other.(*NotificationChannel))
   107  }
   108  
   109  func (o *NotificationChannel) Clone() *NotificationChannel {
   110  	if o == nil {
   111  		return nil
   112  	}
   113  	result := &NotificationChannel{}
   114  	if o.Name == nil {
   115  		result.Name = nil
   116  	} else if data, err := o.Name.ProtoString(); err != nil {
   117  		panic(err)
   118  	} else {
   119  		result.Name = &Name{}
   120  		if err := result.Name.ParseProtoString(data); err != nil {
   121  			panic(err)
   122  		}
   123  	}
   124  	result.Metadata = o.Metadata.Clone()
   125  	result.DisplayName = o.DisplayName
   126  	result.Spec = o.Spec.Clone()
   127  	result.State = o.State.Clone()
   128  	result.Description = o.Description
   129  	return result
   130  }
   131  
   132  func (o *NotificationChannel) CloneRaw() gotenobject.GotenObjectExt {
   133  	return o.Clone()
   134  }
   135  
   136  func (o *NotificationChannel) Merge(source *NotificationChannel) {
   137  	if source.GetName() != nil {
   138  		if data, err := source.GetName().ProtoString(); err != nil {
   139  			panic(err)
   140  		} else {
   141  			o.Name = &Name{}
   142  			if err := o.Name.ParseProtoString(data); err != nil {
   143  				panic(err)
   144  			}
   145  		}
   146  	} else {
   147  		o.Name = nil
   148  	}
   149  	if source.GetMetadata() != nil {
   150  		if o.Metadata == nil {
   151  			o.Metadata = new(meta.Meta)
   152  		}
   153  		o.Metadata.Merge(source.GetMetadata())
   154  	}
   155  	o.DisplayName = source.GetDisplayName()
   156  	if source.GetSpec() != nil {
   157  		if o.Spec == nil {
   158  			o.Spec = new(NotificationChannel_Spec)
   159  		}
   160  		o.Spec.Merge(source.GetSpec())
   161  	}
   162  	if source.GetState() != nil {
   163  		if o.State == nil {
   164  			o.State = new(NotificationChannel_State)
   165  		}
   166  		o.State.Merge(source.GetState())
   167  	}
   168  	o.Description = source.GetDescription()
   169  }
   170  
   171  func (o *NotificationChannel) MergeRaw(source gotenobject.GotenObjectExt) {
   172  	o.Merge(source.(*NotificationChannel))
   173  }
   174  
   175  func (o *NotificationChannel_Spec) GotenObjectExt() {}
   176  
   177  func (o *NotificationChannel_Spec) MakeFullFieldMask() *NotificationChannel_Spec_FieldMask {
   178  	return FullNotificationChannel_Spec_FieldMask()
   179  }
   180  
   181  func (o *NotificationChannel_Spec) MakeRawFullFieldMask() gotenobject.FieldMask {
   182  	return FullNotificationChannel_Spec_FieldMask()
   183  }
   184  
   185  func (o *NotificationChannel_Spec) MakeDiffFieldMask(other *NotificationChannel_Spec) *NotificationChannel_Spec_FieldMask {
   186  	if o == nil && other == nil {
   187  		return &NotificationChannel_Spec_FieldMask{}
   188  	}
   189  	if o == nil || other == nil {
   190  		return FullNotificationChannel_Spec_FieldMask()
   191  	}
   192  
   193  	res := &NotificationChannel_Spec_FieldMask{}
   194  	if o.GetEnabled() != other.GetEnabled() {
   195  		res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorEnabled})
   196  	}
   197  	if o.GetType() != other.GetType() {
   198  		res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorType})
   199  	}
   200  	{
   201  		subMask := o.GetEmail().MakeDiffFieldMask(other.GetEmail())
   202  		if subMask.IsFull() {
   203  			res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorEmail})
   204  		} else {
   205  			for _, subpath := range subMask.Paths {
   206  				res.Paths = append(res.Paths, &NotificationChannelSpec_FieldSubPath{selector: NotificationChannelSpec_FieldPathSelectorEmail, subPath: subpath})
   207  			}
   208  		}
   209  	}
   210  	{
   211  		subMask := o.GetSlack().MakeDiffFieldMask(other.GetSlack())
   212  		if subMask.IsFull() {
   213  			res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorSlack})
   214  		} else {
   215  			for _, subpath := range subMask.Paths {
   216  				res.Paths = append(res.Paths, &NotificationChannelSpec_FieldSubPath{selector: NotificationChannelSpec_FieldPathSelectorSlack, subPath: subpath})
   217  			}
   218  		}
   219  	}
   220  	{
   221  		subMask := o.GetWebhook().MakeDiffFieldMask(other.GetWebhook())
   222  		if subMask.IsFull() {
   223  			res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorWebhook})
   224  		} else {
   225  			for _, subpath := range subMask.Paths {
   226  				res.Paths = append(res.Paths, &NotificationChannelSpec_FieldSubPath{selector: NotificationChannelSpec_FieldPathSelectorWebhook, subPath: subpath})
   227  			}
   228  		}
   229  	}
   230  	if o.GetNotificationLanguageCode() != other.GetNotificationLanguageCode() {
   231  		res.Paths = append(res.Paths, &NotificationChannelSpec_FieldTerminalPath{selector: NotificationChannelSpec_FieldPathSelectorNotificationLanguageCode})
   232  	}
   233  	return res
   234  }
   235  
   236  func (o *NotificationChannel_Spec) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   237  	return o.MakeDiffFieldMask(other.(*NotificationChannel_Spec))
   238  }
   239  
   240  func (o *NotificationChannel_Spec) Clone() *NotificationChannel_Spec {
   241  	if o == nil {
   242  		return nil
   243  	}
   244  	result := &NotificationChannel_Spec{}
   245  	result.Enabled = o.Enabled
   246  	result.Type = o.Type
   247  	result.Email = o.Email.Clone()
   248  	result.Slack = o.Slack.Clone()
   249  	result.Webhook = o.Webhook.Clone()
   250  	result.NotificationLanguageCode = o.NotificationLanguageCode
   251  	return result
   252  }
   253  
   254  func (o *NotificationChannel_Spec) CloneRaw() gotenobject.GotenObjectExt {
   255  	return o.Clone()
   256  }
   257  
   258  func (o *NotificationChannel_Spec) Merge(source *NotificationChannel_Spec) {
   259  	o.Enabled = source.GetEnabled()
   260  	o.Type = source.GetType()
   261  	if source.GetEmail() != nil {
   262  		if o.Email == nil {
   263  			o.Email = new(NotificationChannel_Spec_Email)
   264  		}
   265  		o.Email.Merge(source.GetEmail())
   266  	}
   267  	if source.GetSlack() != nil {
   268  		if o.Slack == nil {
   269  			o.Slack = new(NotificationChannel_Spec_Slack)
   270  		}
   271  		o.Slack.Merge(source.GetSlack())
   272  	}
   273  	if source.GetWebhook() != nil {
   274  		if o.Webhook == nil {
   275  			o.Webhook = new(NotificationChannel_Spec_Webhook)
   276  		}
   277  		o.Webhook.Merge(source.GetWebhook())
   278  	}
   279  	o.NotificationLanguageCode = source.GetNotificationLanguageCode()
   280  }
   281  
   282  func (o *NotificationChannel_Spec) MergeRaw(source gotenobject.GotenObjectExt) {
   283  	o.Merge(source.(*NotificationChannel_Spec))
   284  }
   285  
   286  func (o *NotificationChannel_State) GotenObjectExt() {}
   287  
   288  func (o *NotificationChannel_State) MakeFullFieldMask() *NotificationChannel_State_FieldMask {
   289  	return FullNotificationChannel_State_FieldMask()
   290  }
   291  
   292  func (o *NotificationChannel_State) MakeRawFullFieldMask() gotenobject.FieldMask {
   293  	return FullNotificationChannel_State_FieldMask()
   294  }
   295  
   296  func (o *NotificationChannel_State) MakeDiffFieldMask(other *NotificationChannel_State) *NotificationChannel_State_FieldMask {
   297  	if o == nil && other == nil {
   298  		return &NotificationChannel_State_FieldMask{}
   299  	}
   300  	if o == nil || other == nil {
   301  		return FullNotificationChannel_State_FieldMask()
   302  	}
   303  
   304  	res := &NotificationChannel_State_FieldMask{}
   305  	if o.GetStatus() != other.GetStatus() {
   306  		res.Paths = append(res.Paths, &NotificationChannelState_FieldTerminalPath{selector: NotificationChannelState_FieldPathSelectorStatus})
   307  	}
   308  	{
   309  		subMask := o.GetError().MakeDiffFieldMask(other.GetError())
   310  		if subMask.IsFull() {
   311  			res.Paths = append(res.Paths, &NotificationChannelState_FieldTerminalPath{selector: NotificationChannelState_FieldPathSelectorError})
   312  		} else {
   313  			for _, subpath := range subMask.Paths {
   314  				res.Paths = append(res.Paths, &NotificationChannelState_FieldSubPath{selector: NotificationChannelState_FieldPathSelectorError, subPath: subpath})
   315  			}
   316  		}
   317  	}
   318  	return res
   319  }
   320  
   321  func (o *NotificationChannel_State) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   322  	return o.MakeDiffFieldMask(other.(*NotificationChannel_State))
   323  }
   324  
   325  func (o *NotificationChannel_State) Clone() *NotificationChannel_State {
   326  	if o == nil {
   327  		return nil
   328  	}
   329  	result := &NotificationChannel_State{}
   330  	result.Status = o.Status
   331  	result.Error = o.Error.Clone()
   332  	return result
   333  }
   334  
   335  func (o *NotificationChannel_State) CloneRaw() gotenobject.GotenObjectExt {
   336  	return o.Clone()
   337  }
   338  
   339  func (o *NotificationChannel_State) Merge(source *NotificationChannel_State) {
   340  	o.Status = source.GetStatus()
   341  	if source.GetError() != nil {
   342  		if o.Error == nil {
   343  			o.Error = new(NotificationChannel_State_Error)
   344  		}
   345  		o.Error.Merge(source.GetError())
   346  	}
   347  }
   348  
   349  func (o *NotificationChannel_State) MergeRaw(source gotenobject.GotenObjectExt) {
   350  	o.Merge(source.(*NotificationChannel_State))
   351  }
   352  
   353  func (o *NotificationChannel_Spec_Email) GotenObjectExt() {}
   354  
   355  func (o *NotificationChannel_Spec_Email) MakeFullFieldMask() *NotificationChannel_Spec_Email_FieldMask {
   356  	return FullNotificationChannel_Spec_Email_FieldMask()
   357  }
   358  
   359  func (o *NotificationChannel_Spec_Email) MakeRawFullFieldMask() gotenobject.FieldMask {
   360  	return FullNotificationChannel_Spec_Email_FieldMask()
   361  }
   362  
   363  func (o *NotificationChannel_Spec_Email) MakeDiffFieldMask(other *NotificationChannel_Spec_Email) *NotificationChannel_Spec_Email_FieldMask {
   364  	if o == nil && other == nil {
   365  		return &NotificationChannel_Spec_Email_FieldMask{}
   366  	}
   367  	if o == nil || other == nil {
   368  		return FullNotificationChannel_Spec_Email_FieldMask()
   369  	}
   370  
   371  	res := &NotificationChannel_Spec_Email_FieldMask{}
   372  
   373  	if len(o.GetAddresses()) == len(other.GetAddresses()) {
   374  		for i, lValue := range o.GetAddresses() {
   375  			rValue := other.GetAddresses()[i]
   376  			if lValue != rValue {
   377  				res.Paths = append(res.Paths, &NotificationChannelSpecEmail_FieldTerminalPath{selector: NotificationChannelSpecEmail_FieldPathSelectorAddresses})
   378  				break
   379  			}
   380  		}
   381  	} else {
   382  		res.Paths = append(res.Paths, &NotificationChannelSpecEmail_FieldTerminalPath{selector: NotificationChannelSpecEmail_FieldPathSelectorAddresses})
   383  	}
   384  	return res
   385  }
   386  
   387  func (o *NotificationChannel_Spec_Email) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   388  	return o.MakeDiffFieldMask(other.(*NotificationChannel_Spec_Email))
   389  }
   390  
   391  func (o *NotificationChannel_Spec_Email) Clone() *NotificationChannel_Spec_Email {
   392  	if o == nil {
   393  		return nil
   394  	}
   395  	result := &NotificationChannel_Spec_Email{}
   396  	result.Addresses = make([]string, len(o.Addresses))
   397  	for i, sourceValue := range o.Addresses {
   398  		result.Addresses[i] = sourceValue
   399  	}
   400  	return result
   401  }
   402  
   403  func (o *NotificationChannel_Spec_Email) CloneRaw() gotenobject.GotenObjectExt {
   404  	return o.Clone()
   405  }
   406  
   407  func (o *NotificationChannel_Spec_Email) Merge(source *NotificationChannel_Spec_Email) {
   408  	for _, sourceValue := range source.GetAddresses() {
   409  		exists := false
   410  		for _, currentValue := range o.Addresses {
   411  			if currentValue == sourceValue {
   412  				exists = true
   413  				break
   414  			}
   415  		}
   416  		if !exists {
   417  			var newDstElement string
   418  			newDstElement = sourceValue
   419  			o.Addresses = append(o.Addresses, newDstElement)
   420  		}
   421  	}
   422  
   423  }
   424  
   425  func (o *NotificationChannel_Spec_Email) MergeRaw(source gotenobject.GotenObjectExt) {
   426  	o.Merge(source.(*NotificationChannel_Spec_Email))
   427  }
   428  
   429  func (o *NotificationChannel_Spec_Slack) GotenObjectExt() {}
   430  
   431  func (o *NotificationChannel_Spec_Slack) MakeFullFieldMask() *NotificationChannel_Spec_Slack_FieldMask {
   432  	return FullNotificationChannel_Spec_Slack_FieldMask()
   433  }
   434  
   435  func (o *NotificationChannel_Spec_Slack) MakeRawFullFieldMask() gotenobject.FieldMask {
   436  	return FullNotificationChannel_Spec_Slack_FieldMask()
   437  }
   438  
   439  func (o *NotificationChannel_Spec_Slack) MakeDiffFieldMask(other *NotificationChannel_Spec_Slack) *NotificationChannel_Spec_Slack_FieldMask {
   440  	if o == nil && other == nil {
   441  		return &NotificationChannel_Spec_Slack_FieldMask{}
   442  	}
   443  	if o == nil || other == nil {
   444  		return FullNotificationChannel_Spec_Slack_FieldMask()
   445  	}
   446  
   447  	res := &NotificationChannel_Spec_Slack_FieldMask{}
   448  	if o.GetIncomingWebhook() != other.GetIncomingWebhook() {
   449  		res.Paths = append(res.Paths, &NotificationChannelSpecSlack_FieldTerminalPath{selector: NotificationChannelSpecSlack_FieldPathSelectorIncomingWebhook})
   450  	}
   451  	return res
   452  }
   453  
   454  func (o *NotificationChannel_Spec_Slack) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   455  	return o.MakeDiffFieldMask(other.(*NotificationChannel_Spec_Slack))
   456  }
   457  
   458  func (o *NotificationChannel_Spec_Slack) Clone() *NotificationChannel_Spec_Slack {
   459  	if o == nil {
   460  		return nil
   461  	}
   462  	result := &NotificationChannel_Spec_Slack{}
   463  	result.IncomingWebhook = o.IncomingWebhook
   464  	return result
   465  }
   466  
   467  func (o *NotificationChannel_Spec_Slack) CloneRaw() gotenobject.GotenObjectExt {
   468  	return o.Clone()
   469  }
   470  
   471  func (o *NotificationChannel_Spec_Slack) Merge(source *NotificationChannel_Spec_Slack) {
   472  	o.IncomingWebhook = source.GetIncomingWebhook()
   473  }
   474  
   475  func (o *NotificationChannel_Spec_Slack) MergeRaw(source gotenobject.GotenObjectExt) {
   476  	o.Merge(source.(*NotificationChannel_Spec_Slack))
   477  }
   478  
   479  func (o *NotificationChannel_Spec_PagerDuty) GotenObjectExt() {}
   480  
   481  func (o *NotificationChannel_Spec_PagerDuty) MakeFullFieldMask() *NotificationChannel_Spec_PagerDuty_FieldMask {
   482  	return FullNotificationChannel_Spec_PagerDuty_FieldMask()
   483  }
   484  
   485  func (o *NotificationChannel_Spec_PagerDuty) MakeRawFullFieldMask() gotenobject.FieldMask {
   486  	return FullNotificationChannel_Spec_PagerDuty_FieldMask()
   487  }
   488  
   489  func (o *NotificationChannel_Spec_PagerDuty) MakeDiffFieldMask(other *NotificationChannel_Spec_PagerDuty) *NotificationChannel_Spec_PagerDuty_FieldMask {
   490  	if o == nil && other == nil {
   491  		return &NotificationChannel_Spec_PagerDuty_FieldMask{}
   492  	}
   493  	if o == nil || other == nil {
   494  		return FullNotificationChannel_Spec_PagerDuty_FieldMask()
   495  	}
   496  
   497  	res := &NotificationChannel_Spec_PagerDuty_FieldMask{}
   498  	if o.GetServiceKey() != other.GetServiceKey() {
   499  		res.Paths = append(res.Paths, &NotificationChannelSpecPagerDuty_FieldTerminalPath{selector: NotificationChannelSpecPagerDuty_FieldPathSelectorServiceKey})
   500  	}
   501  	return res
   502  }
   503  
   504  func (o *NotificationChannel_Spec_PagerDuty) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   505  	return o.MakeDiffFieldMask(other.(*NotificationChannel_Spec_PagerDuty))
   506  }
   507  
   508  func (o *NotificationChannel_Spec_PagerDuty) Clone() *NotificationChannel_Spec_PagerDuty {
   509  	if o == nil {
   510  		return nil
   511  	}
   512  	result := &NotificationChannel_Spec_PagerDuty{}
   513  	result.ServiceKey = o.ServiceKey
   514  	return result
   515  }
   516  
   517  func (o *NotificationChannel_Spec_PagerDuty) CloneRaw() gotenobject.GotenObjectExt {
   518  	return o.Clone()
   519  }
   520  
   521  func (o *NotificationChannel_Spec_PagerDuty) Merge(source *NotificationChannel_Spec_PagerDuty) {
   522  	o.ServiceKey = source.GetServiceKey()
   523  }
   524  
   525  func (o *NotificationChannel_Spec_PagerDuty) MergeRaw(source gotenobject.GotenObjectExt) {
   526  	o.Merge(source.(*NotificationChannel_Spec_PagerDuty))
   527  }
   528  
   529  func (o *NotificationChannel_Spec_Webhook) GotenObjectExt() {}
   530  
   531  func (o *NotificationChannel_Spec_Webhook) MakeFullFieldMask() *NotificationChannel_Spec_Webhook_FieldMask {
   532  	return FullNotificationChannel_Spec_Webhook_FieldMask()
   533  }
   534  
   535  func (o *NotificationChannel_Spec_Webhook) MakeRawFullFieldMask() gotenobject.FieldMask {
   536  	return FullNotificationChannel_Spec_Webhook_FieldMask()
   537  }
   538  
   539  func (o *NotificationChannel_Spec_Webhook) MakeDiffFieldMask(other *NotificationChannel_Spec_Webhook) *NotificationChannel_Spec_Webhook_FieldMask {
   540  	if o == nil && other == nil {
   541  		return &NotificationChannel_Spec_Webhook_FieldMask{}
   542  	}
   543  	if o == nil || other == nil {
   544  		return FullNotificationChannel_Spec_Webhook_FieldMask()
   545  	}
   546  
   547  	res := &NotificationChannel_Spec_Webhook_FieldMask{}
   548  	if o.GetUrl() != other.GetUrl() {
   549  		res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorUrl})
   550  	}
   551  
   552  	if len(o.GetHeaders()) == len(other.GetHeaders()) {
   553  		for i, lValue := range o.GetHeaders() {
   554  			rValue := other.GetHeaders()[i]
   555  			if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 {
   556  				res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorHeaders})
   557  				break
   558  			}
   559  		}
   560  	} else {
   561  		res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorHeaders})
   562  	}
   563  	if !proto.Equal(o.GetNotificationMask(), other.GetNotificationMask()) {
   564  		res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorNotificationMask})
   565  	}
   566  	if o.GetMaxMessageSizeMb() != other.GetMaxMessageSizeMb() {
   567  		res.Paths = append(res.Paths, &NotificationChannelSpecWebhook_FieldTerminalPath{selector: NotificationChannelSpecWebhook_FieldPathSelectorMaxMessageSizeMb})
   568  	}
   569  	return res
   570  }
   571  
   572  func (o *NotificationChannel_Spec_Webhook) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   573  	return o.MakeDiffFieldMask(other.(*NotificationChannel_Spec_Webhook))
   574  }
   575  
   576  func (o *NotificationChannel_Spec_Webhook) Clone() *NotificationChannel_Spec_Webhook {
   577  	if o == nil {
   578  		return nil
   579  	}
   580  	result := &NotificationChannel_Spec_Webhook{}
   581  	result.Url = o.Url
   582  	result.Headers = make([]*NotificationChannel_Spec_Webhook_Header, len(o.Headers))
   583  	for i, sourceValue := range o.Headers {
   584  		result.Headers[i] = sourceValue.Clone()
   585  	}
   586  	result.NotificationMask = proto.Clone(o.NotificationMask).(*fieldmaskpb.FieldMask)
   587  	result.MaxMessageSizeMb = o.MaxMessageSizeMb
   588  	return result
   589  }
   590  
   591  func (o *NotificationChannel_Spec_Webhook) CloneRaw() gotenobject.GotenObjectExt {
   592  	return o.Clone()
   593  }
   594  
   595  func (o *NotificationChannel_Spec_Webhook) Merge(source *NotificationChannel_Spec_Webhook) {
   596  	o.Url = source.GetUrl()
   597  	for _, sourceValue := range source.GetHeaders() {
   598  		exists := false
   599  		for _, currentValue := range o.Headers {
   600  			if proto.Equal(sourceValue, currentValue) {
   601  				exists = true
   602  				break
   603  			}
   604  		}
   605  		if !exists {
   606  			var newDstElement *NotificationChannel_Spec_Webhook_Header
   607  			if sourceValue != nil {
   608  				newDstElement = new(NotificationChannel_Spec_Webhook_Header)
   609  				newDstElement.Merge(sourceValue)
   610  			}
   611  			o.Headers = append(o.Headers, newDstElement)
   612  		}
   613  	}
   614  
   615  	if source.GetNotificationMask() != nil {
   616  		if o.NotificationMask == nil {
   617  			o.NotificationMask = new(fieldmaskpb.FieldMask)
   618  		}
   619  		proto.Merge(o.NotificationMask, source.GetNotificationMask())
   620  	}
   621  	o.MaxMessageSizeMb = source.GetMaxMessageSizeMb()
   622  }
   623  
   624  func (o *NotificationChannel_Spec_Webhook) MergeRaw(source gotenobject.GotenObjectExt) {
   625  	o.Merge(source.(*NotificationChannel_Spec_Webhook))
   626  }
   627  
   628  func (o *NotificationChannel_Spec_Webhook_Header) GotenObjectExt() {}
   629  
   630  func (o *NotificationChannel_Spec_Webhook_Header) MakeFullFieldMask() *NotificationChannel_Spec_Webhook_Header_FieldMask {
   631  	return FullNotificationChannel_Spec_Webhook_Header_FieldMask()
   632  }
   633  
   634  func (o *NotificationChannel_Spec_Webhook_Header) MakeRawFullFieldMask() gotenobject.FieldMask {
   635  	return FullNotificationChannel_Spec_Webhook_Header_FieldMask()
   636  }
   637  
   638  func (o *NotificationChannel_Spec_Webhook_Header) MakeDiffFieldMask(other *NotificationChannel_Spec_Webhook_Header) *NotificationChannel_Spec_Webhook_Header_FieldMask {
   639  	if o == nil && other == nil {
   640  		return &NotificationChannel_Spec_Webhook_Header_FieldMask{}
   641  	}
   642  	if o == nil || other == nil {
   643  		return FullNotificationChannel_Spec_Webhook_Header_FieldMask()
   644  	}
   645  
   646  	res := &NotificationChannel_Spec_Webhook_Header_FieldMask{}
   647  	if o.GetKey() != other.GetKey() {
   648  		res.Paths = append(res.Paths, &NotificationChannelSpecWebhookHeader_FieldTerminalPath{selector: NotificationChannelSpecWebhookHeader_FieldPathSelectorKey})
   649  	}
   650  	if o.GetValue() != other.GetValue() {
   651  		res.Paths = append(res.Paths, &NotificationChannelSpecWebhookHeader_FieldTerminalPath{selector: NotificationChannelSpecWebhookHeader_FieldPathSelectorValue})
   652  	}
   653  	return res
   654  }
   655  
   656  func (o *NotificationChannel_Spec_Webhook_Header) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   657  	return o.MakeDiffFieldMask(other.(*NotificationChannel_Spec_Webhook_Header))
   658  }
   659  
   660  func (o *NotificationChannel_Spec_Webhook_Header) Clone() *NotificationChannel_Spec_Webhook_Header {
   661  	if o == nil {
   662  		return nil
   663  	}
   664  	result := &NotificationChannel_Spec_Webhook_Header{}
   665  	result.Key = o.Key
   666  	result.Value = o.Value
   667  	return result
   668  }
   669  
   670  func (o *NotificationChannel_Spec_Webhook_Header) CloneRaw() gotenobject.GotenObjectExt {
   671  	return o.Clone()
   672  }
   673  
   674  func (o *NotificationChannel_Spec_Webhook_Header) Merge(source *NotificationChannel_Spec_Webhook_Header) {
   675  	o.Key = source.GetKey()
   676  	o.Value = source.GetValue()
   677  }
   678  
   679  func (o *NotificationChannel_Spec_Webhook_Header) MergeRaw(source gotenobject.GotenObjectExt) {
   680  	o.Merge(source.(*NotificationChannel_Spec_Webhook_Header))
   681  }
   682  
   683  func (o *NotificationChannel_State_Error) GotenObjectExt() {}
   684  
   685  func (o *NotificationChannel_State_Error) MakeFullFieldMask() *NotificationChannel_State_Error_FieldMask {
   686  	return FullNotificationChannel_State_Error_FieldMask()
   687  }
   688  
   689  func (o *NotificationChannel_State_Error) MakeRawFullFieldMask() gotenobject.FieldMask {
   690  	return FullNotificationChannel_State_Error_FieldMask()
   691  }
   692  
   693  func (o *NotificationChannel_State_Error) MakeDiffFieldMask(other *NotificationChannel_State_Error) *NotificationChannel_State_Error_FieldMask {
   694  	if o == nil && other == nil {
   695  		return &NotificationChannel_State_Error_FieldMask{}
   696  	}
   697  	if o == nil || other == nil {
   698  		return FullNotificationChannel_State_Error_FieldMask()
   699  	}
   700  
   701  	res := &NotificationChannel_State_Error_FieldMask{}
   702  	if !proto.Equal(o.GetTime(), other.GetTime()) {
   703  		res.Paths = append(res.Paths, &NotificationChannelStateError_FieldTerminalPath{selector: NotificationChannelStateError_FieldPathSelectorTime})
   704  	}
   705  	if o.GetMessage() != other.GetMessage() {
   706  		res.Paths = append(res.Paths, &NotificationChannelStateError_FieldTerminalPath{selector: NotificationChannelStateError_FieldPathSelectorMessage})
   707  	}
   708  	return res
   709  }
   710  
   711  func (o *NotificationChannel_State_Error) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   712  	return o.MakeDiffFieldMask(other.(*NotificationChannel_State_Error))
   713  }
   714  
   715  func (o *NotificationChannel_State_Error) Clone() *NotificationChannel_State_Error {
   716  	if o == nil {
   717  		return nil
   718  	}
   719  	result := &NotificationChannel_State_Error{}
   720  	result.Time = proto.Clone(o.Time).(*timestamppb.Timestamp)
   721  	result.Message = o.Message
   722  	return result
   723  }
   724  
   725  func (o *NotificationChannel_State_Error) CloneRaw() gotenobject.GotenObjectExt {
   726  	return o.Clone()
   727  }
   728  
   729  func (o *NotificationChannel_State_Error) Merge(source *NotificationChannel_State_Error) {
   730  	if source.GetTime() != nil {
   731  		if o.Time == nil {
   732  			o.Time = new(timestamppb.Timestamp)
   733  		}
   734  		proto.Merge(o.Time, source.GetTime())
   735  	}
   736  	o.Message = source.GetMessage()
   737  }
   738  
   739  func (o *NotificationChannel_State_Error) MergeRaw(source gotenobject.GotenObjectExt) {
   740  	o.Merge(source.(*NotificationChannel_State_Error))
   741  }