func (a *Union) Equals(b *Union) bool {
	if a == nil || b == nil {
		return a == nil && b == nil
	}
	if (a.Discriminator == nil) != (b.Discriminator == nil) {
		return false
	}
	if a.Discriminator != nil {
		if *a.Discriminator != *b.Discriminator {
			return false
		}
	}
	if a.DeduceInvalidDiscriminator != b.DeduceInvalidDiscriminator {
		return false
	}
	if len(a.Fields) != len(b.Fields) {
		return false
	}
	for i := range a.Fields {
		if !a.Fields[i].Equals(&b.Fields[i]) {
			return false
		}
	}
	return true
}
// Equals returns true iff the two Unions are equal.
Equals returns true iff the two Unions are equal.
// Equals returns true iff the two Unions are equal .
func (a *Union) Equals(b *Union) bool {
	if a == nil || b == nil {
		return a == nil && b == nil
	}
	if (a.Discriminator == nil) != (b.Discriminator == nil) {
		return false
	}
	if a.Discriminator != nil {
		if *a.Discriminator != *b.Discriminator {
			return false
		}
	}
	if a.DeduceInvalidDiscriminator != b.DeduceInvalidDiscriminator {
		return false
	}
	if len(a.Fields) != len(b.Fields) {
		return false
	}
	for i := range a.Fields {
		if !a.Fields[i].Equals(&b.Fields[i]) {
			return false
		}
	}
	return true
}
func ( a * Union ) Equals ( b * Union ) bool { if a == nil || b == nil { return a == nil && b == nil } if ( a . Discriminator == nil ) != ( b . Discriminator == nil ) { return false } if a . Discriminator != nil { if * a . Discriminator != * b . Discriminator { return false } } if a . DeduceInvalidDiscriminator != b . DeduceInvalidDiscriminator { return false } if len ( a . Fields ) != len ( b . Fields ) { return false } for i := range a . Fields { if ! a . Fields [ i ] . Equals ( & b . Fields [ i ] ) { return false } } return true }
Equals returns true iff the two Unions are equal.
Equals returns true iff the two Unions are equal .