public AnswerFile RetrieveAnswerFileForProfile(ManagedObjectReference host, HostApplyProfile applyProfile) { AnswerFile result; try { VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51); RetrieveAnswerFileForProfileRequestType retrieveAnswerFileForProfileRequestType = new RetrieveAnswerFileForProfileRequestType(); retrieveAnswerFileForProfileRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef); retrieveAnswerFileForProfileRequestType.host = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(host); retrieveAnswerFileForProfileRequestType.applyProfile = (VimApi_65.HostApplyProfile)VIConvert.ToWsdlType(applyProfile); result = (AnswerFile)VIConvert.ToVim(this.VimServiceProxy.RetrieveAnswerFileForProfile(new RetrieveAnswerFileForProfileRequest(retrieveAnswerFileForProfileRequestType)).RetrieveAnswerFileForProfileResponse.returnval); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } return(result); }
public StructuredCustomizations[] RetrieveHostCustomizationsForProfile(ManagedObjectReference[] hosts, HostApplyProfile applyProfile) { StructuredCustomizations[] result; try { VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65); RetrieveHostCustomizationsForProfileRequestType retrieveHostCustomizationsForProfileRequestType = new RetrieveHostCustomizationsForProfileRequestType(); retrieveHostCustomizationsForProfileRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef); retrieveHostCustomizationsForProfileRequestType.hosts = (VimApi_65.ManagedObjectReference[])VIConvert.ToWsdlType(hosts); retrieveHostCustomizationsForProfileRequestType.applyProfile = (VimApi_65.HostApplyProfile)VIConvert.ToWsdlType(applyProfile); result = (StructuredCustomizations[])VIConvert.ToVim(this.VimServiceProxy.RetrieveHostCustomizationsForProfile(new RetrieveHostCustomizationsForProfileRequest(retrieveHostCustomizationsForProfileRequestType)).RetrieveHostCustomizationsForProfileResponse1); } catch (FaultException ex) { throw FaultUtility.HandleFault(ex); } return(result); }