func RestoreSessionEqual(old, new *v1beta1_api.RestoreSession) bool {

	var oldSpec, newSpec *v1beta1_api.RestoreSessionSpec
	var oldName, newName string

	if old != nil {
		oldSpec = &old.Spec
		oldName = old.Name
	}
	if new != nil {
		newSpec = &new.Spec
		newName = new.Name
	}

	// user may create new RestoreSession with same spec. in this case, spec will be same but name will be different
	if oldName != newName {
		return false
	}

	// user may update existing RestoreSession spec. so, we need to compare new and old specification
	return reflect.DeepEqual(oldSpec, newSpec)
}
// RestoreSessionEqual check whether two RestoreSessions has same specification.
RestoreSessionEqual check whether two RestoreSessions has same specification.
// RestoreSessionEqual check whether two RestoreSessions has same specification .
func RestoreSessionEqual(old, new *v1beta1_api.RestoreSession) bool {
	var oldSpec, newSpec *v1beta1_api.RestoreSessionSpec
	var oldName, newName string
	if old != nil {
		oldSpec = &old.Spec
		oldName = old.Name
	}
	if new != nil {
		newSpec = &new.Spec
		newName = new.Name
	}
	if oldName != newName {
		return false
	}
	return reflect.DeepEqual(oldSpec, newSpec)
}
func RestoreSessionEqual ( old , new * v1beta1_api . RestoreSession ) bool { var oldSpec , newSpec * v1beta1_api . RestoreSessionSpec var oldName , newName string if old != nil { oldSpec = & old . Spec oldName = old . Name } if new != nil { newSpec = & new . Spec newName = new . Name } if oldName != newName { return false } return reflect . DeepEqual ( oldSpec , newSpec ) }
RestoreSessionEqual check whether two RestoreSessions has same specification.
RestoreSessionEqual check whether two RestoreSessions has same specification .
// user may create new RestoreSession with same spec. in this case, spec will be same but name will be different // user may update existing RestoreSession spec. so, we need to compare new and old specification