public HostUnresolvedVmfsVolume[] QueryUnresolvedVmfsVolumes()
 {
     HostUnresolvedVmfsVolume[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         QueryUnresolvedVmfsVolumesRequestType queryUnresolvedVmfsVolumesRequestType = new QueryUnresolvedVmfsVolumesRequestType();
         queryUnresolvedVmfsVolumesRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         result = (HostUnresolvedVmfsVolume[])VIConvert.ToVim(this.VimServiceProxy.QueryUnresolvedVmfsVolumes(new QueryUnresolvedVmfsVolumesRequest(queryUnresolvedVmfsVolumesRequestType)).QueryUnresolvedVmfsVolumesResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
        public ManagedObjectReference RemoveDatastoreEx_Task(ManagedObjectReference[] datastore)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
                RemoveDatastoreExRequestType removeDatastoreExRequestType = new RemoveDatastoreExRequestType();
                removeDatastoreExRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                removeDatastoreExRequestType.datastore = (VimApi_65.ManagedObjectReference[])VIConvert.ToWsdlType(datastore);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.RemoveDatastoreEx_Task(new RemoveDatastoreEx_TaskRequest(removeDatastoreExRequestType)).RemoveDatastoreEx_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public void ConfigureDatastorePrincipal(string userName, string password)
 {
     try
     {
         ConfigureDatastorePrincipalRequestType configureDatastorePrincipalRequestType = new ConfigureDatastorePrincipalRequestType();
         configureDatastorePrincipalRequestType._this    = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         configureDatastorePrincipalRequestType.userName = userName;
         configureDatastorePrincipalRequestType.password = password;
         this.VimServiceProxy.ConfigureDatastorePrincipal(new ConfigureDatastorePrincipalRequest(configureDatastorePrincipalRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference CreateVvolDatastore(HostDatastoreSystemVvolDatastoreSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim60);
                CreateVvolDatastoreRequestType createVvolDatastoreRequestType = new CreateVvolDatastoreRequestType();
                createVvolDatastoreRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createVvolDatastoreRequestType.spec  = (VimApi_65.HostDatastoreSystemVvolDatastoreSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateVvolDatastore(new CreateVvolDatastoreRequest(createVvolDatastoreRequestType)).CreateVvolDatastoreResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public void RemoveDatastore(ManagedObjectReference datastore)
 {
     try
     {
         RemoveDatastoreRequestType removeDatastoreRequestType = new RemoveDatastoreRequestType();
         removeDatastoreRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         removeDatastoreRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
         this.VimServiceProxy.RemoveDatastore(new RemoveDatastoreRequest(removeDatastoreRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference CreateLocalDatastore(string name, string path)
        {
            ManagedObjectReference result;

            try
            {
                CreateLocalDatastoreRequestType createLocalDatastoreRequestType = new CreateLocalDatastoreRequestType();
                createLocalDatastoreRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createLocalDatastoreRequestType.name  = name;
                createLocalDatastoreRequestType.path  = path;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateLocalDatastore(new CreateLocalDatastoreRequest(createLocalDatastoreRequestType)).CreateLocalDatastoreResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference CreateNasDatastore(HostNasVolumeSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                CreateNasDatastoreRequestType createNasDatastoreRequestType = new CreateNasDatastoreRequestType();
                createNasDatastoreRequestType._this = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                createNasDatastoreRequestType.spec  = (VimApi_65.HostNasVolumeSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.CreateNasDatastore(new CreateNasDatastoreRequest(createNasDatastoreRequestType)).CreateNasDatastoreResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public ManagedObjectReference ExpandVmfsDatastore(ManagedObjectReference datastore, VmfsDatastoreExpandSpec spec)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
                ExpandVmfsDatastoreRequestType expandVmfsDatastoreRequestType = new ExpandVmfsDatastoreRequestType();
                expandVmfsDatastoreRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                expandVmfsDatastoreRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
                expandVmfsDatastoreRequestType.spec      = (VimApi_65.VmfsDatastoreExpandSpec)VIConvert.ToWsdlType(spec);
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ExpandVmfsDatastore(new ExpandVmfsDatastoreRequest(expandVmfsDatastoreRequestType)).ExpandVmfsDatastoreResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
 public VmfsDatastoreOption[] QueryVmfsDatastoreExpandOptions(ManagedObjectReference datastore)
 {
     VmfsDatastoreOption[] result;
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim4);
         QueryVmfsDatastoreExpandOptionsRequestType queryVmfsDatastoreExpandOptionsRequestType = new QueryVmfsDatastoreExpandOptionsRequestType();
         queryVmfsDatastoreExpandOptionsRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         queryVmfsDatastoreExpandOptionsRequestType.datastore = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
         result = (VmfsDatastoreOption[])VIConvert.ToVim(this.VimServiceProxy.QueryVmfsDatastoreExpandOptions(new QueryVmfsDatastoreExpandOptionsRequest(queryVmfsDatastoreExpandOptionsRequestType)).QueryVmfsDatastoreExpandOptionsResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }
 public VmfsDatastoreOption[] QueryVmfsDatastoreExtendOptions(ManagedObjectReference datastore, string devicePath, bool?suppressExpandCandidates)
 {
     VmfsDatastoreOption[] result;
     try
     {
         QueryVmfsDatastoreExtendOptionsRequestType queryVmfsDatastoreExtendOptionsRequestType = new QueryVmfsDatastoreExtendOptionsRequestType();
         queryVmfsDatastoreExtendOptionsRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         queryVmfsDatastoreExtendOptionsRequestType.datastore  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(datastore);
         queryVmfsDatastoreExtendOptionsRequestType.devicePath = devicePath;
         queryVmfsDatastoreExtendOptionsRequestType.suppressExpandCandidates          = suppressExpandCandidates.GetValueOrDefault();
         queryVmfsDatastoreExtendOptionsRequestType.suppressExpandCandidatesSpecified = suppressExpandCandidates.HasValue;
         result = (VmfsDatastoreOption[])VIConvert.ToVim(this.VimServiceProxy.QueryVmfsDatastoreExtendOptions(new QueryVmfsDatastoreExtendOptionsRequest(queryVmfsDatastoreExtendOptionsRequestType)).QueryVmfsDatastoreExtendOptionsResponse1);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
     return(result);
 }