github.com/cloudwan/edgelq-sdk@v1.15.4/iam/resources/v1/condition/condition.pb.object_ext.go (about)

     1  // Code generated by protoc-gen-goten-object
     2  // File: edgelq/iam/proto/v1/condition.proto
     3  // DO NOT EDIT!!!
     4  
     5  package condition
     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  	attestation_domain "github.com/cloudwan/edgelq-sdk/iam/resources/v1/attestation_domain"
    20  	organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1/organization"
    21  	permission "github.com/cloudwan/edgelq-sdk/iam/resources/v1/permission"
    22  	project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project"
    23  	meta_service "github.com/cloudwan/goten-sdk/meta-service/resources/v1/service"
    24  	meta "github.com/cloudwan/goten-sdk/types/meta"
    25  	structpb "google.golang.org/protobuf/types/known/structpb"
    26  )
    27  
    28  // ensure the imports are used
    29  var (
    30  	_ = new(fmt.Stringer)
    31  	_ = new(sort.Interface)
    32  
    33  	_ = new(proto.Message)
    34  	_ = googlefieldmaskpb.FieldMask{}
    35  
    36  	_ = new(gotenobject.FieldPath)
    37  )
    38  
    39  // make sure we're using proto imports
    40  var (
    41  	_ = &attestation_domain.AttestationDomain{}
    42  	_ = &organization.Organization{}
    43  	_ = &permission.Permission{}
    44  	_ = &project.Project{}
    45  	_ = &structpb.Struct{}
    46  	_ = &meta_service.Service{}
    47  	_ = &meta.Meta{}
    48  )
    49  
    50  func (o *Condition) GotenObjectExt() {}
    51  
    52  func (o *Condition) MakeFullFieldMask() *Condition_FieldMask {
    53  	return FullCondition_FieldMask()
    54  }
    55  
    56  func (o *Condition) MakeRawFullFieldMask() gotenobject.FieldMask {
    57  	return FullCondition_FieldMask()
    58  }
    59  
    60  func (o *Condition) MakeDiffFieldMask(other *Condition) *Condition_FieldMask {
    61  	if o == nil && other == nil {
    62  		return &Condition_FieldMask{}
    63  	}
    64  	if o == nil || other == nil {
    65  		return FullCondition_FieldMask()
    66  	}
    67  
    68  	res := &Condition_FieldMask{}
    69  	if o.GetName().String() != other.GetName().String() {
    70  		res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorName})
    71  	}
    72  	{
    73  		subMask := o.GetMetadata().MakeDiffFieldMask(other.GetMetadata())
    74  		if subMask.IsFull() {
    75  			res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorMetadata})
    76  		} else {
    77  			for _, subpath := range subMask.Paths {
    78  				res.Paths = append(res.Paths, &Condition_FieldSubPath{selector: Condition_FieldPathSelectorMetadata, subPath: subpath})
    79  			}
    80  		}
    81  	}
    82  	if o.GetDisplayName() != other.GetDisplayName() {
    83  		res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorDisplayName})
    84  	}
    85  	if o.GetDescription() != other.GetDescription() {
    86  		res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorDescription})
    87  	}
    88  	{
    89  		_, leftSelected := o.Condition.(*Condition_IpCondition_)
    90  		_, rightSelected := other.Condition.(*Condition_IpCondition_)
    91  		if leftSelected == rightSelected {
    92  			subMask := o.GetIpCondition().MakeDiffFieldMask(other.GetIpCondition())
    93  			if subMask.IsFull() {
    94  				res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorIpCondition})
    95  			} else {
    96  				for _, subpath := range subMask.Paths {
    97  					res.Paths = append(res.Paths, &Condition_FieldSubPath{selector: Condition_FieldPathSelectorIpCondition, subPath: subpath})
    98  				}
    99  			}
   100  		} else {
   101  			res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorIpCondition})
   102  		}
   103  	}
   104  	{
   105  		_, leftSelected := o.Condition.(*Condition_AttestationCondition_)
   106  		_, rightSelected := other.Condition.(*Condition_AttestationCondition_)
   107  		if leftSelected == rightSelected {
   108  			subMask := o.GetAttestationCondition().MakeDiffFieldMask(other.GetAttestationCondition())
   109  			if subMask.IsFull() {
   110  				res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorAttestationCondition})
   111  			} else {
   112  				for _, subpath := range subMask.Paths {
   113  					res.Paths = append(res.Paths, &Condition_FieldSubPath{selector: Condition_FieldPathSelectorAttestationCondition, subPath: subpath})
   114  				}
   115  			}
   116  		} else {
   117  			res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorAttestationCondition})
   118  		}
   119  	}
   120  	if o.GetExpression() != other.GetExpression() {
   121  		res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorExpression})
   122  	}
   123  
   124  	if len(o.GetParameterDeclarations()) == len(other.GetParameterDeclarations()) {
   125  		for i, lValue := range o.GetParameterDeclarations() {
   126  			rValue := other.GetParameterDeclarations()[i]
   127  			if len(lValue.MakeDiffFieldMask(rValue).Paths) > 0 {
   128  				res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorParameterDeclarations})
   129  				break
   130  			}
   131  		}
   132  	} else {
   133  		res.Paths = append(res.Paths, &Condition_FieldTerminalPath{selector: Condition_FieldPathSelectorParameterDeclarations})
   134  	}
   135  	return res
   136  }
   137  
   138  func (o *Condition) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   139  	return o.MakeDiffFieldMask(other.(*Condition))
   140  }
   141  
   142  func (o *Condition) Clone() *Condition {
   143  	if o == nil {
   144  		return nil
   145  	}
   146  	result := &Condition{}
   147  	if o.Name == nil {
   148  		result.Name = nil
   149  	} else if data, err := o.Name.ProtoString(); err != nil {
   150  		panic(err)
   151  	} else {
   152  		result.Name = &Name{}
   153  		if err := result.Name.ParseProtoString(data); err != nil {
   154  			panic(err)
   155  		}
   156  	}
   157  	result.Metadata = o.Metadata.Clone()
   158  	result.DisplayName = o.DisplayName
   159  	result.Description = o.Description
   160  	if o, ok := o.Condition.(*Condition_IpCondition_); ok {
   161  		result.Condition = (*Condition_IpCondition_)(nil)
   162  		if o != nil {
   163  			result.Condition = &Condition_IpCondition_{}
   164  			result := result.Condition.(*Condition_IpCondition_)
   165  			result.IpCondition = o.IpCondition.Clone()
   166  		}
   167  	}
   168  	if o, ok := o.Condition.(*Condition_AttestationCondition_); ok {
   169  		result.Condition = (*Condition_AttestationCondition_)(nil)
   170  		if o != nil {
   171  			result.Condition = &Condition_AttestationCondition_{}
   172  			result := result.Condition.(*Condition_AttestationCondition_)
   173  			result.AttestationCondition = o.AttestationCondition.Clone()
   174  		}
   175  	}
   176  	result.Expression = o.Expression
   177  	result.ParameterDeclarations = make([]*Condition_ParameterDeclaration, len(o.ParameterDeclarations))
   178  	for i, sourceValue := range o.ParameterDeclarations {
   179  		result.ParameterDeclarations[i] = sourceValue.Clone()
   180  	}
   181  	return result
   182  }
   183  
   184  func (o *Condition) CloneRaw() gotenobject.GotenObjectExt {
   185  	return o.Clone()
   186  }
   187  
   188  func (o *Condition) Merge(source *Condition) {
   189  	if source.GetName() != nil {
   190  		if data, err := source.GetName().ProtoString(); err != nil {
   191  			panic(err)
   192  		} else {
   193  			o.Name = &Name{}
   194  			if err := o.Name.ParseProtoString(data); err != nil {
   195  				panic(err)
   196  			}
   197  		}
   198  	} else {
   199  		o.Name = nil
   200  	}
   201  	if source.GetMetadata() != nil {
   202  		if o.Metadata == nil {
   203  			o.Metadata = new(meta.Meta)
   204  		}
   205  		o.Metadata.Merge(source.GetMetadata())
   206  	}
   207  	o.DisplayName = source.GetDisplayName()
   208  	o.Description = source.GetDescription()
   209  	if source, ok := source.GetCondition().(*Condition_IpCondition_); ok {
   210  		if dstOneOf, ok := o.Condition.(*Condition_IpCondition_); !ok || dstOneOf == nil {
   211  			o.Condition = &Condition_IpCondition_{}
   212  		}
   213  		if source != nil {
   214  			o := o.Condition.(*Condition_IpCondition_)
   215  			if source.IpCondition != nil {
   216  				if o.IpCondition == nil {
   217  					o.IpCondition = new(Condition_IpCondition)
   218  				}
   219  				o.IpCondition.Merge(source.IpCondition)
   220  			}
   221  		}
   222  	}
   223  	if source, ok := source.GetCondition().(*Condition_AttestationCondition_); ok {
   224  		if dstOneOf, ok := o.Condition.(*Condition_AttestationCondition_); !ok || dstOneOf == nil {
   225  			o.Condition = &Condition_AttestationCondition_{}
   226  		}
   227  		if source != nil {
   228  			o := o.Condition.(*Condition_AttestationCondition_)
   229  			if source.AttestationCondition != nil {
   230  				if o.AttestationCondition == nil {
   231  					o.AttestationCondition = new(Condition_AttestationCondition)
   232  				}
   233  				o.AttestationCondition.Merge(source.AttestationCondition)
   234  			}
   235  		}
   236  	}
   237  	o.Expression = source.GetExpression()
   238  	for _, sourceValue := range source.GetParameterDeclarations() {
   239  		exists := false
   240  		for _, currentValue := range o.ParameterDeclarations {
   241  			if proto.Equal(sourceValue, currentValue) {
   242  				exists = true
   243  				break
   244  			}
   245  		}
   246  		if !exists {
   247  			var newDstElement *Condition_ParameterDeclaration
   248  			if sourceValue != nil {
   249  				newDstElement = new(Condition_ParameterDeclaration)
   250  				newDstElement.Merge(sourceValue)
   251  			}
   252  			o.ParameterDeclarations = append(o.ParameterDeclarations, newDstElement)
   253  		}
   254  	}
   255  
   256  }
   257  
   258  func (o *Condition) MergeRaw(source gotenobject.GotenObjectExt) {
   259  	o.Merge(source.(*Condition))
   260  }
   261  
   262  func (o *Condition_ParameterDeclaration) GotenObjectExt() {}
   263  
   264  func (o *Condition_ParameterDeclaration) MakeFullFieldMask() *Condition_ParameterDeclaration_FieldMask {
   265  	return FullCondition_ParameterDeclaration_FieldMask()
   266  }
   267  
   268  func (o *Condition_ParameterDeclaration) MakeRawFullFieldMask() gotenobject.FieldMask {
   269  	return FullCondition_ParameterDeclaration_FieldMask()
   270  }
   271  
   272  func (o *Condition_ParameterDeclaration) MakeDiffFieldMask(other *Condition_ParameterDeclaration) *Condition_ParameterDeclaration_FieldMask {
   273  	if o == nil && other == nil {
   274  		return &Condition_ParameterDeclaration_FieldMask{}
   275  	}
   276  	if o == nil || other == nil {
   277  		return FullCondition_ParameterDeclaration_FieldMask()
   278  	}
   279  
   280  	res := &Condition_ParameterDeclaration_FieldMask{}
   281  	if o.GetKey() != other.GetKey() {
   282  		res.Paths = append(res.Paths, &ConditionParameterDeclaration_FieldTerminalPath{selector: ConditionParameterDeclaration_FieldPathSelectorKey})
   283  	}
   284  	if o.GetType() != other.GetType() {
   285  		res.Paths = append(res.Paths, &ConditionParameterDeclaration_FieldTerminalPath{selector: ConditionParameterDeclaration_FieldPathSelectorType})
   286  	}
   287  	return res
   288  }
   289  
   290  func (o *Condition_ParameterDeclaration) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   291  	return o.MakeDiffFieldMask(other.(*Condition_ParameterDeclaration))
   292  }
   293  
   294  func (o *Condition_ParameterDeclaration) Clone() *Condition_ParameterDeclaration {
   295  	if o == nil {
   296  		return nil
   297  	}
   298  	result := &Condition_ParameterDeclaration{}
   299  	result.Key = o.Key
   300  	result.Type = o.Type
   301  	return result
   302  }
   303  
   304  func (o *Condition_ParameterDeclaration) CloneRaw() gotenobject.GotenObjectExt {
   305  	return o.Clone()
   306  }
   307  
   308  func (o *Condition_ParameterDeclaration) Merge(source *Condition_ParameterDeclaration) {
   309  	o.Key = source.GetKey()
   310  	o.Type = source.GetType()
   311  }
   312  
   313  func (o *Condition_ParameterDeclaration) MergeRaw(source gotenobject.GotenObjectExt) {
   314  	o.Merge(source.(*Condition_ParameterDeclaration))
   315  }
   316  
   317  func (o *Condition_IpCondition) GotenObjectExt() {}
   318  
   319  func (o *Condition_IpCondition) MakeFullFieldMask() *Condition_IpCondition_FieldMask {
   320  	return FullCondition_IpCondition_FieldMask()
   321  }
   322  
   323  func (o *Condition_IpCondition) MakeRawFullFieldMask() gotenobject.FieldMask {
   324  	return FullCondition_IpCondition_FieldMask()
   325  }
   326  
   327  func (o *Condition_IpCondition) MakeDiffFieldMask(other *Condition_IpCondition) *Condition_IpCondition_FieldMask {
   328  	if o == nil && other == nil {
   329  		return &Condition_IpCondition_FieldMask{}
   330  	}
   331  	if o == nil || other == nil {
   332  		return FullCondition_IpCondition_FieldMask()
   333  	}
   334  
   335  	res := &Condition_IpCondition_FieldMask{}
   336  
   337  	if len(o.GetAllowedCidrs()) == len(other.GetAllowedCidrs()) {
   338  		for i, lValue := range o.GetAllowedCidrs() {
   339  			rValue := other.GetAllowedCidrs()[i]
   340  			if lValue != rValue {
   341  				res.Paths = append(res.Paths, &ConditionIpCondition_FieldTerminalPath{selector: ConditionIpCondition_FieldPathSelectorAllowedCidrs})
   342  				break
   343  			}
   344  		}
   345  	} else {
   346  		res.Paths = append(res.Paths, &ConditionIpCondition_FieldTerminalPath{selector: ConditionIpCondition_FieldPathSelectorAllowedCidrs})
   347  	}
   348  
   349  	if len(o.GetDisabledCidrs()) == len(other.GetDisabledCidrs()) {
   350  		for i, lValue := range o.GetDisabledCidrs() {
   351  			rValue := other.GetDisabledCidrs()[i]
   352  			if lValue != rValue {
   353  				res.Paths = append(res.Paths, &ConditionIpCondition_FieldTerminalPath{selector: ConditionIpCondition_FieldPathSelectorDisabledCidrs})
   354  				break
   355  			}
   356  		}
   357  	} else {
   358  		res.Paths = append(res.Paths, &ConditionIpCondition_FieldTerminalPath{selector: ConditionIpCondition_FieldPathSelectorDisabledCidrs})
   359  	}
   360  	return res
   361  }
   362  
   363  func (o *Condition_IpCondition) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   364  	return o.MakeDiffFieldMask(other.(*Condition_IpCondition))
   365  }
   366  
   367  func (o *Condition_IpCondition) Clone() *Condition_IpCondition {
   368  	if o == nil {
   369  		return nil
   370  	}
   371  	result := &Condition_IpCondition{}
   372  	result.AllowedCidrs = make([]string, len(o.AllowedCidrs))
   373  	for i, sourceValue := range o.AllowedCidrs {
   374  		result.AllowedCidrs[i] = sourceValue
   375  	}
   376  	result.DisabledCidrs = make([]string, len(o.DisabledCidrs))
   377  	for i, sourceValue := range o.DisabledCidrs {
   378  		result.DisabledCidrs[i] = sourceValue
   379  	}
   380  	return result
   381  }
   382  
   383  func (o *Condition_IpCondition) CloneRaw() gotenobject.GotenObjectExt {
   384  	return o.Clone()
   385  }
   386  
   387  func (o *Condition_IpCondition) Merge(source *Condition_IpCondition) {
   388  	for _, sourceValue := range source.GetAllowedCidrs() {
   389  		exists := false
   390  		for _, currentValue := range o.AllowedCidrs {
   391  			if currentValue == sourceValue {
   392  				exists = true
   393  				break
   394  			}
   395  		}
   396  		if !exists {
   397  			var newDstElement string
   398  			newDstElement = sourceValue
   399  			o.AllowedCidrs = append(o.AllowedCidrs, newDstElement)
   400  		}
   401  	}
   402  
   403  	for _, sourceValue := range source.GetDisabledCidrs() {
   404  		exists := false
   405  		for _, currentValue := range o.DisabledCidrs {
   406  			if currentValue == sourceValue {
   407  				exists = true
   408  				break
   409  			}
   410  		}
   411  		if !exists {
   412  			var newDstElement string
   413  			newDstElement = sourceValue
   414  			o.DisabledCidrs = append(o.DisabledCidrs, newDstElement)
   415  		}
   416  	}
   417  
   418  }
   419  
   420  func (o *Condition_IpCondition) MergeRaw(source gotenobject.GotenObjectExt) {
   421  	o.Merge(source.(*Condition_IpCondition))
   422  }
   423  
   424  func (o *Condition_AttestationCondition) GotenObjectExt() {}
   425  
   426  func (o *Condition_AttestationCondition) MakeFullFieldMask() *Condition_AttestationCondition_FieldMask {
   427  	return FullCondition_AttestationCondition_FieldMask()
   428  }
   429  
   430  func (o *Condition_AttestationCondition) MakeRawFullFieldMask() gotenobject.FieldMask {
   431  	return FullCondition_AttestationCondition_FieldMask()
   432  }
   433  
   434  func (o *Condition_AttestationCondition) MakeDiffFieldMask(other *Condition_AttestationCondition) *Condition_AttestationCondition_FieldMask {
   435  	if o == nil && other == nil {
   436  		return &Condition_AttestationCondition_FieldMask{}
   437  	}
   438  	if o == nil || other == nil {
   439  		return FullCondition_AttestationCondition_FieldMask()
   440  	}
   441  
   442  	res := &Condition_AttestationCondition_FieldMask{}
   443  	if o.GetDomain().String() != other.GetDomain().String() {
   444  		res.Paths = append(res.Paths, &ConditionAttestationCondition_FieldTerminalPath{selector: ConditionAttestationCondition_FieldPathSelectorDomain})
   445  	}
   446  
   447  	if len(o.GetExceptPermissions()) == len(other.GetExceptPermissions()) {
   448  		for i, lValue := range o.GetExceptPermissions() {
   449  			rValue := other.GetExceptPermissions()[i]
   450  			if lValue.String() != rValue.String() {
   451  				res.Paths = append(res.Paths, &ConditionAttestationCondition_FieldTerminalPath{selector: ConditionAttestationCondition_FieldPathSelectorExceptPermissions})
   452  				break
   453  			}
   454  		}
   455  	} else {
   456  		res.Paths = append(res.Paths, &ConditionAttestationCondition_FieldTerminalPath{selector: ConditionAttestationCondition_FieldPathSelectorExceptPermissions})
   457  	}
   458  	return res
   459  }
   460  
   461  func (o *Condition_AttestationCondition) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   462  	return o.MakeDiffFieldMask(other.(*Condition_AttestationCondition))
   463  }
   464  
   465  func (o *Condition_AttestationCondition) Clone() *Condition_AttestationCondition {
   466  	if o == nil {
   467  		return nil
   468  	}
   469  	result := &Condition_AttestationCondition{}
   470  	if o.Domain == nil {
   471  		result.Domain = nil
   472  	} else if data, err := o.Domain.ProtoString(); err != nil {
   473  		panic(err)
   474  	} else {
   475  		result.Domain = &attestation_domain.Reference{}
   476  		if err := result.Domain.ParseProtoString(data); err != nil {
   477  			panic(err)
   478  		}
   479  	}
   480  	result.ExceptPermissions = make([]*permission.Reference, len(o.ExceptPermissions))
   481  	for i, sourceValue := range o.ExceptPermissions {
   482  		if sourceValue == nil {
   483  			result.ExceptPermissions[i] = nil
   484  		} else if data, err := sourceValue.ProtoString(); err != nil {
   485  			panic(err)
   486  		} else {
   487  			result.ExceptPermissions[i] = &permission.Reference{}
   488  			if err := result.ExceptPermissions[i].ParseProtoString(data); err != nil {
   489  				panic(err)
   490  			}
   491  		}
   492  	}
   493  	return result
   494  }
   495  
   496  func (o *Condition_AttestationCondition) CloneRaw() gotenobject.GotenObjectExt {
   497  	return o.Clone()
   498  }
   499  
   500  func (o *Condition_AttestationCondition) Merge(source *Condition_AttestationCondition) {
   501  	if source.GetDomain() != nil {
   502  		if data, err := source.GetDomain().ProtoString(); err != nil {
   503  			panic(err)
   504  		} else {
   505  			o.Domain = &attestation_domain.Reference{}
   506  			if err := o.Domain.ParseProtoString(data); err != nil {
   507  				panic(err)
   508  			}
   509  		}
   510  	} else {
   511  		o.Domain = nil
   512  	}
   513  	for _, sourceValue := range source.GetExceptPermissions() {
   514  		exists := false
   515  		for _, currentValue := range o.ExceptPermissions {
   516  			leftProtoStr, _ := currentValue.ProtoString()
   517  			rightProtoStr, _ := sourceValue.ProtoString()
   518  			if leftProtoStr == rightProtoStr {
   519  				exists = true
   520  				break
   521  			}
   522  		}
   523  		if !exists {
   524  			var newDstElement *permission.Reference
   525  			if sourceValue != nil {
   526  				if data, err := sourceValue.ProtoString(); err != nil {
   527  					panic(err)
   528  				} else {
   529  					newDstElement = &permission.Reference{}
   530  					if err := newDstElement.ParseProtoString(data); err != nil {
   531  						panic(err)
   532  					}
   533  				}
   534  			}
   535  			o.ExceptPermissions = append(o.ExceptPermissions, newDstElement)
   536  		}
   537  	}
   538  
   539  }
   540  
   541  func (o *Condition_AttestationCondition) MergeRaw(source gotenobject.GotenObjectExt) {
   542  	o.Merge(source.(*Condition_AttestationCondition))
   543  }
   544  
   545  func (o *ExecutableCondition) GotenObjectExt() {}
   546  
   547  func (o *ExecutableCondition) MakeFullFieldMask() *ExecutableCondition_FieldMask {
   548  	return FullExecutableCondition_FieldMask()
   549  }
   550  
   551  func (o *ExecutableCondition) MakeRawFullFieldMask() gotenobject.FieldMask {
   552  	return FullExecutableCondition_FieldMask()
   553  }
   554  
   555  func (o *ExecutableCondition) MakeDiffFieldMask(other *ExecutableCondition) *ExecutableCondition_FieldMask {
   556  	if o == nil && other == nil {
   557  		return &ExecutableCondition_FieldMask{}
   558  	}
   559  	if o == nil || other == nil {
   560  		return FullExecutableCondition_FieldMask()
   561  	}
   562  
   563  	res := &ExecutableCondition_FieldMask{}
   564  	if o.GetCondition().String() != other.GetCondition().String() {
   565  		res.Paths = append(res.Paths, &ExecutableCondition_FieldTerminalPath{selector: ExecutableCondition_FieldPathSelectorCondition})
   566  	}
   567  	if !proto.Equal(o.GetParams(), other.GetParams()) {
   568  		res.Paths = append(res.Paths, &ExecutableCondition_FieldTerminalPath{selector: ExecutableCondition_FieldPathSelectorParams})
   569  	}
   570  	return res
   571  }
   572  
   573  func (o *ExecutableCondition) MakeRawDiffFieldMask(other gotenobject.GotenObjectExt) gotenobject.FieldMask {
   574  	return o.MakeDiffFieldMask(other.(*ExecutableCondition))
   575  }
   576  
   577  func (o *ExecutableCondition) Clone() *ExecutableCondition {
   578  	if o == nil {
   579  		return nil
   580  	}
   581  	result := &ExecutableCondition{}
   582  	if o.Condition == nil {
   583  		result.Condition = nil
   584  	} else if data, err := o.Condition.ProtoString(); err != nil {
   585  		panic(err)
   586  	} else {
   587  		result.Condition = &Reference{}
   588  		if err := result.Condition.ParseProtoString(data); err != nil {
   589  			panic(err)
   590  		}
   591  	}
   592  	result.Params = proto.Clone(o.Params).(*structpb.Struct)
   593  	return result
   594  }
   595  
   596  func (o *ExecutableCondition) CloneRaw() gotenobject.GotenObjectExt {
   597  	return o.Clone()
   598  }
   599  
   600  func (o *ExecutableCondition) Merge(source *ExecutableCondition) {
   601  	if source.GetCondition() != nil {
   602  		if data, err := source.GetCondition().ProtoString(); err != nil {
   603  			panic(err)
   604  		} else {
   605  			o.Condition = &Reference{}
   606  			if err := o.Condition.ParseProtoString(data); err != nil {
   607  				panic(err)
   608  			}
   609  		}
   610  	} else {
   611  		o.Condition = nil
   612  	}
   613  	if source.GetParams() != nil {
   614  		if o.Params == nil {
   615  			o.Params = new(structpb.Struct)
   616  		}
   617  		proto.Merge(o.Params, source.GetParams())
   618  	}
   619  }
   620  
   621  func (o *ExecutableCondition) MergeRaw(source gotenobject.GotenObjectExt) {
   622  	o.Merge(source.(*ExecutableCondition))
   623  }