public void ApplyHostConfig(ManagedObjectReference host, HostConfigSpec configSpec, ProfileDeferredPolicyOptionParameter[] userInput)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         ManagedObjectReference taskReference = this.ApplyHostConfig_Task(host, configSpec, userInput);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public HostProfileManagerConfigTaskList GenerateHostProfileTaskList(HostConfigSpec configSpec, ManagedObjectReference host)
        {
            HostProfileManagerConfigTaskList result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
                ManagedObjectReference taskReference = this.GenerateHostProfileTaskList_Task(configSpec, host);
                result = (HostProfileManagerConfigTaskList)this.Client.WaitForTask(taskReference);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference GenerateHostProfileTaskList_Task(HostConfigSpec configSpec, ManagedObjectReference host)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim55);
                GenerateHostProfileTaskListRequestType generateHostProfileTaskListRequestType = new GenerateHostProfileTaskListRequestType();
                generateHostProfileTaskListRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                generateHostProfileTaskListRequestType.configSpec = (VimApi_65.HostConfigSpec)VIConvert.ToWsdlType(configSpec);
                generateHostProfileTaskListRequestType.host       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.GenerateHostProfileTaskList_Task(new GenerateHostProfileTaskList_TaskRequest(generateHostProfileTaskListRequestType)).GenerateHostProfileTaskList_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference ApplyHostConfig_Task(ManagedObjectReference host, HostConfigSpec configSpec, ProfileDeferredPolicyOptionParameter[] userInput)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ApplyHostConfigRequestType applyHostConfigRequestType = new ApplyHostConfigRequestType();
                applyHostConfigRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                applyHostConfigRequestType.host       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                applyHostConfigRequestType.configSpec = (VimApi_65.HostConfigSpec)VIConvert.ToWsdlType(configSpec);
                applyHostConfigRequestType.userInput  = (VimApi_65.ProfileDeferredPolicyOptionParameter[])VIConvert.ToWsdlType(userInput);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ApplyHostConfig_Task(new ApplyHostConfig_TaskRequest(applyHostConfigRequestType)).ApplyHostConfig_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }