// Path: aliyun-ecs/src/main/java/org/jclouds/aliyun/ecs/compute/ECSComputeServiceContext.java
// @ImplementedBy(ECSComputeServiceContextImpl.class)
// public interface ECSComputeServiceContext extends ComputeServiceContext {
// 
//    @Override
//    ECSComputeService getComputeService();
// }
// 
// Path: aliyun-ecs/src/main/java/org/jclouds/aliyun/ecs/compute/config/ECSComputeServiceContextModule.java
// public class ECSComputeServiceContextModule extends JCloudsNativeComputeServiceAdapterContextModule {
// 
//    public ECSComputeServiceContextModule() {
//       super(ECSComputeServiceAdapter.class);
//    }
// 
//    @Override
//    protected void configure() {
//       super.configure();
//       bind(ECSApi.class).to(ECSApiImpl.class);
//       bind(ComputeService.class).to(ECSComputeService.class);
//       install(new LocationsFromComputeServiceAdapterModule<NodeMetadata, Hardware, Image, Location>() {});
//    }
// 
//    @Provides
//    @Named("ECS")
//    protected final TemplateOptions guiceProvideTemplateOptions(TemplateOptions options) {
//       return options.blockUntilRunning(false);
//    }
// 
//    @Provides
//    @Named("ECS")
//    protected final TemplateBuilder guiceProvideTemplateBuilder(TemplateBuilder template) {
//       return template.imageId("cn-shanghai:aliyun1501_64_20G_aliaegis_20150325.vhd")
//             .hardwareId("ecs.t1.small")
//             .locationId("cn-hangzhou");
//    }
// 
//    @Provides
//    @Singleton
//    protected final Map<Instance.Status, NodeMetadata.Status> getInstanceStatus() {
//       return ImmutableMap.<Instance.Status, NodeMetadata.Status> builder()
//             .put(Instance.Status.RUNNING, NodeMetadata.Status.RUNNING)
//             .put(Instance.Status.STOPPED, NodeMetadata.Status.SUSPENDED)
//             .put(Instance.Status.DELETED, NodeMetadata.Status.TERMINATED)
//             .put(Instance.Status.STARTING, NodeMetadata.Status.PENDING)
//             .put(Instance.Status.RESETTING, NodeMetadata.Status.PENDING)
//             .put(Instance.Status.TRANSFERRING, NodeMetadata.Status.PENDING)
//             .put(Instance.Status.STOPPING, NodeMetadata.Status.PENDING)
//             .build();
//    }
// }


import java.net.URI;
import org.jclouds.aliyun.ecs.compute.ECSComputeServiceContext;
import org.jclouds.aliyun.ecs.compute.config.ECSComputeServiceContextModule;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.apis.internal.BaseApiMetadata;
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Module;
package org.jclouds.aliyun.ecs;




public class ECSApiMetadata extends BaseApiMetadata {

   @Override
   public Builder toBuilder() {
      return new Builder();
   }

   public ECSApiMetadata() {
      this(new Builder());
   }

   protected ECSApiMetadata(Builder builder) {
      super(builder);
   }

   public static class Builder extends BaseApiMetadata.Builder<Builder> {

      protected Builder() {
         id("aliyun-ecs-api")
         .name("aliyun ecs api")
         .identityName("identity")
         .documentation(URI.create("https://help.aliyun.com/document_detail/ecs/open-api/summary.html"))
         .defaultEndpoint("http://ecs.aliyuncs.com")
// Path: aliyun-ecs/src/main/java/org/jclouds/aliyun/ecs/compute/ECSComputeServiceContext.java
// @ImplementedBy(ECSComputeServiceContextImpl.class)
// public interface ECSComputeServiceContext extends ComputeServiceContext {
// 
//    @Override
//    ECSComputeService getComputeService();
// }
// 
// Path: aliyun-ecs/src/main/java/org/jclouds/aliyun/ecs/compute/config/ECSComputeServiceContextModule.java
// public class ECSComputeServiceContextModule extends JCloudsNativeComputeServiceAdapterContextModule {
// 
//    public ECSComputeServiceContextModule() {
//       super(ECSComputeServiceAdapter.class);
//    }
// 
//    @Override
//    protected void configure() {
//       super.configure();
//       bind(ECSApi.class).to(ECSApiImpl.class);
//       bind(ComputeService.class).to(ECSComputeService.class);
//       install(new LocationsFromComputeServiceAdapterModule<NodeMetadata, Hardware, Image, Location>() {});
//    }
// 
//    @Provides
//    @Named("ECS")
//    protected final TemplateOptions guiceProvideTemplateOptions(TemplateOptions options) {
//       return options.blockUntilRunning(false);
//    }
// 
//    @Provides
//    @Named("ECS")
//    protected final TemplateBuilder guiceProvideTemplateBuilder(TemplateBuilder template) {
//       return template.imageId("cn-shanghai:aliyun1501_64_20G_aliaegis_20150325.vhd")
//             .hardwareId("ecs.t1.small")
//             .locationId("cn-hangzhou");
//    }
// 
//    @Provides
//    @Singleton
//    protected final Map<Instance.Status, NodeMetadata.Status> getInstanceStatus() {
//       return ImmutableMap.<Instance.Status, NodeMetadata.Status> builder()
//             .put(Instance.Status.RUNNING, NodeMetadata.Status.RUNNING)
//             .put(Instance.Status.STOPPED, NodeMetadata.Status.SUSPENDED)
//             .put(Instance.Status.DELETED, NodeMetadata.Status.TERMINATED)
//             .put(Instance.Status.STARTING, NodeMetadata.Status.PENDING)
//             .put(Instance.Status.RESETTING, NodeMetadata.Status.PENDING)
//             .put(Instance.Status.TRANSFERRING, NodeMetadata.Status.PENDING)
//             .put(Instance.Status.STOPPING, NodeMetadata.Status.PENDING)
//             .build();
//    }
// }


// Path: aliyun-ecs/src/main/java/org/jclouds/aliyun/ecs/ECSApiMetadata.java
import java.net.URI;
import org.jclouds.aliyun.ecs.compute.ECSComputeServiceContext;
import org.jclouds.aliyun.ecs.compute.config.ECSComputeServiceContextModule;
import org.jclouds.apis.ApiMetadata;
import org.jclouds.apis.internal.BaseApiMetadata;
import org.jclouds.logging.log4j.config.Log4JLoggingModule;
import com.google.common.collect.ImmutableSet;
import com.google.inject.Module;

package org.jclouds.aliyun.ecs;




public class ECSApiMetadata extends BaseApiMetadata {

   @Override
   public Builder toBuilder() {
      return new Builder();
   }

   public ECSApiMetadata() {
      this(new Builder());
   }

   protected ECSApiMetadata(Builder builder) {
      super(builder);
   }

   public static class Builder extends BaseApiMetadata.Builder<Builder> {

      protected Builder() {
         id("aliyun-ecs-api")
         .name("aliyun ecs api")
         .identityName("identity")
         .documentation(URI.create("https://help.aliyun.com/document_detail/ecs/open-api/summary.html"))
         .defaultEndpoint("http://ecs.aliyuncs.com")
         .view(ECSComputeServiceContext.class)