clearExpression.setObjectType(new TypeNameImpl("vim.VirtualMachine"));
OrAlarmExpression or = new OrAlarmExpressionImpl();
or.setExpression(new AlarmExpression[] {raiseExpression, clearExpression});
AlarmTriggeringAction alarmAction = new AlarmTriggeringActionImpl();
alarmAction.setAction(null);
TransitionSpec tSpec = new AlarmTriggeringActionImpl.TransitionSpecImpl();
tSpec.setRepeats(false);
tSpec.setStartState(Status.green);
tSpec.setFinalState(Status.yellow);
alarmAction.setTransitionSpecs(new TransitionSpec[] { tSpec });
alarmAction.setGreen2yellow(true);
AlarmSpec spec = new AlarmSpecImpl();
spec.setActionFrequency(0);
spec.setExpression(or);