public void ReconfigureDatacenter(DatacenterConfigSpec spec, bool modify)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
         ManagedObjectReference taskReference = this.ReconfigureDatacenter_Task(spec, modify);
         this.Client.WaitForTask(taskReference);
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public ManagedObjectReference ReconfigureDatacenter_Task(DatacenterConfigSpec spec, bool modify)
        {
            ManagedObjectReference result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim51);
                ReconfigureDatacenterRequestType reconfigureDatacenterRequestType = new ReconfigureDatacenterRequestType();
                reconfigureDatacenterRequestType._this  = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                reconfigureDatacenterRequestType.spec   = (VimApi_65.DatacenterConfigSpec)VIConvert.ToWsdlType(spec);
                reconfigureDatacenterRequestType.modify = modify;
                result = (ManagedObjectReference)VIConvert.ToVim(this.VimServiceProxy.ReconfigureDatacenter_Task(new ReconfigureDatacenter_TaskRequest(reconfigureDatacenterRequestType)).ReconfigureDatacenter_TaskResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }