func (v *ExitCondition) Equals(rhs *ExitCondition) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !_I32_EqualsPtr(v.ExpirationIntervalInSeconds, rhs.ExpirationIntervalInSeconds) {
		return false
	}
	if !_I32_EqualsPtr(v.ShadowCount, rhs.ShadowCount) {
		return false
	}
	return true
}
Equals returns true if all the fields of this ExitCondition match the
provided ExitCondition.

This function performs a deep comparison.
package shadower
import (
	bytes "bytes"
	base64 "encoding/base64"
	json "encoding/json"
	fmt "fmt"
	shared "go.uber.org/cadence/.gen/go/shared"
	multierr "go.uber.org/multierr"
	thriftreflect "go.uber.org/thriftrw/thriftreflect"
	wire "go.uber.org/thriftrw/wire"
	zapcore "go.uber.org/zap/zapcore"
	math "math"
	strconv "strconv"
	strings "strings"
)
const ErrNonRetryableType string = "com.uber.cadence.internal.shadowing.NonRetryableException"
const ErrReasonDomainNotExists string = "domain not exists"
const ErrReasonInvalidQuery string = "invalid visibility query"
const ErrReasonWorkflowTypeNotRegistered string = "workflow type not registered"
const LocalDomainName string = "cadence-shadower"
const ReplayWorkflowActivityName string = "replayWorkflowActivity"
const ScanWorkflowActivityName string = "scanWorkflowActivity"
const TaskList string = "cadence-shadower-tl"
const WorkflowIDSuffix string = "-shadow-workflow"
const WorkflowName string = "cadence-shadow-workflow"
type ExitCondition struct {
	ExpirationIntervalInSeconds *int32 `json:"expirationIntervalInSeconds,omitempty"`
	ShadowCount                 *int32 `json:"shadowCount,omitempty"`
}
func (v *ExitCondition) ToWire() (wire.Value, error) {
	var (
		fields [2]wire.Field
		i      int = 0
		w      wire.Value
		err    error
	)
	if v.ExpirationIntervalInSeconds != nil {
		w, err = wire.NewValueI32(*(v.ExpirationIntervalInSeconds)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 10, Value: w}
		i++
	}
	if v.ShadowCount != nil {
		w, err = wire.NewValueI32(*(v.ShadowCount)), error(nil)
		if err != nil {
			return w, err
		}
		fields[i] = wire.Field{ID: 20, Value: w}
		i++
	}
	return wire.NewValueStruct(wire.Struct{Fields: fields[:i]}), nil
}
func (v *ExitCondition) FromWire(w wire.Value) error {
	var err error
	for _, field := range w.GetStruct().Fields {
		switch field.ID {
		case 10:
			if field.Value.Type() == wire.TI32 {
				var x int32
				x, err = field.Value.GetI32(), error(nil)
				v.ExpirationIntervalInSeconds = &x
				if err != nil {
					return err
				}
			}
		case 20:
			if field.Value.Type() == wire.TI32 {
				var x int32
				x, err = field.Value.GetI32(), error(nil)
				v.ShadowCount = &x
				if err != nil {
					return err
				}
			}
		}
	}
	return nil
}
func (v *ExitCondition) String() string {
	if v == nil {
		return "<nil>"
	}
	var fields [2]string
	i := 0
	if v.ExpirationIntervalInSeconds != nil {
		fields[i] = fmt.Sprintf("ExpirationIntervalInSeconds: %v", *(v.ExpirationIntervalInSeconds))
		i++
	}
	if v.ShadowCount != nil {
		fields[i] = fmt.Sprintf("ShadowCount: %v", *(v.ShadowCount))
		i++
	}
	return fmt.Sprintf("ExitCondition{%v}", strings.Join(fields[:i], ", "))
}
func _I32_EqualsPtr(lhs, rhs *int32) bool {
	if lhs != nil && rhs != nil {
		x := *lhs
		y := *rhs
		return (x == y)
	}
	return lhs == nil && rhs == nil
}