public void UpdateAnswerFile(ManagedObjectReference host, AnswerFileCreateSpec configSpec)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
         ManagedObjectReference taskReference = this.UpdateAnswerFile_Task(host, configSpec);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference UpdateAnswerFile_Task(ManagedObjectReference host, AnswerFileCreateSpec configSpec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim50);
                UpdateAnswerFileRequestType updateAnswerFileRequestType = new UpdateAnswerFileRequestType();
                updateAnswerFileRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                updateAnswerFileRequestType.host       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host);
                updateAnswerFileRequestType.configSpec = (VimApi_65.AnswerFileCreateSpec)VIConvert.ToWsdlType(configSpec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.UpdateAnswerFile_Task(new UpdateAnswerFile_TaskRequest(updateAnswerFileRequestType)).UpdateAnswerFile_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }