package com.vmware.vim25.mo;

import java.rmi.RemoteException;

import com.vmware.vim25.IORMNotSupportedHostOnDatastore;
import com.vmware.vim25.InaccessibleDatastore;
import com.vmware.vim25.ManagedObjectReference;
import com.vmware.vim25.RuntimeFault;
import com.vmware.vim25.StorageDrsConfigSpec;
import com.vmware.vim25.StorageIORMConfigOption;
import com.vmware.vim25.StorageIORMConfigSpec;
import com.vmware.vim25.StoragePlacementResult;
import com.vmware.vim25.StoragePlacementSpec;

public class StorageResourceManager extends ManagedObject
{
  
  /**
   * @since SDK5.0
   */
  public Task applyStorageDrsRecommendation_Task( String[] keys) throws RuntimeFault, RemoteException
  {
    ManagedObjectReference taskMor = getVimService().applyStorageDrsRecommendation_Task(getMOR(), keys);
    return new Task(getServerConnection(), taskMor);
  }
  
  /**
   * @since SDK5.0
   */
  public Task applyStorageDrsRecommendationToPod_Task(StoragePod pod, String key) throws RuntimeFault, RemoteException
  {
    ManagedObjectReference taskMor = getVimService().applyStorageDrsRecommendationToPod_Task(getMOR(), pod.getMOR(), key);
    return new Task(getServerConnection(), taskMor);    
  }

  /**
   * @since SDK5.0
   */
  public void cancelStorageDrsRecommendation(String[] keys) throws RuntimeFault, RemoteException
  {
    getVimService().cancelStorageDrsRecommendation(getMOR(), keys);
  }
  
  public Task configureDatastoreIORM_Task(Datastore datastore, StorageIORMConfigSpec spec) throws InaccessibleDatastore, IORMNotSupportedHostOnDatastore, RuntimeFault, RemoteException
  {
    ManagedObjectReference mor = getVimService().configureDatastoreIORM_Task(getMOR(), datastore.getMOR(), spec);
    return new Task(getServerConnection(), mor);
  }
  
  /**
   * @since SDK5.0
   */
  public Task configureStorageDrsForPod_Task(StoragePod pod, StorageDrsConfigSpec spec, boolean modify) throws RuntimeFault, RemoteException
  {
    ManagedObjectReference taskMor = getVimService().configureStorageDrsForPod_Task(getMOR(), pod.getMOR(), spec, modify);
    return new Task(getServerConnection(), taskMor);
  }
  
  public StorageIORMConfigOption queryIORMConfigOption(HostSystem host) throws RuntimeFault, RemoteException
  {
    return getVimService().queryIORMConfigOption(getMOR(), host.getMOR());
  }
  
  /**
   * @since SDK5.0
   */
  public StoragePlacementResult recommendDatastores(StoragePlacementSpec storageSpec) throws RuntimeFault, RemoteException
  {
    return getVimService().recommendDatastores(getMOR(), storageSpec);
  }

  /**
   * @since SDK5.0
   */
  public void refreshStorageDrsRecommendation(StoragePod pod) throws RuntimeFault, RemoteException
  {
    getVimService().refreshStorageDrsRecommendation(getMOR(), pod.getMOR());
  }
}
@@ -1,8 +1,1733 @@
+/*================================================================================%0D%0ACopyright (c) 2011 VMware, Inc. All Rights Reserved.%0D%0ACopyright (c) 2012 Steve Jin. All Rights Reserved.%0D%0A%0D%0ARedistribution and use in source and binary forms, with or without modification, %0D%0Aare permitted provided that the following conditions are met:%0D%0A%0D%0A* Redistributions of source code must retain the above copyright notice, %0D%0Athis list of conditions and the following disclaimer.%0D%0A%0D%0A* Redistributions in binary form must reproduce the above copyright notice, %0D%0Athis list of conditions and the following disclaimer in the documentation %0D%0Aand/or other materials provided with the distribution.%0D%0A%0D%0A* Neither the name of VMware, Inc. nor the names of its contributors may be used%0D%0Ato endorse or promote products derived from this software without specific prior %0D%0Awritten permission.%0D%0A%0D%0ATHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS %22AS IS%22 AND %0D%0AANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED %0D%0AWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. %0D%0AIN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, %0D%0AINCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT %0D%0ALIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR %0D%0APROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, %0D%0AWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) %0D%0AARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE %0D%0APOSSIBILITY OF SUCH DAMAGE.%0D%0A================================================================================*/%0D%0A%0D%0A
 package 
@@ -2285,16 +2285,158 @@
 ect%0D%0A%7B%0D%0A
+  public StorageResourceManager(ServerConnection serverConnection, ManagedObjectReference mor) %0D%0A  %7B%0D%0A    super(serverConnection, mor);%0D%0A  %7D%0D%0A
   %0D%0A  /*

Fix 3497202: StorageResourceManager constructor missing