public void ReconfigureAlarm(AlarmSpec spec)
 {
     try
     {
         ReconfigureAlarmRequestType reconfigureAlarmRequestType = new ReconfigureAlarmRequestType();
         reconfigureAlarmRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         reconfigureAlarmRequestType.spec  = (VimApi_65.AlarmSpec)VIConvert.ToWsdlType(spec);
         this.VimServiceProxy.ReconfigureAlarm(new ReconfigureAlarmRequest(reconfigureAlarmRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference CreateAlarm(ManagedObjectReference entity, AlarmSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                CreateAlarmRequestType createAlarmRequestType = new CreateAlarmRequestType();
                createAlarmRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createAlarmRequestType.entity = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(entity);
                createAlarmRequestType.spec   = (VimApi_65.AlarmSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateAlarm(new CreateAlarmRequest(createAlarmRequestType)).CreateAlarmResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }