diff --git a/core/src/main/resources/rest.properties b/core/src/main/resources/rest.properties
index 3ff7c3d7cd..17b919de08 100644
--- a/core/src/main/resources/rest.properties
+++ b/core/src/main/resources/rest.properties
@@ -50,9 +50,6 @@ trmk-vcloudexpress.propertiesbuilder=org.jclouds.trmk.vcloudexpress.TerremarkVCl
trmk-ecloud.contextbuilder=org.jclouds.trmk.ecloud.TerremarkECloudContextBuilder
trmk-ecloud.propertiesbuilder=org.jclouds.trmk.ecloud.TerremarkECloudPropertiesBuilder
-tmrk-enterprisecloud.contextbuilder=org.jclouds.tmrk.enterprisecloud.TerremarkEnterpriseCloudContextBuilder
-tmrk-enterprisecloud.propertiesbuilder=org.jclouds.tmrk.enterprisecloud.TerremarkEnterpriseCloudPropertiesBuilder
-
chef.contextbuilder=org.jclouds.chef.ChefContextBuilder
chef.propertiesbuilder=org.jclouds.chef.ChefPropertiesBuilder
diff --git a/sandbox-providers/tmrk-enterprisecloud/pom.xml b/sandbox-providers/tmrk-enterprisecloud/pom.xml
deleted file mode 100644
index c054ed0233..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/pom.xml
+++ /dev/null
@@ -1,142 +0,0 @@
-
-
-
- 4.0.0
-
- org.jclouds
- jclouds-project
- 1.3.0-SNAPSHOT
- ../../project/pom.xml
-
- org.jclouds.provider
- tmrk-enterprisecloud
- jclouds Terremark Enterprise Cloud core
- jclouds components to access Terremark Enterprise Cloud
- bundle
-
-
-
-
- jclouds-sona-snapshots-nexus
- https://oss.sonatype.org/content/repositories/snapshots
-
- false
-
-
- true
-
-
-
-
-
- https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud
- 2011-07-01
- FIXME
- FIXME
-
-
-
-
- org.jclouds
- jclouds-compute
- ${project.version}
-
-
- com.jamesmurty.utils
- java-xmlbuilder
- 0.4
-
-
- org.jclouds
- jclouds-core
- ${project.version}
- test-jar
- test
-
-
- org.jclouds
- jclouds-compute
- ${project.version}
- test-jar
- test
-
-
- org.jclouds.driver
- jclouds-log4j
- ${project.version}
- test
-
-
- org.jclouds.driver
- jclouds-sshj
- ${project.version}
- test
-
-
-
-
- live
-
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- integration
- integration-test
-
- test
-
-
-
- ${test.tmrk-enterprisecloud.endpoint}
- ${test.tmrk-enterprisecloud.apiversion}
- ${test.tmrk-enterprisecloud.identity}
- ${test.tmrk-enterprisecloud.credential}
- ${test.tmrk-enterprisecloud.image-id}
-
-
-
-
-
-
-
-
-
-
-
-
-
- org.apache.felix
- maven-bundle-plugin
-
-
- ${project.artifactId}
- org.jclouds.tmrk.enterprisecloud.*;version="${project.version}"
- org.jclouds.*;version="${project.version}",*
-
-
-
-
-
-
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudAsyncClient.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudAsyncClient.java
deleted file mode 100644
index 9acd27839b..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudAsyncClient.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud;
-
-import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.tmrk.enterprisecloud.features.*;
-
-/**
- * Provides asynchronous access to TerremarkEnterpriseCloud via their REST API.
- *
- *
- * @see TerremarkEnterpriseCloudClient
- * @see
- * @author Adrian Cole
- */
-public interface TerremarkEnterpriseCloudAsyncClient {
-
- /**
- * Provides asynchronous access to Internet Service features.
- */
- @Delegate
- InternetServiceAsyncClient getInternetServiceClient();
-
- /**
- * Provides asynchronous access to Layout features.
- */
- @Delegate
- LayoutAsyncClient getLayoutClient();
-
- /**
- * Provides asynchronous access to Location features.
- */
- @Delegate
- LocationAsyncClient getLocationClient();
-
- /**
- * Provides asynchronous access to Network features.
- */
- @Delegate
- NetworkAsyncClient getNetworkClient();
-
- /**
- * Provides asynchronous access to Resource features.
- */
- @Delegate
- ResourceAsyncClient getResourceClient();
-
- /**
- * Provides asynchronous access to Task features.
- */
- @Delegate
- TaskAsyncClient getTaskClient();
-
- /**
- * Provides asynchronous access to SSH Key features.
- */
- @Delegate
- SSHKeyAsyncClient getSSHKeyClient();
-
- /**
- * Provides asynchronous access to VirtualMachine features.
- */
- @Delegate
- VirtualMachineAsyncClient getVirtualMachineClient();
-
- /**
- * Provides asynchronous access to Template features.
- */
- @Delegate
- TemplateAsyncClient getTemplateClient();
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudClient.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudClient.java
deleted file mode 100644
index fb498ea839..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudClient.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud;
-
-import java.util.concurrent.TimeUnit;
-
-import org.jclouds.concurrent.Timeout;
-import org.jclouds.rest.annotations.Delegate;
-import org.jclouds.tmrk.enterprisecloud.features.*;
-
-/**
- * Provides synchronous access to TerremarkEnterpriseCloud.
- *
- *
- * @see TerremarkEnterpriseCloudAsyncClient
- * @see
- * @author Adrian Cole
- */
-@Timeout(duration = 180, timeUnit = TimeUnit.SECONDS)
-public interface TerremarkEnterpriseCloudClient {
-
- /**
- * Provides synchronous access to Internet Service features.
- */
- @Delegate
- InternetServiceClient getInternetServiceClient();
-
- /**
- * Provides synchronous access to Layout features.
- */
- @Delegate
- LayoutClient getLayoutClient();
-
- /**
- * Provides synchronous access to Location features.
- */
- @Delegate
- LocationClient getLocationClient();
-
- /**
- * Provides synchronous access to Resource features.
- */
- @Delegate
- ResourceClient getResourceClient();
-
- /**
- * Provides synchronous access to Network features.
- */
- @Delegate
- NetworkClient getNetworkClient();
-
- /**
- * Provides synchronous access to SSH Key features.
- */
- @Delegate
- SSHKeyClient getSSHKeyClient();
-
- /**
- * Provides synchronous access to Task features.
- */
- @Delegate
- TaskClient getTaskClient();
-
- /**
- * Provides synchronous access to VirtualMachine features.
- */
- @Delegate
- VirtualMachineClient getVirtualMachineClient();
-
- /**
- * Provides synchronous access to Template features.
- */
- @Delegate
- TemplateClient getTemplateClient();
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudContextBuilder.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudContextBuilder.java
deleted file mode 100644
index f5c2cc7254..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudContextBuilder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.jclouds.rest.RestContextBuilder;
-import org.jclouds.tmrk.enterprisecloud.config.TerremarkEnterpriseCloudRestClientModule;
-
-import com.google.inject.Module;
-
-/**
- *
- * @author Adrian Cole
- */
-public class TerremarkEnterpriseCloudContextBuilder extends
- RestContextBuilder {
-
- public TerremarkEnterpriseCloudContextBuilder(Properties props) {
- super(TerremarkEnterpriseCloudClient.class, TerremarkEnterpriseCloudAsyncClient.class, props);
- }
-
- @Override
- protected void addClientModule(List modules) {
- modules.add(new TerremarkEnterpriseCloudRestClientModule());
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java
deleted file mode 100644
index 96383460da..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudPropertiesBuilder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud;
-
-import static org.jclouds.Constants.PROPERTY_API_VERSION;
-import static org.jclouds.Constants.PROPERTY_ENDPOINT;
-
-import java.util.Properties;
-
-import org.jclouds.PropertiesBuilder;
-
-/**
- * Builds properties used in TerremarkEnterpriseCloud Clients
- *
- * @author Adrian Cole
- */
-public class TerremarkEnterpriseCloudPropertiesBuilder extends PropertiesBuilder {
- @Override
- protected Properties defaultProperties() {
- Properties properties = super.defaultProperties();
- properties.setProperty(PROPERTY_ENDPOINT, "https://services-beta.enterprisecloud.terremark.com/cloudapi/ecloud");
- properties.setProperty(PROPERTY_API_VERSION, "2011-07-01");
- return properties;
- }
-
- public TerremarkEnterpriseCloudPropertiesBuilder(Properties properties) {
- super(properties);
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudProviderMetadata.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudProviderMetadata.java
deleted file mode 100644
index 41d3e79815..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/TerremarkEnterpriseCloudProviderMetadata.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud;
-
-import java.net.URI;
-import java.util.Set;
-
-import org.jclouds.providers.BaseProviderMetadata;
-import org.jclouds.providers.ProviderMetadata;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Implementation of {@link org.jclouds.types.ProviderMetadata} for Terremark
- * Enterprise Cloud.
- *
- * @author Adrian Cole
- */
-public class TerremarkEnterpriseCloudProviderMetadata extends BaseProviderMetadata {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getId() {
- return "tmrk-enterprisecloud";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getType() {
- return ProviderMetadata.COMPUTE_TYPE;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getName() {
- return "Terremark Enterprise Cloud";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getIdentityName() {
- return "Email";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getCredentialName() {
- return "Password";
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public URI getHomepage() {
- return URI.create("http://www.terremark.com/services/cloudcomputing/theenterprisecloud.aspx");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public URI getConsole() {
- return URI.create("https://my-beta.enterprisecloud.terremark.com/");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public URI getApiDocumentation() {
- return URI.create("http://support.theenterprisecloud.com/kb/default.asp?id=984&Lang=1&SID=");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Set getLinkedServices() {
- return ImmutableSet.of("tmrk-enterprisecloud", "tmrk-ecloud", "tmrk-vcloudexpress");
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Set getIso3166Codes() {
- return ImmutableSet.of("TODO");
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateInternetServiceToXmlPayload.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateInternetServiceToXmlPayload.java
deleted file mode 100644
index 229277a1fe..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateInternetServiceToXmlPayload.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import org.jclouds.rest.binders.BindToStringPayload;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-/**
- * For use with {@see org.jclouds.tmrk.enterprisecloud.features.InternetServiceClient#createInternetService}
- * @author Jason King
- */
-@Singleton
-public class BindCreateInternetServiceToXmlPayload extends BindInternetServiceToXmlPayload {
-
- @Inject
- BindCreateInternetServiceToXmlPayload(BindToStringPayload stringBinder) {
- super(stringBinder, "CreateInternetService");
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateSSHKeyToXmlPayload.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateSSHKeyToXmlPayload.java
deleted file mode 100644
index f3bfd115b5..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateSSHKeyToXmlPayload.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import com.jamesmurty.utils.XMLBuilder;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.MapBinder;
-import org.jclouds.rest.binders.BindToStringPayload;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import java.util.Map;
-import java.util.Properties;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Jason King
- */
-@Singleton
-public class BindCreateSSHKeyToXmlPayload implements MapBinder {
-
- private final BindToStringPayload stringBinder;
-
- @Inject
- BindCreateSSHKeyToXmlPayload(BindToStringPayload stringBinder) {
- this.stringBinder = stringBinder;
- }
-
- @Override
- public R bindToRequest(R request, Map params) {
- checkNotNull(request, "request");
- checkNotNull(params, "params");
- String name = checkNotNull(params.get("name"), "name");
- String isDefault = checkNotNull(params.get("isDefault"), "isDefault");
-
- String payload = createXMLPayload(name,isDefault);
- return stringBinder.bindToRequest(request, payload);
- }
-
- private String createXMLPayload(String name, String isDefault) {
- try {
- Properties outputProperties = new Properties();
- outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
- return XMLBuilder.create("CreateSshKey").a("name",name)
- .e("Default").t(isDefault)
- .asString(outputProperties);
- } catch (ParserConfigurationException e) {
- throw new RuntimeException(e);
- } catch (TransformerException t) {
- throw new RuntimeException(t);
- }
- }
-
- @Override
- public R bindToRequest(R request, Object input) {
- throw new IllegalStateException("BindCreateKey needs parameters");
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateVirtualMachineKeyToXmlPayload.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateVirtualMachineKeyToXmlPayload.java
deleted file mode 100644
index 3ed7c374ad..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindCreateVirtualMachineKeyToXmlPayload.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import com.jamesmurty.utils.XMLBuilder;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.Binder;
-import org.jclouds.rest.binders.BindToStringPayload;
-import org.jclouds.tmrk.enterprisecloud.domain.NamedResource;
-import org.jclouds.tmrk.enterprisecloud.domain.layout.LayoutRequest;
-import org.jclouds.tmrk.enterprisecloud.domain.network.*;
-import org.jclouds.tmrk.enterprisecloud.domain.vm.CreateVirtualMachine;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import java.util.Properties;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * For use with {@see VirtualMachineClient#createVirtualMachineFromTemplate}
- * @author Jason King
- */
-@Singleton
-public class BindCreateVirtualMachineKeyToXmlPayload implements Binder {
-
- private final BindToStringPayload stringBinder;
-
- @Inject
- BindCreateVirtualMachineKeyToXmlPayload(BindToStringPayload stringBinder) {
- this.stringBinder = stringBinder;
- }
-
- @Override
- public R bindToRequest(R request, Object key) {
- checkArgument(checkNotNull(key, "key") instanceof CreateVirtualMachine, "this binder is only valid for CreateOsTemplateVirtualMachineRequest instances!");
- checkNotNull(request, "request");
- CreateVirtualMachine vmData = CreateVirtualMachine.class.cast(key);
-
- String payload = createXMLPayload(vmData);
- return stringBinder.bindToRequest(request, payload);
- }
-
- private String createXMLPayload(CreateVirtualMachine vmData) {
- try {
- Properties outputProperties = new Properties();
- outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
-
- final String name = vmData.getName();
- final String processorCount = Integer.toString(vmData.getProcessorCount());
- final String memoryUnit = vmData.getMemory().getUnit();
- final int memoryValue = ((Double)(vmData.getMemory().getValue())).intValue();
- final Set tags = vmData.getTags();
- final String description = vmData.getDescription();
- final LayoutRequest layout = vmData.getLayout();
- final String poweredOn = Boolean.toString(vmData.isPoweredOn());
- final NamedResource template = vmData.getTemplate();
-
- XMLBuilder builder = XMLBuilder.create("CreateVirtualMachine").a("name",name)
- .e("ProcessorCount").t(processorCount).up()
- .e("Memory").e("Unit").t(memoryUnit).up()
- .e("Value").t(Integer.toString(memoryValue)).up().up();
- builder = layout(builder,layout);
- builder.e("Description").t(description).up();
- builder = tags(builder,tags);
- builder = linuxCustomization(builder, vmData);
- builder = windowsCustomization(builder, vmData);
- builder.e("PoweredOn").t(poweredOn).up()
- .e("Template").a("href",template.getHref().toString())
- .a("type", template.getType()).up();
-
- return builder.asString(outputProperties);
- } catch (ParserConfigurationException e) {
- throw new RuntimeException(e);
- } catch (TransformerException t) {
- throw new RuntimeException(t);
- }
- }
-
- private XMLBuilder layout(XMLBuilder in, LayoutRequest layout) {
- in = in.e("Layout");
- if(layout.getGroup()!=null) {
- in = in.e("Group").a("href",layout.getGroup().getHref().toString())
- .a("type",layout.getGroup().getType()).up();
- } else if (layout.getRow()!=null) {
- checkNotNull(layout.getNewGroup(),"newGroup");
- in = in.e("Row").a("href",layout.getRow().getHref().toString())
- .a("type", layout.getRow().getType()).up()
- .e("NewGroup").t(layout.getNewGroup()).up();
- } else {
- checkNotNull(layout.getNewRow(),"newRow");
- checkNotNull(layout.getNewGroup(), "newGroup");
- in = in.e("NewRow").t(layout.getNewRow()).up()
- .e("NewGroup").t(layout.getNewGroup()).up();
- }
- return in.up();
- }
-
- private XMLBuilder tags(XMLBuilder in, Set tags ) {
- checkNotNull(tags,"tags");
- in = in.e("Tags");
- for(String tag: tags) {
- in = in.e("Tag").t(tag).up();
- }
- return in.up();
- }
-
- private XMLBuilder linuxCustomization(XMLBuilder in, CreateVirtualMachine vmData) {
- LinuxCustomization linuxCustomization = vmData.getLinuxCustomization();
- if(linuxCustomization==null) return in;
- if(vmData.getWindowsCustomization()!=null) throw new IllegalStateException("Cannot have linux and windows customizations");
-
- in = in.e("LinuxCustomization")
- .e("NetworkSettings")
- .e("NetworkAdapterSettings");
-
- for(NetworkAdapterSetting setting:linuxCustomization.getNetworkSettings().getNetworkAdapterSettings().getNetworkAdapterSettings()) {
- in = networkAdapterSetting(in,setting);
- }
-
- in = in.up();
- in = dnsSettings(in, linuxCustomization.getNetworkSettings().getDnsSettings());
-
- String href = linuxCustomization.getSshKey().getHref().toString();
- String type = linuxCustomization.getSshKey().getType();
- return in.up().e("SshKey").a("href",href).a("type",type).up().up();
- }
-
- private XMLBuilder networkAdapterSetting(XMLBuilder builder, NetworkAdapterSetting setting) {
- String href = setting.getNetwork().getHref().toString();
- String name = setting.getNetwork().getName();
- String type = setting.getNetwork().getType();
- builder.e("NetworkAdapter")
- .e("Network").a("href",href).a("name",name).a("type",type).up()
- .e("IpAddress").t(setting.getIpAddress()).up();
- return builder;
- }
-
- private XMLBuilder dnsSettings(XMLBuilder in, DnsSettings dnsSettings) {
- if(dnsSettings==null)return in;
- final String primary = dnsSettings.getPrimaryDns();
- final String secondary = dnsSettings.getSecondaryDns();
-
- in = in.e("DnsSettings").e("PrimaryDns").t(primary).up();
- if(secondary!=null && !secondary.isEmpty()) {
- in = in.e("SecondaryDns").t(secondary).up();
- }
- return in.up();
- }
-
- private XMLBuilder windowsCustomization(XMLBuilder builder, CreateVirtualMachine vmData) {
- WindowsCustomization windowsCustomization = vmData.getWindowsCustomization();
- if(windowsCustomization==null) return builder;
- if(vmData.getLinuxCustomization()!=null) throw new IllegalStateException("Cannot have linux and windows customizations");
-
- //TODO: Not implemented yet
- throw new UnsupportedOperationException("windowsCustomization has not been implemented yet");
- //return builder;
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindDateToQueryParam.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindDateToQueryParam.java
deleted file mode 100644
index 7278fe4183..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindDateToQueryParam.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import org.jclouds.date.DateService;
-import org.jclouds.date.internal.SimpleDateFormatDateService;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.http.utils.ModifyRequest;
-import org.jclouds.rest.Binder;
-
-import javax.inject.Provider;
-import javax.ws.rs.core.UriBuilder;
-import java.util.Date;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * @author Jason King
- */
-abstract class BindDateToQueryParam implements Binder {
-
- private final Provider uriBuilderProvider;
- private final DateService dateService;
- private final String key;
-
- public BindDateToQueryParam(Provider uriBuilderProvider, String key) {
- this.uriBuilderProvider = checkNotNull(uriBuilderProvider, "uriBuilderProvider");
- this.dateService = new SimpleDateFormatDateService();
- this.key = key;
- }
-
- @Override
- public R bindToRequest(R request, Object input) {
- if(input==null) return request;
- Date date = Date.class.cast(input);
- String dateString = dateService.iso8601SecondsDateFormat(date);
- return ModifyRequest.addQueryParam(request, key, dateString, uriBuilderProvider.get());
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindEndTimeQueryParam.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindEndTimeQueryParam.java
deleted file mode 100644
index 069a599dd1..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindEndTimeQueryParam.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import javax.inject.Inject;
-import javax.inject.Provider;
-import javax.inject.Singleton;
-import javax.ws.rs.core.UriBuilder;
-
-/**
- * @author Jason King
- */
-@Singleton
-public class BindEndTimeQueryParam extends BindDateToQueryParam {
-
- @Inject
- public BindEndTimeQueryParam(Provider uriBuilderProvider) {
- super(uriBuilderProvider,"endtime");
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindInternetServiceToXmlPayload.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindInternetServiceToXmlPayload.java
deleted file mode 100644
index eaa3be8131..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindInternetServiceToXmlPayload.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import com.jamesmurty.utils.XMLBuilder;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.Binder;
-import org.jclouds.rest.binders.BindToStringPayload;
-import org.jclouds.tmrk.enterprisecloud.domain.NamedResource;
-import org.jclouds.tmrk.enterprisecloud.domain.service.Protocol;
-import org.jclouds.tmrk.enterprisecloud.domain.service.internet.InternetService;
-import org.jclouds.tmrk.enterprisecloud.domain.service.internet.InternetServicePersistenceType;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import java.util.Properties;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * For use with {@see org.jclouds.tmrk.enterprisecloud.features.InternetServiceClient#editInternetService}
- * @author Jason King
- */
-@Singleton
-public class BindInternetServiceToXmlPayload implements Binder {
-
- private final BindToStringPayload stringBinder;
- private final String rootElement;
-
- @Inject
- BindInternetServiceToXmlPayload(BindToStringPayload stringBinder) {
- this(stringBinder,"InternetService");
- }
-
- protected BindInternetServiceToXmlPayload(BindToStringPayload stringBinder, String rootElement) {
- this.stringBinder = stringBinder;
- this.rootElement = rootElement;
- }
-
- @Override
- public R bindToRequest(R request, Object key) {
- checkArgument(checkNotNull(key, "key") instanceof InternetService, "this binder is only valid for InternetService instances");
- checkNotNull(request, "request");
- InternetService data = InternetService.class.cast(key);
-
- String payload = createXMLPayload(data);
- return stringBinder.bindToRequest(request, payload);
- }
-
- private String createXMLPayload(InternetService data) {
- try {
- Properties outputProperties = new Properties();
- outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
-
- final String name = checkNotNull(data.getName(), "name");
- final Protocol protocol = data.getProtocol();
- final int port = data.getPort();
- final String enabled = Boolean.toString(data.isEnabled());
- final String description = data.getDescription();
- final InternetServicePersistenceType persistence = data.getPersistence();
- final String redirectUrl = data.getRedirectUrl();
- final NamedResource trustedNetworkGroup = data.getTrustedNetworkGroup();
- final NamedResource backupInternetService = data.getBackupInternetService();
-
- XMLBuilder builder = XMLBuilder.create(rootElement).a("name", name);
-
- if(protocol!=null) {
- builder = builder.e("Protocol").t(protocol.value()).up();
- }
-
- if(port>0) {
- builder = builder.e("Port").t(Integer.toString(port)).up();
- }
-
- builder = builder.e("Enabled").t(enabled).up();
-
- if(description!=null) {
- builder = builder.e("Description").t(description).up();
- }
- //TODO: Public IP
- builder = persistence(builder,persistence);
-
- if(redirectUrl!=null) {
- builder = builder.e("RedirectUrl").t(redirectUrl);
- }
-
- //TODO: Monitor
-
- if(trustedNetworkGroup!=null) {
- final String href = trustedNetworkGroup.getHref().toString();
- String groupName = trustedNetworkGroup.getName();
- String type = trustedNetworkGroup.getType();
- builder = builder.e("TrustedNetworkGroup").a("href",href).a("name",groupName).a("type", type).up();
- }
-
- if(backupInternetService!=null) {
- final String href = backupInternetService.getHref().toString();
- String groupName = backupInternetService.getName();
- String type = backupInternetService.getType();
- builder = builder.e("BackupInternetService").a("href",href).a("name",groupName).a("type",type).up();
- }
-
- //TODO: NodeServices
-
- return builder.asString(outputProperties);
- } catch (ParserConfigurationException e) {
- throw new RuntimeException(e);
- } catch (TransformerException t) {
- throw new RuntimeException(t);
- }
- }
-
- private XMLBuilder persistence(XMLBuilder in, InternetServicePersistenceType persistenceType) {
- checkNotNull(persistenceType,"persistenceType");
-
- final InternetServicePersistenceType.PersistenceType type = persistenceType.getPersistenceType();
- final int timeout = persistenceType.getTimeout();
-
- in = in.e("Persistence").e("Type").t(type.value()).up();
- if(!type.equals(InternetServicePersistenceType.PersistenceType.NONE) && timeout > -1 ) {
- in = in.e("Timeout").t(Integer.toString(timeout)).up();
- }
- return in.up();
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindSSHKeyToXmlPayload.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindSSHKeyToXmlPayload.java
deleted file mode 100644
index 1720c1cad1..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindSSHKeyToXmlPayload.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import com.jamesmurty.utils.XMLBuilder;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.Binder;
-import org.jclouds.rest.binders.BindToStringPayload;
-import org.jclouds.tmrk.enterprisecloud.domain.keys.SSHKey;
-
-import javax.inject.Inject;
-import javax.inject.Singleton;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.TransformerException;
-import java.util.Properties;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Jason King
- */
-@Singleton
-public class BindSSHKeyToXmlPayload implements Binder {
-
- private final BindToStringPayload stringBinder;
-
- @Inject
- BindSSHKeyToXmlPayload(BindToStringPayload stringBinder) {
- this.stringBinder = stringBinder;
- }
-
- @Override
- public R bindToRequest(R request, Object key) {
- checkArgument(checkNotNull(key, "key") instanceof SSHKey, "this binder is only valid for SSHKey instances!");
- checkNotNull(request, "request");
- SSHKey sshKey = SSHKey.class.cast(key);
-
- String name = sshKey.getName();
- String isDefault = Boolean.toString(sshKey.isDefaultKey());
- String fingerPrint = sshKey.getFingerPrint();
-
- String payload = createXMLPayload(name,isDefault,fingerPrint);
- return stringBinder.bindToRequest(request, payload);
- }
-
- private String createXMLPayload(String name, String isDefault, String fingerPrint) {
- try {
- Properties outputProperties = new Properties();
- outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
- return XMLBuilder.create("SshKey").a("name",name)
- .e("Default").t(isDefault).up()
- .e("FingerPrint").t(fingerPrint)
- .asString(outputProperties);
- } catch (ParserConfigurationException e) {
- throw new RuntimeException(e);
- } catch (TransformerException t) {
- throw new RuntimeException(t);
- }
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindStartTimeQueryParam.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindStartTimeQueryParam.java
deleted file mode 100644
index 55e06f4c06..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/binders/BindStartTimeQueryParam.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.binders;
-
-import javax.inject.Inject;
-import javax.inject.Provider;
-import javax.inject.Singleton;
-import javax.ws.rs.core.UriBuilder;
-
-/**
- * @author Jason King
- */
-@Singleton
-public class BindStartTimeQueryParam extends BindDateToQueryParam {
-
- @Inject
- public BindStartTimeQueryParam(Provider uriBuilderProvider) {
- super(uriBuilderProvider,"starttime");
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/config/TerremarkEnterpriseCloudRestClientModule.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/config/TerremarkEnterpriseCloudRestClientModule.java
deleted file mode 100644
index 5cd1fc1307..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/config/TerremarkEnterpriseCloudRestClientModule.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.config;
-
-import com.google.common.collect.ImmutableMap;
-import org.jclouds.http.HttpErrorHandler;
-import org.jclouds.http.HttpRetryHandler;
-import org.jclouds.http.RequiresHttp;
-import org.jclouds.http.annotation.ClientError;
-import org.jclouds.http.annotation.Redirection;
-import org.jclouds.http.annotation.ServerError;
-import org.jclouds.http.handlers.BackoffLimitedRetryHandler;
-import org.jclouds.rest.ConfiguresRestClient;
-import org.jclouds.rest.config.RestClientModule;
-import org.jclouds.tmrk.enterprisecloud.TerremarkEnterpriseCloudAsyncClient;
-import org.jclouds.tmrk.enterprisecloud.TerremarkEnterpriseCloudClient;
-import org.jclouds.tmrk.enterprisecloud.features.*;
-import org.jclouds.tmrk.enterprisecloud.handlers.TerremarkEnterpriseCloudErrorHandler;
-
-import java.util.Map;
-
-/**
- * Configures the TerremarkEnterpriseCloud connection.
- *
- * @author Adrian Cole
- */
-@RequiresHttp
-@ConfiguresRestClient
-public class TerremarkEnterpriseCloudRestClientModule extends
- RestClientModule {
-
- public static final Map, Class>> DELEGATE_MAP = ImmutableMap., Class>> builder()
- .put(InternetServiceClient.class, InternetServiceAsyncClient.class)
- .put(LayoutClient.class, LayoutAsyncClient.class)
- .put(LocationClient.class, LocationAsyncClient.class)
- .put(NetworkClient.class, NetworkAsyncClient.class)
- .put(ResourceClient.class, ResourceAsyncClient.class)
- .put(TaskClient.class, TaskAsyncClient.class)
- .put(SSHKeyClient.class, SSHKeyAsyncClient.class)
- .put(VirtualMachineClient.class, VirtualMachineAsyncClient.class)
- .put(TemplateClient.class, TemplateAsyncClient.class)
- .build();
-
- public TerremarkEnterpriseCloudRestClientModule() {
- super(TerremarkEnterpriseCloudClient.class, TerremarkEnterpriseCloudAsyncClient.class, DELEGATE_MAP);
- }
-
- @Override
- protected void configure() {
- super.configure();
- }
-
- @Override
- protected void bindErrorHandlers() {
- bind(HttpErrorHandler.class).annotatedWith(Redirection.class).to(TerremarkEnterpriseCloudErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ClientError.class).to(TerremarkEnterpriseCloudErrorHandler.class);
- bind(HttpErrorHandler.class).annotatedWith(ServerError.class).to(TerremarkEnterpriseCloudErrorHandler.class);
- }
-
- @Override
- protected void bindRetryHandlers() {
- bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(BackoffLimitedRetryHandler.class);
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Action.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Action.java
deleted file mode 100644
index 0e7defe390..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Action.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import java.net.URI;
-import java.util.Map;
-
-import static com.google.common.base.CaseFormat.LOWER_CAMEL;
-import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class Action extends BaseNamedResource {
- @XmlEnum
- public static enum ActionDisabled {
- /**
- * The actionDisabled attribute will have a value of noAccess when a user
- * does not have permission to perform the action. For example, for a user
- * with read-only access, all actions have actionDisabled="noAccess" set.
- */
- @XmlEnumValue("noAccess")
- NO_ACCESS,
- /**
- * The attribute will have a value of disabled when the action is contrary
- * to business rules. For example, the action virtual machine with
- * name="power:powerOff" has actionDisabled="disabled" when the virtual
- * machine is currently powered off; a virtual machine, which is currently
- * off, may not be powered off; it may only be powered on. If both
- * conditions apply, actions have actionDisabled="noAccess" set. If
- * neither condition applies, the attribute will not appear.
- */
- @XmlEnumValue("disabled")
- DISABLED,
- /**
- * ActionDisabled was not parsed by jclouds.
- */
- UNRECOGNIZED;
-
- public String value() {
- return UPPER_UNDERSCORE.to(LOWER_CAMEL, name());
- }
-
- @Override
- public String toString() {
- return value();
- }
-
- public static ActionDisabled fromValue(String actionDisabled) {
- try {
- return valueOf(LOWER_CAMEL.to(UPPER_UNDERSCORE, checkNotNull(actionDisabled, "actionDisabled")));
- } catch (IllegalArgumentException e) {
- return UNRECOGNIZED;
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromAction(this);
- }
-
- public static class Builder extends BaseNamedResource.Builder {
-
- protected ActionDisabled actionDisabled;
-
- /**
- * @see Action#getActionDisabled
- */
- public Builder actionDisabled(ActionDisabled actionDisabled) {
- this.actionDisabled = actionDisabled;
- return this;
- }
-
- @Override
- public Action build() {
- return new Action(href, type, name, actionDisabled);
- }
-
- public Builder fromAction(Action in) {
- return fromNamedResource(in).actionDisabled(in.getActionDisabled());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromNamedResource(BaseNamedResource in) {
- return Builder.class.cast(super.fromNamedResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- super.fromAttributes(attributes);
- if (attributes.containsKey("actionDisabled"))
- actionDisabled(ActionDisabled.fromValue(attributes.get("actionDisabled")));
- return this;
- }
-
- }
-
- @XmlAttribute
- protected ActionDisabled actionDisabled;
-
- private Action(URI href, String type, String name, @Nullable ActionDisabled actionDisabled) {
- super(href, type, name);
- this.actionDisabled = actionDisabled;
- }
-
- private Action() {
- //For JAXB
- }
-
- /**
- * The attribute actionDisabled appears only when the example has an action
- * disabled for business rules.
- *
- * @return
- */
- @Nullable
- public ActionDisabled getActionDisabled() {
- return actionDisabled;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- Action action = (Action) o;
-
- if (actionDisabled != action.actionDisabled) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + (actionDisabled != null ? actionDisabled.hashCode() : 0);
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", actionDisabled="+actionDisabled;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java
deleted file mode 100644
index 64ae9c5125..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Actions.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import com.google.common.collect.Sets;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.util.Collections;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Wraps individual Action elements.
- * Needed because parsing is done with JAXB and it does not handle Generic collections
- * @author Jason King
- */
-public class Actions {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromActions(this);
- }
-
- public static class Builder {
-
- private Set actions = Sets.newLinkedHashSet();
-
- /**
- * @see Actions#getActions
- */
- public Builder actions(Set actions) {
- this.actions = Sets.newLinkedHashSet(checkNotNull(actions, "actions"));
- return this;
- }
-
- public Builder addAction(Action action) {
- actions.add(checkNotNull(action,"action"));
- return this;
- }
-
- public Actions build() {
- return new Actions(actions);
- }
-
- public Builder fromActions(Actions in) {
- return actions(in.getActions());
- }
- }
-
- private Actions() {
- //For JAXB and builder use
- }
-
- private Actions(Set actions) {
- this.actions = Sets.newLinkedHashSet(actions);
- }
-
- @XmlElement(name = "Action")
- private Set actions = Sets.newLinkedHashSet();
-
- public Set getActions() {
- return Collections.unmodifiableSet(actions);
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Actions actions1 = (Actions) o;
-
- if (!actions.equals(actions1.actions)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return actions.hashCode();
- }
-
- public String toString() {
- return "["+ actions.toString()+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/ConfigurationOptionRange.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/ConfigurationOptionRange.java
deleted file mode 100644
index 8f21f44b8d..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/ConfigurationOptionRange.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- *
- * @author Jason King
- */
-public class ConfigurationOptionRange {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromConfigurationOptionRange(this);
- }
-
- public static class Builder {
-
- private int minimum;
- private int maximum;
- private int stepFactor;
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.ConfigurationOptionRange#getMinimum
- */
- public Builder minimum(int minimum) {
- this.minimum = minimum;
- return this;
- }
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.ConfigurationOptionRange#getMaximum
- */
- public Builder maximum(int maximum) {
- this.maximum = maximum;
- return this;
- }
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.ConfigurationOptionRange#getStepFactor
- */
- public Builder stepFactor(int stepFactor) {
- this.stepFactor = stepFactor;
- return this;
- }
-
- public ConfigurationOptionRange build() {
- return new ConfigurationOptionRange(minimum, maximum,stepFactor);
- }
-
- public Builder fromConfigurationOptionRange(ConfigurationOptionRange in) {
- return minimum(in.getMinimum()).maximum(in.getMaximum()).stepFactor(in.getStepFactor());
- }
- }
-
- @XmlElement(name = "Minimum")
- private int minimum;
-
- @XmlElement(name = "Maximum")
- private int maximum;
-
- @XmlElement(name = "StepFactor")
- private int stepFactor;
-
- private ConfigurationOptionRange(int minimum, int maximum, int stepFactor) {
- this.minimum = minimum;
- this.maximum = maximum;
- this.stepFactor = stepFactor;
- }
-
- private ConfigurationOptionRange() {
- //For JAXB
- }
-
- public int getMinimum() {
- return minimum;
- }
-
- public int getMaximum() {
- return maximum;
- }
-
- public int getStepFactor() {
- return stepFactor;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- ConfigurationOptionRange that = (ConfigurationOptionRange) o;
-
- if (maximum != that.maximum) return false;
- if (minimum != that.minimum) return false;
- if (stepFactor != that.stepFactor) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = minimum;
- result = 31 * result + maximum;
- result = 31 * result + stepFactor;
- return result;
- }
-
- @Override
- public String toString() {
- return "[minimum="+ minimum +", maximum="+ maximum +", stepFactor="+stepFactor+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/CustomizationOption.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/CustomizationOption.java
deleted file mode 100644
index 2077cf8cdb..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/CustomizationOption.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Jason King
- */
-public class CustomizationOption {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromConfigurationOptionRange(this);
- }
-
- public static class Builder {
-
- private CustomizationType type;
- private boolean canPowerOn;
- private boolean passwordRequired;
- private boolean sshKeyRequired;
-
- /**
- * @see CustomizationOption#getType
- */
- public Builder type(CustomizationType type) {
- this.type = type;
- return this;
- }
-
- /**
- * @see CustomizationOption#canPowerOn
- */
- public Builder canPowerOn(boolean canPowerOn) {
- this.canPowerOn = canPowerOn;
- return this;
- }
-
- /**
- * @see CustomizationOption#isPasswordRequired()
- */
- public Builder passwordRequired(boolean passwordRequired) {
- this.passwordRequired = passwordRequired;
- return this;
- }
-
- /**
- * @see CustomizationOption#isSshKeyRequired()
- */
- public Builder sshKeyRequired(boolean sshKeyRequired) {
- this.sshKeyRequired = sshKeyRequired;
- return this;
- }
-
- public CustomizationOption build() {
- return new CustomizationOption(type, canPowerOn, passwordRequired,sshKeyRequired);
- }
-
- public Builder fromConfigurationOptionRange(CustomizationOption in) {
- return type(in.getType()).canPowerOn(in.canPowerOn()).passwordRequired(in.isPasswordRequired()).sshKeyRequired(in.isSshKeyRequired());
- }
- }
-
- @XmlElement(name = "Type")
- private CustomizationType type;
-
- @XmlElement(name = "CanPowerOn")
- private boolean canPowerOn;
-
- @XmlElement(name = "PasswordRequired")
- private boolean passwordRequired;
-
- @XmlElement(name = "SshKeyRequired")
- private boolean sshKeyRequired;
-
- private CustomizationOption(CustomizationType type, boolean canPowerOn, boolean passwordRequired, boolean sshKeyRequired) {
- this.type = checkNotNull(type,"type");
- this.canPowerOn = canPowerOn;
- this.passwordRequired = passwordRequired;
- this.sshKeyRequired = sshKeyRequired;
- }
-
- private CustomizationOption() {
- //For JAXB
- }
-
- public CustomizationType getType() {
- return type;
- }
-
- public boolean canPowerOn() {
- return canPowerOn;
- }
-
- public boolean isPasswordRequired() {
- return passwordRequired;
- }
-
- public boolean isSshKeyRequired() {
- return sshKeyRequired;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- CustomizationOption that = (CustomizationOption) o;
-
- if (canPowerOn != that.canPowerOn) return false;
- if (passwordRequired != that.passwordRequired) return false;
- if (sshKeyRequired != that.sshKeyRequired) return false;
- if (type != that.type) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = type.hashCode();
- result = 31 * result + (canPowerOn ? 1 : 0);
- result = 31 * result + (passwordRequired ? 1 : 0);
- result = 31 * result + (sshKeyRequired ? 1 : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return "[type="+type+", canPowerOn="+ canPowerOn +", passwordRequired="+ passwordRequired +", sshKeyRequired="+sshKeyRequired+"]";
- }
-
- @XmlEnum
- public enum CustomizationType {
- @XmlEnumValue("Linux")
- LINUX,
-
- @XmlEnumValue("Windows")
- WINDOWS;
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Link.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Link.java
deleted file mode 100644
index f9a47b4037..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Link.java
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import com.google.common.collect.Sets;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class Link extends BaseNamedResource {
- @XmlEnum
- public static enum Relationship {
- /**
- * The entity in the link owns the entity in the response
- */
- @XmlEnumValue("up")
- UP,
- /**
- * The entity in the response owns the entity in the link
- */
- @XmlEnumValue("down")
- DOWN,
- /**
- * The entity in the link is an alternate view of the entity in the
- * response
- */
- @XmlEnumValue("alternate")
- ALTERNATE,
- /**
- * The link is a path to the first page in the pages of responses
- */
- @XmlEnumValue("first")
- FIRST,
- /**
- * The link is a path to the previous page in the pages of responses
- */
- @XmlEnumValue("previous")
- PREVIOUS,
- /**
- * The link is a path to the next page in the pages of responses
- */
- @XmlEnumValue("next")
- NEXT,
- /**
- * The link is a path to the last page in the pages of responses
- */
- @XmlEnumValue("last")
- LAST,
- /**
- * Relationship was not parsed by jclouds.
- */
- UNRECOGNIZED;
-
- public String value() {
- return name().toLowerCase();
- }
-
- @Override
- public String toString() {
- return value();
- }
-
- public static Relationship fromValue(String rel) {
- try {
- return valueOf(checkNotNull(rel, "rel").toUpperCase());
- } catch (IllegalArgumentException e) {
- return UNRECOGNIZED;
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromLink(this);
- }
-
- public static class Builder extends BaseNamedResource.Builder {
-
- protected Relationship rel;
-
- /**
- * @see Link#getRelationship
- */
- public Builder rel(Relationship rel) {
- this.rel = rel;
- return this;
- }
-
- @Override
- public Link build() {
- return new Link(href, type, name, rel);
- }
-
- public Builder fromLink(Link in) {
- return fromNamedResource(in).rel(in.getRelationship());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromNamedResource(BaseNamedResource in) {
- return Builder.class.cast(super.fromNamedResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- super.fromAttributes(attributes);
- if (attributes.containsKey("rel"))
- rel(Relationship.fromValue(attributes.get("rel")));
- return this;
- }
- }
-
- @XmlAttribute
- protected Relationship rel;
-
- private Link(URI href, String type, String name, Relationship rel) {
- super(href, type, name);
- this.rel = checkNotNull(rel, "rel");
- }
-
- private Link() {
- //For JAXB
- }
-
- /**
- *
- * @return
- */
- public Relationship getRelationship() {
- return rel;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- Link link = (Link) o;
-
- if (rel != link.rel) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + rel.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", rel="+rel;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Links.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Links.java
deleted file mode 100644
index f3b41f82b3..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Links.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import com.google.common.collect.Sets;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Wraps individual Link elements.
- * Needed because parsing is done with JAXB and it does not handle Generic collections
- * @author Jason King
- */
-public class Links {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromLinks(this);
- }
-
- public static class Builder {
-
- private Set links = Sets.newLinkedHashSet();
-
- /**
- * @see Links#getLinks
- */
- public Builder links(Set links) {
- this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
- return this;
- }
-
- public Builder addLink(Link link) {
- links.add(checkNotNull(link,"link"));
- return this;
- }
-
- public Links build() {
- return new Links(links);
- }
-
- public Builder fromLinks(Links in) {
- return links(in.getLinks());
- }
- }
-
- @XmlElement(name = "Link")
- private LinkedHashSet links = Sets.newLinkedHashSet();
-
- private Links() {
- //For JAXB
- }
-
- private Links(Set links) {
- this.links = Sets.newLinkedHashSet(links);
- }
-
- public Set getLinks() {
- return Collections.unmodifiableSet(links);
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Links links1 = (Links) o;
-
- if (!links.equals(links1.links)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return links.hashCode();
- }
-
- public String toString() {
- return "["+ links.toString()+"]";
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Location.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Location.java
deleted file mode 100644
index efd74602eb..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Location.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-/**
- *
- * @author Jason King
- *
- */
-@XmlRootElement(name = "Location")
-public class Location extends Resource {
-
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromLocation(this);
- }
-
- public static class Builder extends Resource.Builder {
- private String friendlyName;
- private String locode;
- private String iso3166;
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.Location#getFriendlyName
- */
- public Builder friendlyName(String friendlyName) {
- this.friendlyName = friendlyName;
- return this;
- }
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.Location#getLocode
- */
- public Builder locode(String locode) {
- this.locode = locode;
- return this;
- }
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.Location#getIso3166
- */
- public Builder iso3166(String iso3166) {
- this.iso3166 = iso3166;
- return this;
- }
-
- @Override
- public Location build() {
- return new Location(href, type, name, links,
- actions, friendlyName, locode, iso3166);
- }
-
- public Builder fromLocation(Location in) {
- return fromResource(in).friendlyName(in.getFriendlyName()).locode(in.getLocode()).iso3166(in.getIso3166());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- }
-
- @XmlElement(name = "FriendlyName", required = true)
- private String friendlyName;
-
- @XmlElement(name = "Locode", required = false)
- private String locode;
-
- @XmlElement(name = "ISO3166", required = false)
- private String iso3166;
-
- private Location(URI href, String type, String name, Set links, Set actions, @Nullable String friendlyName, @Nullable String locode, @Nullable String iso3166) {
- super(href, type, name, links, actions);
- this.friendlyName = friendlyName;
- this.locode = locode;
- this.iso3166 = iso3166;
- }
-
- private Location() {
- //For JAXB
- }
-
- public String getFriendlyName() {
- return friendlyName;
- }
-
- public String getLocode() {
- return locode;
- }
-
- public String getIso3166() {
- return iso3166;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- Location location = (Location) o;
-
- if (friendlyName != null ? !friendlyName.equals(location.friendlyName) : location.friendlyName != null)
- return false;
- if (iso3166 != null ? !iso3166.equals(location.iso3166) : location.iso3166 != null)
- return false;
- if (locode != null ? !locode.equals(location.locode) : location.locode != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + (friendlyName != null ? friendlyName.hashCode() : 0);
- result = 31 * result + (locode != null ? locode.hashCode() : 0);
- result = 31 * result + (iso3166 != null ? iso3166.hashCode() : 0);
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", friendlyName="+friendlyName+", locode="+locode+", iso3166="+iso3166;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/NamedResource.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/NamedResource.java
deleted file mode 100644
index 1365f5fb67..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/NamedResource.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseNamedResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-public class NamedResource extends BaseNamedResource {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromNamedResource(this);
- }
-
- public static class Builder extends BaseNamedResource.Builder {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public NamedResource build() {
- return new NamedResource(href, type, name);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromNamedResource(BaseNamedResource in) {
- return Builder.class.cast(super.fromNamedResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map in) {
- return Builder.class.cast(super.fromAttributes(in));
- }
-
- }
-
- private NamedResource(URI href, String type, String name) {
- super(href, type, name);
- }
-
- protected NamedResource() {
- //For JAXB
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/ResourceCapacityRange.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/ResourceCapacityRange.java
deleted file mode 100644
index 1515cd8426..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/ResourceCapacityRange.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- *
- * @author Jason King
- */
-public class ResourceCapacityRange {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromResourceCapacityRange(this);
- }
-
- public static class Builder {
-
- private ResourceCapacity minimumSize;
- private ResourceCapacity maximumSize;
- private ResourceCapacity stepFactor;
-
- /**
- * @see ResourceCapacityRange#getMinimumSize
- */
- public Builder minimumSize(ResourceCapacity minimumSize) {
- this.minimumSize = minimumSize;
- return this;
- }
-
- /**
- * @see ResourceCapacityRange#getMaximumSize
- */
- public Builder maximumSize(ResourceCapacity maximumSize) {
- this.maximumSize = maximumSize;
- return this;
- }
-
- /**
- * @see ResourceCapacityRange#getStepFactor
- */
- public Builder stepFactor(ResourceCapacity stepFactor) {
- this.stepFactor = stepFactor;
- return this;
- }
-
- public ResourceCapacityRange build() {
- return new ResourceCapacityRange(minimumSize,maximumSize,stepFactor);
- }
-
- public Builder fromResourceCapacityRange(ResourceCapacityRange in) {
- return minimumSize(in.getMinimumSize()).maximumSize(in.getMaximumSize()).stepFactor(in.getStepFactor());
- }
- }
-
- @XmlElement(name = "MinimumSize", required = false)
- private ResourceCapacity minimumSize;
-
- @XmlElement(name = "MaximumSize", required = false)
- private ResourceCapacity maximumSize;
-
- @XmlElement(name = "StepFactor", required = false)
- private ResourceCapacity stepFactor;
-
- private ResourceCapacityRange(@Nullable ResourceCapacity minimumSize, @Nullable ResourceCapacity maximumSize, @Nullable ResourceCapacity stepFactor) {
- this.minimumSize = minimumSize;
- this.maximumSize = maximumSize;
- this.stepFactor = stepFactor;
- }
-
- private ResourceCapacityRange() {
- //For JAXB
- }
-
- public ResourceCapacity getMinimumSize() {
- return minimumSize;
- }
-
- public ResourceCapacity getMaximumSize() {
- return maximumSize;
- }
-
- public ResourceCapacity getStepFactor() {
- return stepFactor;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- ResourceCapacityRange that = (ResourceCapacityRange) o;
-
- if (maximumSize != null ? !maximumSize.equals(that.maximumSize) : that.maximumSize != null)
- return false;
- if (minimumSize != null ? !minimumSize.equals(that.minimumSize) : that.minimumSize != null)
- return false;
- if (stepFactor != null ? !stepFactor.equals(that.stepFactor) : that.stepFactor != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = minimumSize != null ? minimumSize.hashCode() : 0;
- result = 31 * result + (maximumSize != null ? maximumSize.hashCode() : 0);
- result = 31 * result + (stepFactor != null ? stepFactor.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return "[minimumSize="+ minimumSize +", maximumSize="+maximumSize+", stepFactor="+stepFactor+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Task.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Task.java
deleted file mode 100644
index 3cced5ef2f..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Task.java
+++ /dev/null
@@ -1,416 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlEnum;
-import javax.xml.bind.annotation.XmlEnumValue;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-import java.util.Date;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.CaseFormat.UPPER_CAMEL;
-import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Adrian Cole
- *
- */
-@XmlRootElement(name = "Task")
-public class Task extends Resource {
- @XmlEnum
- public static enum Status {
- /**
- * the task is queued for execution.
- */
- @XmlEnumValue("Queued")
- QUEUED,
- /**
- * the task is running.
- */
- @XmlEnumValue("Running")
- RUNNING,
- /**
- * the task failed.
- */
- @XmlEnumValue("Failed")
- FAILED,
- /**
- * the task completed successfully.
- */
- @XmlEnumValue("Success")
- SUCCESS,
- /**
- * the task completed successfully.
- */
- @XmlEnumValue("Complete")
- COMPLETE,
- /**
- * the task failed with an error.
- */
- @XmlEnumValue("Error")
- ERROR,
- /**
- * Status was not parsed by jclouds.
- */
- UNRECOGNIZED;
-
- public String value() {
- return UPPER_UNDERSCORE.to(UPPER_CAMEL, name());
- }
-
- @Override
- public String toString() {
- return value();
- }
-
- public static Status fromValue(String status) {
- try {
- return valueOf(UPPER_CAMEL.to(UPPER_UNDERSCORE, checkNotNull(status, "status")));
- } catch (IllegalArgumentException e) {
- return UNRECOGNIZED;
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromTask(this);
- }
-
- public static class Builder extends Resource.Builder {
- //TODO There are additional fields
- protected String operation;
- protected Status status;
- protected NamedResource impactedItem;
- protected Date startTime;
- protected Date completedTime;
- protected String notes;
- protected String errorMessage;
- protected NamedResource initiatedBy;
-
- /**
- * @see Task#getOperation
- */
- public Builder operation(String operation) {
- this.operation = operation;
- return this;
- }
-
- /**
- * @see Task#getStatus
- */
- public Builder status(Status status) {
- this.status = status;
- return this;
- }
-
- /**
- * @see Task#getImpactedItem
- */
- public Builder impactedItem(NamedResource impactedItem) {
- this.impactedItem = impactedItem;
- return this;
- }
-
- /**
- * @see Task#getStartTime
- */
- public Builder startTime(Date startTime) {
- this.startTime = startTime;
- return this;
- }
-
- /**
- * @see Task#getCompletedTime
- */
- public Builder completedTime(Date completedTime) {
- this.completedTime = completedTime;
- return this;
- }
-
- /**
- * @see Task#getNotes
- */
- public Builder notes(String notes) {
- this.notes = notes;
- return this;
- }
-
- /**
- * @see Task#getErrorMessage
- */
- public Builder errorMessage(String errorMessage) {
- this.errorMessage = errorMessage;
- return this;
- }
-
- /**
- * @see Task#getInitiatedBy
- */
- public Builder initiatedBy(NamedResource initiatedBy) {
- this.initiatedBy = initiatedBy;
- return this;
- }
-
- @Override
- public Task build() {
- return new Task(href, type, name, links,
- actions, operation, status, impactedItem, startTime, completedTime, notes, errorMessage, initiatedBy);
- }
-
- public Builder fromTask(Task in) {
- return fromResource(in).operation(in.getOperation()).status(in.getStatus()).impactedItem(in.getImpactedItem())
- .startTime(in.getStartTime()).completedTime(in.getCompletedTime()).notes(in.getNotes())
- .errorMessage(in.getErrorMessage()).initiatedBy(in.getInitiatedBy());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- }
-
- @XmlElement(name = "Operation", required = true)
- protected String operation;
-
- @XmlElement(name = "Status", required = true)
- protected Status status;
-
- @XmlElement(name = "ImpactedItem", required = true)
- protected NamedResource impactedItem;
-
- @XmlElement(name = "StartTime", required = true)
- protected Date startTime;
-
- @XmlElement(name = "CompletedTime", required = false)
- protected Date completedTime;
-
- @XmlElement(name = "Notes", required = false)
- protected String notes;
-
- @XmlElement(name = "ErrorMessage", required = false)
- protected String errorMessage;
-
- @XmlElement(name = "InitiatedBy", required = true)
- protected NamedResource initiatedBy;
-
- private Task(URI href, String type, String name, Set links, Set actions, String operation, Status status, NamedResource impactedItem, Date startTime,
- @Nullable Date completedTime, @Nullable String notes, @Nullable String errorMessage, NamedResource initiatedBy) {
- super(href, type, name, links, actions);
- this.operation = checkNotNull(operation, "operation");
- this.status = checkNotNull(status, "status");
- this.impactedItem = checkNotNull(impactedItem, "impactedItem");
- this.startTime = checkNotNull(startTime, "startTime");
- this.completedTime = completedTime;// null if Queued or Running
- this.notes = notes;
- this.errorMessage = errorMessage;
- this.initiatedBy = checkNotNull(initiatedBy, "initiatedBy");
- }
-
- private Task() {
- //For JAXB
- }
-
- /**
- *
- *
- * @return name of action performed
- */
- public String getOperation() {
- return operation;
- }
-
- /**
- *
- *
- * @return the status of the task
- */
- public Status getStatus() {
- return status;
- }
-
- /**
- *
- * @return the item acted upon
- */
- public NamedResource getImpactedItem() {
- return impactedItem;
- }
-
- /**
- *
- * @return time action started
- */
- public Date getStartTime() {
- return startTime;
- }
-
- /**
- *
- * @return time action completed, or null if Queued or Running
- */
- @Nullable
- public Date getCompletedTime() {
- return completedTime;
- }
-
- /**
- * @return notes on action
- */
- public String getNotes() {
- return notes;
- }
-
- /**
- * @return error message
- */
- public String getErrorMessage() {
- return errorMessage;
- }
-
- /**
- *
- * @return the item acted upon
- */
- public NamedResource getInitiatedBy() {
- return initiatedBy;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- Task task = (Task) o;
-
- if (completedTime != null ? !completedTime.equals(task.completedTime) : task.completedTime != null)
- return false;
- if (errorMessage != null ? !errorMessage.equals(task.errorMessage) : task.errorMessage != null)
- return false;
- if (!impactedItem.equals(task.impactedItem)) return false;
- if (!initiatedBy.equals(task.initiatedBy)) return false;
- if (notes != null ? !notes.equals(task.notes) : task.notes != null)
- return false;
- if (!operation.equals(task.operation)) return false;
- if (!startTime.equals(task.startTime)) return false;
- if (status != task.status) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + operation.hashCode();
- result = 31 * result + status.hashCode();
- result = 31 * result + impactedItem.hashCode();
- result = 31 * result + startTime.hashCode();
- result = 31 * result + (completedTime != null ? completedTime.hashCode() : 0);
- result = 31 * result + (notes != null ? notes.hashCode() : 0);
- result = 31 * result + (errorMessage != null ? errorMessage.hashCode() : 0);
- result = 31 * result + initiatedBy.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", operation="+operation+", status="+status+
- ", impactedItem="+impactedItem+", startTime="+startTime+", completedTime="+completedTime+
- ", notes="+notes+", errorMessage="+errorMessage+", initiatedBy="+initiatedBy;
- }
-
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Tasks.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Tasks.java
deleted file mode 100644
index f3d5224fe6..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/Tasks.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain;
-
-import com.google.common.collect.Sets;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Wraps individual Task elements.
- * Needed because parsing is done with JAXB and it does not handle Generic collections
- *
- * @author Jason King
- */
-@XmlRootElement(name = "Tasks")
-public class Tasks {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromTasks(this);
- }
-
- public static class Builder {
-
- private Set tasks = Sets.newLinkedHashSet();
-
- /**
- * @see Tasks#getTasks
- */
- public Builder tasks(Set tasks) {
- this.tasks = Sets.newLinkedHashSet(checkNotNull(tasks, "tasks"));
- return this;
- }
-
- public Builder addTask(Task task) {
- tasks.add(checkNotNull(task,"task"));
- return this;
- }
-
- public Tasks build() {
- return new Tasks(tasks);
- }
-
- public Builder fromTasks(Tasks in) {
- return tasks(in.getTasks());
- }
- }
-
- private Tasks() {
- //For JAXB and builder use
- }
-
- private Tasks(Set tasks) {
- this.tasks = Sets.newLinkedHashSet(tasks);
- }
-
- //TODO: There is a total count field
-
- @XmlElement(name = "Task")
- private LinkedHashSet tasks = Sets.newLinkedHashSet();
-
- public Set getTasks() {
- return Collections.unmodifiableSet(tasks);
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Tasks tasks1 = (Tasks) o;
-
- if (!tasks.equals(tasks1.tasks)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return tasks.hashCode();
- }
-
- public String toString() {
- return "["+tasks.toString()+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/DiskConfigurationOption.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/DiskConfigurationOption.java
deleted file mode 100644
index 365df574ca..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/DiskConfigurationOption.java
+++ /dev/null
@@ -1,156 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.hardware;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- *
- * @author Jason King
- */
-public class DiskConfigurationOption {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromConfigurationOptionRange(this);
- }
-
- public static class Builder {
-
- private int minimum;
- private int maximum;
- private DiskConfigurationOptionRange systemDisk;
- private DiskConfigurationOptionRange dataDisk;
-
- /**
- * @see DiskConfigurationOption#getMinimum()
- */
- public Builder minimum(int minimum) {
- this.minimum = minimum;
- return this;
- }
-
- /**
- * @see DiskConfigurationOption#getMaximum()
- */
- public Builder maximum(int maximum) {
- this.maximum = maximum;
- return this;
- }
-
- /**
- * @see DiskConfigurationOption#getSystemDisk()
- */
- public Builder systemDisk(DiskConfigurationOptionRange systemDisk) {
- this.systemDisk = systemDisk;
- return this;
- }
-
- /**
- * @see DiskConfigurationOption#getDataDisk()
- */
- public Builder dataDisk(DiskConfigurationOptionRange dataDisk) {
- this.dataDisk = dataDisk;
- return this;
- }
-
- public DiskConfigurationOption build() {
- return new DiskConfigurationOption(minimum, maximum, systemDisk, dataDisk);
- }
-
- public Builder fromConfigurationOptionRange(DiskConfigurationOption in) {
- return minimum(in.getMinimum()).maximum(in.getMaximum()).systemDisk(in.getSystemDisk()).dataDisk(in.getDataDisk());
- }
- }
-
- @XmlElement(name = "Minimum")
- private int minimum;
-
- @XmlElement(name = "Maximum")
- private int maximum;
-
- @XmlElement(name = "SystemDisk")
- private DiskConfigurationOptionRange systemDisk;
-
- @XmlElement(name = "DataDisk")
- private DiskConfigurationOptionRange dataDisk;
-
- private DiskConfigurationOption(int minimum, int maximum, DiskConfigurationOptionRange systemDisk, DiskConfigurationOptionRange dataDisk) {
- this.minimum = minimum;
- this.maximum = maximum;
- this.systemDisk = systemDisk;
- this.dataDisk = dataDisk;
- }
-
- private DiskConfigurationOption() {
- //For JAXB
- }
-
- public int getMinimum() {
- return minimum;
- }
-
- public int getMaximum() {
- return maximum;
- }
-
- public DiskConfigurationOptionRange getSystemDisk() {
- return systemDisk;
- }
-
- public DiskConfigurationOptionRange getDataDisk() {
- return dataDisk;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- DiskConfigurationOption that = (DiskConfigurationOption) o;
-
- if (maximum != that.maximum) return false;
- if (minimum != that.minimum) return false;
- if (dataDisk != null ? !dataDisk.equals(that.dataDisk) : that.dataDisk != null)
- return false;
- if (systemDisk != null ? !systemDisk.equals(that.systemDisk) : that.systemDisk != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = minimum;
- result = 31 * result + maximum;
- result = 31 * result + (systemDisk != null ? systemDisk.hashCode() : 0);
- result = 31 * result + (dataDisk != null ? dataDisk.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return "[minimum="+minimum+", maximum="+ maximum +", systemDisk="+ systemDisk +", dataDisk="+dataDisk+"]";
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/DiskConfigurationOptionRange.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/DiskConfigurationOptionRange.java
deleted file mode 100644
index 4bfa1f5a63..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/DiskConfigurationOptionRange.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.hardware;
-
-import org.jclouds.tmrk.enterprisecloud.domain.ResourceCapacityRange;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- *
- * @author Jason King
- */
-public class DiskConfigurationOptionRange {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromConfigurationOptionRange(this);
- }
-
- public static class Builder {
-
- private ResourceCapacityRange resourceCapacityRange;
- private double monthlyCost;
-
- /**
- * @see DiskConfigurationOptionRange#getResourceCapacityRange
- */
- public Builder resourceCapacityRange(ResourceCapacityRange resourceCapacityRange) {
- this.resourceCapacityRange = resourceCapacityRange;
- return this;
- }
-
- /**
- * @see DiskConfigurationOptionRange#getMonthlyCost()
- */
- public Builder monthlyCost(double monthlyCost) {
- this.monthlyCost = monthlyCost;
- return this;
- }
-
-
- public DiskConfigurationOptionRange build() {
- return new DiskConfigurationOptionRange(resourceCapacityRange, monthlyCost);
- }
-
- public Builder fromConfigurationOptionRange(DiskConfigurationOptionRange in) {
- return resourceCapacityRange(in.getResourceCapacityRange()).monthlyCost(in.getMonthlyCost());
- }
- }
-
- @XmlElement(name = "ResourceCapacityRange")
- private ResourceCapacityRange resourceCapacityRange;
-
- @XmlElement(name = "MonthlyCost")
- private double monthlyCost;
-
- private DiskConfigurationOptionRange(ResourceCapacityRange resourceCapacityRange, double monthlyCost) {
- this.resourceCapacityRange = resourceCapacityRange;
- this.monthlyCost = monthlyCost;
- }
-
- private DiskConfigurationOptionRange() {
- //For JAXB
- }
-
- public ResourceCapacityRange getResourceCapacityRange() {
- return resourceCapacityRange;
- }
-
- public double getMonthlyCost() {
- return monthlyCost;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- DiskConfigurationOptionRange that = (DiskConfigurationOptionRange) o;
-
- if (Double.compare(that.monthlyCost, monthlyCost) != 0) return false;
- if (resourceCapacityRange != null ? !resourceCapacityRange.equals(that.resourceCapacityRange) : that.resourceCapacityRange != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result;
- long temp;
- result = resourceCapacityRange != null ? resourceCapacityRange.hashCode() : 0;
- temp = monthlyCost != +0.0d ? Double.doubleToLongBits(monthlyCost) : 0L;
- result = 31 * result + (int) (temp ^ (temp >>> 32));
- return result;
- }
-
- @Override
- public String toString() {
- return "[resourceCapacityRange="+resourceCapacityRange+", monthlyCost="+monthlyCost+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/Disks.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/Disks.java
deleted file mode 100644
index 5e5f805ac9..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/Disks.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.hardware;
-
-import com.google.common.collect.Sets;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Wraps individual Disk elements.
- * Needed because parsing is done with JAXB and it does not handle Generic collections
- *
- * @author Jason King
- */
-public class Disks {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromDisks(this);
- }
-
- public static class Builder {
-
- private Set disks = Sets.newLinkedHashSet();
-
- /**
- * @see Disks#getVirtualDisks()
- */
- public Builder disks(Set disks) {
- this.disks = Sets.newLinkedHashSet(checkNotNull(disks, "disks"));
- return this;
- }
-
- public Builder addDisk(VirtualDisk disk) {
- disks.add(checkNotNull(disk,"disk"));
- return this;
- }
-
- public Disks build() {
- return new Disks(disks);
- }
-
- public Builder fromDisks(Disks in) {
- return disks(in.getVirtualDisks());
- }
- }
-
- @XmlElement(name = "Disk")
- private LinkedHashSet disks = Sets.newLinkedHashSet();
-
- private Disks() {
- //For JAXB and builder use
- }
-
- private Disks(Set disks) {
- this.disks = Sets.newLinkedHashSet(disks);
- }
-
- public Set getVirtualDisks() {
- return Collections.unmodifiableSet(disks);
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Disks disks1 = (Disks) o;
-
- if (!disks.equals(disks1.disks)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return disks.hashCode();
- }
-
- public String toString() {
- return "["+ disks.toString()+"]";
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/HardwareConfiguration.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/HardwareConfiguration.java
deleted file mode 100644
index cf5dc767cd..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/HardwareConfiguration.java
+++ /dev/null
@@ -1,249 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.hardware;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
-import org.jclouds.tmrk.enterprisecloud.domain.network.Nics;
-import org.jclouds.tmrk.enterprisecloud.domain.network.VirtualNic;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Jason King
- */
-@XmlRootElement(name = "HardwareConfiguration")
-public class HardwareConfiguration extends Resource {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromHardwareConfiguration(this);
- }
-
- public static class Builder extends Resource.Builder {
-
- private int processorCount;
- private ResourceCapacity memory;
- private Set virtualDisks = Sets.newLinkedHashSet();
- private Set virtualNics = Sets.newLinkedHashSet();
-
- /**
- * @see HardwareConfiguration#getProcessorCount
- */
- public Builder processorCount(int processorCount) {
- this.processorCount = processorCount;
- return this;
- }
-
- /**
- * @see HardwareConfiguration#getMemory
- */
- public Builder memory(ResourceCapacity memory) {
- this.memory = memory;
- return this;
- }
-
- /**
- * @see HardwareConfiguration#getVirtualDisks
- */
- public Builder disks(Set virtualDisks) {
- this.virtualDisks = ImmutableSet. copyOf(checkNotNull(virtualDisks, "virtualDisks"));
- return this;
- }
-
-
- /**
- * @see HardwareConfiguration#getVirtualNics
- */
- public Builder nics(Set virtualNics) {
- this.virtualNics = ImmutableSet. copyOf(checkNotNull(virtualNics, "virtualNics"));
- return this;
- }
-
- @Override
- public HardwareConfiguration build() {
- return new HardwareConfiguration(processorCount, memory, virtualDisks, virtualNics);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- public Builder fromHardwareConfiguration(HardwareConfiguration in) {
- return fromResource(in).processorCount(in.getProcessorCount())
- .memory(in.getMemory())
- .disks(in.getVirtualDisks())
- .nics(in.getVirtualNics());
- }
- }
-
- @XmlElement(name = "ProcessorCount", required = true)
- private int processorCount;
-
- @XmlElement(name = "Memory", required = false)
- private ResourceCapacity memory;
-
- @XmlElement(name = "Disks", required = false)
- private Disks virtualDisks = Disks.builder().build();
-
- @XmlElement(name = "Nics", required = false)
- private Nics virtualNics = Nics.builder().build();
-
- private HardwareConfiguration(int processorCount, @Nullable ResourceCapacity memory, Set virtualDisks, Set virtualNics) {
- this.virtualDisks = Disks.builder().disks(checkNotNull(virtualDisks,"virtualDisks")).build();
- this.virtualNics = Nics.builder().nics(checkNotNull(virtualNics, "virtualNics")).build();
- this.processorCount = processorCount;
- this.memory = memory;
- }
-
- private HardwareConfiguration() {
- //For JAXB
- }
-
- public int getProcessorCount() {
- return processorCount;
- }
-
- public ResourceCapacity getMemory() {
- return memory;
- }
-
- public Set getVirtualDisks() {
- return Collections.unmodifiableSet(virtualDisks.getVirtualDisks());
- }
-
- public Set getVirtualNics() {
- return Collections.unmodifiableSet(virtualNics.getVirtualNics());
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- HardwareConfiguration that = (HardwareConfiguration) o;
-
- if (processorCount != that.processorCount) return false;
- if (!virtualDisks.equals(that.virtualDisks)) return false;
- if (memory != null ? !memory.equals(that.memory) : that.memory != null)
- return false;
- if (!virtualNics.equals(that.virtualNics)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + processorCount;
- result = 31 * result + (memory != null ? memory.hashCode() : 0);
- result = 31 * result + virtualDisks.hashCode();
- result = 31 * result + virtualNics.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", processorCount="+processorCount+
- ", memory="+memory+", disks="+ virtualDisks +", nics="+ virtualNics;
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/VirtualDisk.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/VirtualDisk.java
deleted file mode 100644
index 3256508801..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/hardware/VirtualDisk.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.hardware;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- *
- * @author Jason King
- */
-public class VirtualDisk {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- public Builder toBuilder() {
- return new Builder().fromVirtualDisk(this);
- }
-
- public static class Builder {
-
- private String name;
- private ResourceCapacity size;
- private int index;
-
- /**
- * @see VirtualDisk#getName
- */
- public Builder name(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * @see VirtualDisk#getSize
- */
- public Builder size(ResourceCapacity size) {
- this.size = size;
- return this;
- }
-
- /**
- * @see VirtualDisk#getIndex
- */
- public Builder index(int index) {
- this.index = index;
- return this;
- }
-
- public VirtualDisk build() {
- return new VirtualDisk(name, size, index);
- }
-
- public Builder fromVirtualDisk(VirtualDisk in) {
- return name(in.getName())
- .size(in.getSize())
- .index(in.getIndex());
- }
- }
-
- @XmlElement(name = "Name", required = false)
- private String name;
-
- @XmlElement(name = "Size", required = false)
- private ResourceCapacity size;
-
- @XmlElement(name = "Index", required = false)
- private int index;
-
- public VirtualDisk(@Nullable String name, @Nullable ResourceCapacity size, int index) {
- this.name = name;
- this.size = size;
- this.index = index;
- }
-
- protected VirtualDisk() {
- //For JAXB
- }
-
- public String getName() {
- return name;
- }
-
- public ResourceCapacity getSize() {
- return size;
- }
-
- public int getIndex() {
- return index;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- VirtualDisk disk = (VirtualDisk) o;
-
- if (index != disk.index) return false;
- if (name != null ? !name.equals(disk.name) : disk.name != null)
- return false;
- if (size != null ? !size.equals(disk.size) : disk.size != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = name != null ? name.hashCode() : 0;
- result = 31 * result + (size != null ? size.hashCode() : 0);
- result = 31 * result + index;
- return result;
- }
-
- @Override
- public String toString() {
- return "[name="+name+", size="+size+", index="+index+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/BaseNamedResource.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/BaseNamedResource.java
deleted file mode 100644
index 58f12aeda7..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/BaseNamedResource.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.internal;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import java.net.URI;
-import java.util.Map;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Location of a Rest resource
- *
- * @author Adrian Cole
- *
- */
-public class BaseNamedResource> extends BaseResource {
-
- public static > Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromNamedResource(this);
- }
-
- public static class Builder> extends BaseResource.Builder {
-
- protected String name;
-
- /**
- * @see BaseNamedResource#getName
- */
- public Builder name(String name) {
- this.name = name;
- return this;
- }
-
- public BaseNamedResource build() {
- return new BaseNamedResource(href, type, name);
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- public Builder fromNamedResource(BaseNamedResource in) {
- return fromBaseResource(in).name(in.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes)).name(attributes.get("name"));
- }
- }
-
- @XmlAttribute
- protected String name;
-
- protected BaseNamedResource(URI href, String type, String name) {
- super(href, type);
- this.name = name;
- }
-
- protected BaseNamedResource() {
- //For JAXB
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- BaseNamedResource that = (BaseNamedResource) o;
-
- if (name != null ? !name.equals(that.name) : that.name != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + (name != null ? name.hashCode() : 0);
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", name="+name;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/BaseResource.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/BaseResource.java
deleted file mode 100644
index 6e98eacc3a..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/BaseResource.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.internal;
-
-import org.jclouds.tmrk.enterprisecloud.functions.URISource;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import java.net.URI;
-import java.util.Map;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Location of a Rest resource
- *
- * @author Adrian Cole
- *
- */
-public class BaseResource> implements URISource {
-
- public static > Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromBaseResource(this);
- }
-
- public static class Builder> {
-
- protected String type;
- protected URI href;
-
- /**
- * @see BaseResource#getType
- */
- public Builder type(String type) {
- this.type = type;
- return this;
- }
-
- /**
- * @see BaseResource#getHref
- */
- public Builder href(URI href) {
- this.href = href;
- return this;
- }
-
- public BaseResource build() {
- return new BaseResource(href, type);
- }
-
- protected Builder fromBaseResource(BaseResource in) {
- return type(in.getType()).href(in.getHref());
- }
-
- protected Builder fromAttributes(Map attributes) {
- return href(URI.create(attributes.get("href"))).type(attributes.get("type"));
- }
-
- }
-
- @XmlAttribute
- protected String type;
-
- @XmlAttribute
- protected URI href;
-
- protected BaseResource(URI href, String type) {
- this.type = type;
- this.href = checkNotNull(href, "href");
- }
-
- protected BaseResource() {
- //For JAXB
- }
-
- /**
- *
- * @return type definition, type, expressed as an HTTP Content-Type
- */
- public String getType() {
- return type;
- }
-
- /**
- *
- * @return an opaque reference and should never be parsed
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * @see #getHref
- */
- public URI getURI() {
- return getHref();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- BaseResource that = (BaseResource) o;
-
- if (href != null ? !href.equals(that.href) : that.href != null)
- return false;
- if (type != null ? !type.equals(that.type) : that.type != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = type != null ? type.hashCode() : 0;
- result = 31 * result + (href != null ? href.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return String.format("[%s]",string());
- }
-
- protected String string() {
- return "href="+href+", type="+type;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/Entity.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/Entity.java
deleted file mode 100644
index bd290255ef..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/Entity.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.internal;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.Task;
-import org.jclouds.tmrk.enterprisecloud.domain.Tasks;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.net.URI;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Base Entity class. Extends Resource with Tasks
- *
- * @author Jason King
- *
- */
-public class Entity> extends Resource {
-
- public static > Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromResource(this);
- }
-
- public static class Builder> extends Resource.Builder {
-
- protected Set tasks = Sets.newLinkedHashSet();
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.internal.Entity#getTasks
- */
- public Builder tasks(Set tasks) {
- this.tasks = ImmutableSet. copyOf(checkNotNull(tasks, "tasks"));
- return this;
- }
-
- /**
- * @see Resource#getLinks
- */
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * @see Resource#getActions
- */
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * @see Resource#getActions
- */
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- public Entity build() {
- return new Entity(href, type, name, links, actions, tasks);
- }
-
- /**
- * {@inheritDoc}
- */
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- public Builder fromEntity(Entity in) {
- return fromResource(in).links(in.getLinks()).actions(in.getActions()).name(in.getName())
- .tasks(in.getTasks());
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
- }
-
- @XmlElement(name = "Tasks", required = false)
- private Tasks tasks = Tasks.builder().build();
-
- protected Entity(URI href, String type, @Nullable String name, Set links, Set actions, Set tasks) {
- super(href, type, name, links, actions);
- this.tasks = Tasks.builder().tasks(checkNotNull(tasks,"tasks")).build();
- }
-
- protected Entity() {
- //For JAXB
- }
-
- public Set getTasks() {
- return Collections.unmodifiableSet(tasks.getTasks());
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- Entity entity = (Entity) o;
-
- if (!tasks.equals(entity.tasks)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + tasks.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", tasks="+tasks;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/Resource.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/Resource.java
deleted file mode 100644
index c0e4f84670..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/Resource.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.internal;
-
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Actions;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.Links;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import java.net.URI;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Base Resource class.
- * has Links and Actions and name (plus href and type are inherited)
- *
- * @author Jason King
- *
- */
-public class Resource> extends BaseResource {
-
- public static > Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromResource(this);
- }
-
- public static class Builder> extends BaseResource.Builder {
-
- protected Set links = Sets.newLinkedHashSet();
- protected Set actions = Sets.newLinkedHashSet();
- protected String name;
-
- /**
- * @see Resource#getLinks
- */
- public Builder links(Set links) {
- this.links = ImmutableSet. copyOf(checkNotNull(links, "links"));
- return this;
- }
-
- /**
- * @see Resource#getActions
- */
- public Builder actions(Set actions) {
- this.actions = ImmutableSet. copyOf(checkNotNull(actions, "actions"));
- return this;
- }
-
- /**
- * @see Resource#getActions
- */
- public Builder name(String name) {
- this.name = checkNotNull(name, "name");
- return this;
- }
-
- public Resource build() {
- return new Resource(href, type, name, links, actions);
- }
-
- /**
- * {@inheritDoc}
- */
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- public Builder fromResource(Resource in) {
- return fromBaseResource(in).links(in.getLinks())
- .actions(in.getActions()).name(in.getName());
- }
-
- /**
- * {@inheritDoc}
- */
- @SuppressWarnings("unchecked")
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
- }
-
- @XmlElement(name = "Links", required = false)
- protected Links links = Links.builder().build();
-
- @XmlElement(name = "Actions", required = false)
- protected Actions actions = Actions.builder().build();
-
- @XmlAttribute(required = false)
- protected String name;
-
- protected Resource(URI href, String type, @Nullable String name, Set links, Set actions) {
- super(href, type);
- this.name = name;
- this.links = Links.builder().links(checkNotNull(links,"links")).build();
- this.actions = Actions.builder().actions(checkNotNull(actions, "actions")).build();
- }
-
- protected Resource() {
- //For JAXB
- }
-
- public Set getLinks() {
- return Collections.unmodifiableSet(links.getLinks());
- }
-
- public Set getActions() {
- return Collections.unmodifiableSet(actions.getActions());
- }
-
- public String getName() {
- return name;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- Resource resource = (Resource) o;
-
- if (actions != null ? !actions.equals(resource.actions) : resource.actions != null)
- return false;
- if (links != null ? !links.equals(resource.links) : resource.links != null)
- return false;
- if (name != null ? !name.equals(resource.name) : resource.name != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + (links != null ? links.hashCode() : 0);
- result = 31 * result + (actions != null ? actions.hashCode() : 0);
- result = 31 * result + (name != null ? name.hashCode() : 0);
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", name="+name+", links="+links+", actions="+actions;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/ResourceCapacity.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/ResourceCapacity.java
deleted file mode 100644
index b00fca6fbf..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/internal/ResourceCapacity.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.internal;
-
-import org.jclouds.javax.annotation.Nullable;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * @author Jason King
- */
-public class ResourceCapacity {
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromResource(this);
- }
-
- public static class Builder {
-
- protected double value; //mandatory
- protected String unit; //optional
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity#getValue
- */
- public Builder value(double value) {
- this.value = value;
- return this;
- }
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.internal.ResourceCapacity#getUnit
- */
- public Builder unit(String unit) {
- this.unit = unit;
- return this;
- }
-
- public ResourceCapacity build() {
- return new ResourceCapacity(value, unit);
- }
-
- public Builder fromResource(ResourceCapacity in) {
- return value(in.getValue()).unit(in.getUnit());
- }
- }
-
- @XmlElement(name = "Value")
- protected double value;
-
- @XmlElement(name = "Unit")
- protected String unit;
-
- public ResourceCapacity(double value, @Nullable String unit) {
- this.value = value;
- this.unit = unit;
- }
-
- protected ResourceCapacity() {
- //For JAXB
- }
-
- public double getValue() {
- return value;
- }
-
- /**
- * Optional. May be null
- */
- public String getUnit() {
- return unit;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- ResourceCapacity that = (ResourceCapacity) o;
-
- if (Double.compare(that.value, value) != 0) return false;
- if (unit != null ? !unit.equals(that.unit) : that.unit != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result;
- long temp;
- temp = value != +0.0d ? Double.doubleToLongBits(value) : 0L;
- result = (int) (temp ^ (temp >>> 32));
- result = 31 * result + (unit != null ? unit.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return "[value="+value+", unit="+unit+"]";
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/keys/SshKey.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/keys/SshKey.java
deleted file mode 100644
index 635844d65f..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/keys/SshKey.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.keys;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.Task;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Entity;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-/**
- *
- * @author Jason King
- */
-@XmlRootElement(name = "SshKey")
-public class SSHKey extends Entity {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromSshKey(this);
- }
-
- public static class Builder extends Entity.Builder {
- private boolean defaultKey;
- private String fingerPrint;
- private String privateKey;
-
- /**
- * @see SSHKey#isDefaultKey
- */
- public Builder defaultKey(boolean defaultKey) {
- this.defaultKey = defaultKey;
- return this;
- }
-
- /**
- * @see SSHKey#getFingerPrint
- */
- public Builder fingerPrint(String fingerPrint) {
- this.fingerPrint = fingerPrint;
- return this;
- }
-
- /**
- * @see SSHKey#getPrivateKey
- */
- public Builder privateKey(String privateKey) {
- this.privateKey = privateKey;
- return this;
- }
-
- @Override
- public SSHKey build() {
- return new SSHKey(href, type, name, links, actions, tasks, defaultKey, fingerPrint, privateKey);
- }
-
- public Builder fromSshKey(SSHKey in) {
- return fromEntity(in).defaultKey(in.isDefaultKey()).fingerPrint(in.getFingerPrint()).privateKey(in.getPrivateKey());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromEntity(Entity in) {
- return Builder.class.cast(super.fromEntity(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder tasks(Set tasks) {
- return Builder.class.cast(super.tasks(tasks));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- }
-
- @XmlElement(name = "Default", required = false)
- private boolean defaultKey;
-
- @XmlElement(name = "FingerPrint", required = false)
- private String fingerPrint;
-
- @XmlElement(name = "PrivateKey", required = false)
- private String privateKey;
-
- private SSHKey(URI href, String type, String name, Set links, Set actions, Set tasks,
- boolean defaultKey, @Nullable String fingerPrint, @Nullable String privateKey) {
- super(href, type, name, links, actions, tasks);
- this.defaultKey = defaultKey;
- this.fingerPrint = fingerPrint;
- this.privateKey = privateKey;
- }
-
- private SSHKey() {
- //For JAXB
- }
-
- public boolean isDefaultKey() {
- return defaultKey;
- }
-
- public String getFingerPrint() {
- return fingerPrint;
- }
-
- public String getPrivateKey() {
- return privateKey;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- SSHKey sshKey = (SSHKey) o;
-
- if (defaultKey != sshKey.defaultKey) return false;
- if (fingerPrint != null ? !fingerPrint.equals(sshKey.fingerPrint) : sshKey.fingerPrint != null)
- return false;
- if (privateKey != null ? !privateKey.equals(sshKey.privateKey) : sshKey.privateKey != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + (defaultKey ? 1 : 0);
- result = 31 * result + (fingerPrint != null ? fingerPrint.hashCode() : 0);
- result = 31 * result + (privateKey != null ? privateKey.hashCode() : 0);
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", defaultKey="+defaultKey+", fingerPrint="+fingerPrint+", privateKey="+privateKey;
- }
-
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/keys/SshKeys.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/keys/SshKeys.java
deleted file mode 100644
index 4cebdbe02a..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/keys/SshKeys.java
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.keys;
-
-import com.google.common.collect.Sets;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * SshKeys is more than a simple wrapper as it extends Resource.
- * @author Jason King
- *
- */
-@XmlRootElement(name = "SshKeys")
-public class SSHKeys extends Resource {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromTemplates(this);
- }
-
- public static class Builder extends Resource.Builder {
- private Set sshKeys = Sets.newLinkedHashSet();
-
- /**
- * @see SSHKeys#getSSHKeys
- */
- public Builder sshKeys(Set sshKeys) {
- this.sshKeys =(checkNotNull(sshKeys,"sshKeys"));
- return this;
- }
-
- @Override
- public SSHKeys build() {
- return new SSHKeys(href, type, name, links, actions, sshKeys);
- }
-
- public Builder fromTemplates(SSHKeys in) {
- return fromResource(in).sshKeys(in.getSSHKeys());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- }
-
- @XmlElement(name = "SshKey", required = false)
- private Set sshKeys = Sets.newLinkedHashSet();
-
- private SSHKeys(URI href, String type, String name, Set links, Set actions, Set sshKeys) {
- super(href, type, name, links, actions);
- this.sshKeys = checkNotNull(sshKeys,"sshKeys");
- }
-
- private SSHKeys() {
- //For JAXB
- }
-
- public Set getSSHKeys() {
- return sshKeys;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- SSHKeys networks1 = (SSHKeys) o;
-
- if (!sshKeys.equals(networks1.sshKeys)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + sshKeys.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", sshKeys="+sshKeys;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/DeviceLayout.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/DeviceLayout.java
deleted file mode 100644
index 4927d440bc..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/DeviceLayout.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import com.google.common.collect.Sets;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * DeviceLayout is more than a simple wrapper as it extends Resource.
- *
- * @author Jason King
- *
- */
-@XmlRootElement(name = "DeviceLayout")
-public class DeviceLayout extends Resource {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromTemplates(this);
- }
-
- public static class Builder extends Resource.Builder {
- private Set rows = Sets.newLinkedHashSet();
-
- /**
- * @see DeviceLayout#getRows
- */
- public Builder rows(Set rows) {
- this.rows =(checkNotNull(rows,"rows"));
- return this;
- }
-
- @Override
- public DeviceLayout build() {
- return new DeviceLayout(href, type, name, links, actions, rows);
- }
-
- public Builder fromTemplates(DeviceLayout in) {
- return fromResource(in).rows(in.getRows());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- }
-
- @XmlElement(name = "Rows", required = false)
- private Rows rows = Rows.builder().build();
-
- private DeviceLayout(URI href, String type, String name, Set links, Set actions, Set rows) {
- super(href, type, name, links, actions);
- this.rows = Rows.builder().rows(checkNotNull(rows,"rows")).build();
- }
-
- private DeviceLayout() {
- //For JAXB
- }
-
- public Set getRows() {
- return rows.getRows();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- DeviceLayout that = (DeviceLayout) o;
-
- if (!rows.equals(that.rows)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + rows.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", rows="+rows;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Groups.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Groups.java
deleted file mode 100644
index f557464ad9..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Groups.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import com.google.common.collect.Sets;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.util.Collections;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Wraps individual LayoutGroup elements.
- *
- * @author Jason King
- */
-public class Groups {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromGroups(this);
- }
-
- public static class Builder {
-
- private Set groups = Sets.newLinkedHashSet();
-
- /**
- * @see Groups#getGroups
- */
- public Builder groups(Set groups) {
- this.groups = Sets.newLinkedHashSet(checkNotNull(groups, "groups"));
- return this;
- }
-
- public Builder addGroup(LayoutGroup group) {
- groups.add(checkNotNull(group, "group"));
- return this;
- }
-
- public Groups build() {
- return new Groups(groups);
- }
-
- public Builder fromGroups(Groups in) {
- return groups(in.getGroups());
- }
- }
-
- private Groups() {
- //For JAXB and builder use
- }
-
- private Groups(Set entries) {
- this.groups = Sets.newLinkedHashSet(entries);
- }
-
- @XmlElement(name = "Group", required=false)
- private Set groups = Sets.newLinkedHashSet();
-
- public Set getGroups() {
- return Collections.unmodifiableSet(groups);
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Groups tasks1 = (Groups) o;
-
- if (!groups.equals(tasks1.groups)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return groups.hashCode();
- }
-
- public String toString() {
- return "["+ groups.toString()+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Layout.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Layout.java
deleted file mode 100644
index 2aa9aa8f8d..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Layout.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.NamedResource;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * Layout is a logical aggregation of virtual machines and physical devices defined by the organization.
- * Layout is an environment concept but visible from both the environment and the compute pool.
- * From the environment, all rows, groups, virtual machines, and physical devices are visible.
- * From the compute pool, only a subset is visible.
- * To appear in a compute pool layout, virtual machines in the rows and groups must be allocated from the compute pool.
- * As physical devices are not allocated from the compute pool, they do not appear on compute pool layouts.
- *
- * @author Jason King
- */
-public class Layout {
- @XmlElement(name = "Group")
- private NamedResource group;
-
- @XmlElement(name = "Row")
- private NamedResource row;
-
- public Layout(@Nullable NamedResource group, @Nullable NamedResource row) {
- this.group = group;
- this.row = row;
- }
-
- public Layout() {
- //For JAXB
- }
-
- public NamedResource getGroup() {
- return group;
- }
-
- public NamedResource getRow() {
- return row;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Layout layout = (Layout) o;
-
- if (group != null ? !group.equals(layout.group) : layout.group != null)
- return false;
- if (row != null ? !row.equals(layout.row) : layout.row != null)
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = group != null ? group.hashCode() : 0;
- result = 31 * result + (row != null ? row.hashCode() : 0);
- return result;
- }
-
- public String toString() {
- return "[group="+group+", row="+row+"]";
- }
-
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutGroup.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutGroup.java
deleted file mode 100644
index 21c3cd263e..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutGroup.java
+++ /dev/null
@@ -1,206 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import com.google.common.collect.Sets;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachineReference;
-import org.jclouds.tmrk.enterprisecloud.domain.vm.VirtualMachineReferences;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * LayoutGroup is more than a simple wrapper as it extends Resource.
- *
- * @author Jason King
- *
- */
-public class LayoutGroup extends Resource {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromLayoutGroup(this);
- }
-
- public static class Builder extends Resource.Builder {
- private int index;
- private Set virtualMachineReferences = Sets.newLinkedHashSet();
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.layout.LayoutGroup#getIndex
- */
- public Builder index(int index) {
- this.index = index;
- return this;
- }
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.layout.LayoutGroup#getVirtualMachineReferences()
- */
- public Builder virtualMachineReferences(Set virtualMachineReferences) {
- this.virtualMachineReferences = Sets.newLinkedHashSet(checkNotNull(virtualMachineReferences, "virtualMachineReferences"));
- return this;
- }
-
-
- @Override
- public LayoutGroup build() {
- return new LayoutGroup(href, type, name, links, actions, index,virtualMachineReferences);
- }
-
- public Builder fromLayoutGroup(LayoutGroup in) {
- return fromResource(in).index(in.getIndex());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
- }
-
- @XmlElement(name = "Index", required = false)
- private int index;
-
- @XmlElement(name = "VirtualMachines", required = false)
- private VirtualMachineReferences virtualMachineReferences;
-
- //TODO: PhysicalDevices
-
- private LayoutGroup(URI href, String type, String name, Set links, Set actions,
- int index, Set virtualMachineReferences) {
- super(href, type, name, links, actions);
- this.index = index;
- this.virtualMachineReferences = VirtualMachineReferences.builder().virtualMachineReferences(virtualMachineReferences).build();
- }
-
- private LayoutGroup() {
- //For JAXB
- }
-
- public int getIndex() {
- return index;
- }
-
- public Set getVirtualMachineReferences() {
- return virtualMachineReferences.getVirtualMachineReferences();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- LayoutGroup that = (LayoutGroup) o;
-
- if (index != that.index) return false;
- if (!virtualMachineReferences.equals(that.virtualMachineReferences))
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + index;
- result = 31 * result + virtualMachineReferences.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", index="+index+", virtualMachineReferences="+virtualMachineReferences;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutRequest.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutRequest.java
deleted file mode 100644
index 6661915f36..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutRequest.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.tmrk.enterprisecloud.domain.NamedResource;
-
-import javax.xml.bind.annotation.XmlElement;
-
-/**
- * LayoutRequest has three variations. Only one of the three variations is permitted in a call:
- *
- * 1. Use an existing group.
- * Group is required and the href attribute on the element is required to identify
- * the group to use.
- *
- * 2. Use a newly created group in an existing row.
- * Row is required and the href attribute on the element is required to identify
- * the row in which the new group will be created.
- * NewGroup is required to provide the required name,
- * which may not exceed fifty characters,
- * and to create the group to use.
- *
- * 3. Move to a newly created group in a newly created row.
- * NewRow is required to provide the required name,
- * which may not exceed fifty characters,
- * and to create the row in which the new group will be created.
- * NewGroup is required to provide the required name,
- * which may not exceed fifty characters,
- * and to create the group to use.
- *
- *
- * @author Jason King
- *
- */
-public class LayoutRequest {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromLayoutRequest(this);
- }
-
- public static class Builder {
- private NamedResource row;
- private NamedResource group;
- private String newRow;
- private String newGroup;
-
- /**
- * @see LayoutRequest#getRow
- */
- public Builder row(NamedResource row) {
- this.row = row;
- return this;
- }
-
- /**
- * @see LayoutRequest#getGroup
- */
- public Builder group(NamedResource group) {
- this.group = group;
- return this;
- }
-
- /**
- * @see LayoutRequest#getNewRow
- */
- public Builder newRow(String newRow) {
- this.newRow = newRow;
- return this;
- }
-
- /**
- * @see LayoutRequest#getNewGroup
- */
- public Builder newGroup(String newGroup) {
- this.newGroup = newGroup;
- return this;
- }
-
- public LayoutRequest build() {
- return new LayoutRequest(row, group, newRow, newGroup);
- }
-
- public Builder fromLayoutRequest(LayoutRequest in) {
- return row(in.getRow()).group(in.getGroup()).newRow(in.getNewRow()).newGroup(in.getNewGroup());
- }
- }
-
- @XmlElement(name = "Row", required = false)
- private NamedResource row;
-
- @XmlElement(name = "Group", required = false)
- private NamedResource group;
-
- @XmlElement(name = "NewRow", required = false)
- private String newRow;
-
- @XmlElement(name = "NewGroup", required = false)
- private String newGroup;
-
-
- private LayoutRequest(@Nullable NamedResource row, @Nullable NamedResource group, @Nullable String newRow, @Nullable String newGroup) {
- this.row = row;
- this.group = group;
- this.newRow = newRow;
- this.newGroup = newGroup;
- }
-
- private LayoutRequest() {
- //For JAXB
- }
-
- public NamedResource getRow() {
- return row;
- }
-
- public NamedResource getGroup() {
- return group;
- }
-
- public String getNewRow() {
- return newRow;
- }
-
- public String getNewGroup() {
- return newGroup;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- LayoutRequest that = (LayoutRequest) o;
-
- if (group != null ? !group.equals(that.group) : that.group != null)
- return false;
- if (newGroup != null ? !newGroup.equals(that.newGroup) : that.newGroup != null)
- return false;
- if (newRow != null ? !newRow.equals(that.newRow) : that.newRow != null)
- return false;
- if (row != null ? !row.equals(that.row) : that.row != null) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = row != null ? row.hashCode() : 0;
- result = 31 * result + (group != null ? group.hashCode() : 0);
- result = 31 * result + (newRow != null ? newRow.hashCode() : 0);
- result = 31 * result + (newGroup != null ? newGroup.hashCode() : 0);
- return result;
- }
-
- @Override
- public String toString() {
- return "row="+row+", group="+group+", newRow="+newRow+", newGroup="+newGroup;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutRow.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutRow.java
deleted file mode 100644
index 449442e11f..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/LayoutRow.java
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import com.google.common.collect.Sets;
-import org.jclouds.tmrk.enterprisecloud.domain.Action;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.BaseResource;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.net.URI;
-import java.util.Map;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * LayoutRow is more than a simple wrapper as it extends Resource.
- *
- * @author Jason King
- *
- */
-public class LayoutRow extends Resource {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder toBuilder() {
- return new Builder().fromLayoutRow(this);
- }
-
- public static class Builder extends Resource.Builder {
- private int index;
- private Set groups = Sets.newLinkedHashSet();
-
- /**
- * @see org.jclouds.tmrk.enterprisecloud.domain.layout.LayoutRow#getIndex
- */
- public Builder index(int index) {
- this.index = index;
- return this;
- }
-
- /**
- * @see Groups#getGroups
- */
- public Builder groups(Set groups) {
- this.groups = Sets.newLinkedHashSet(checkNotNull(groups, "groups"));
- return this;
- }
-
- @Override
- public LayoutRow build() {
- return new LayoutRow(href, type, name, links, actions, index, groups);
- }
-
- public Builder fromLayoutRow(LayoutRow in) {
- return fromResource(in).index(in.getIndex()).groups(in.getGroups());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromBaseResource(BaseResource in) {
- return Builder.class.cast(super.fromBaseResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromResource(Resource in) {
- return Builder.class.cast(super.fromResource(in));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder type(String type) {
- return Builder.class.cast(super.type(type));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder href(URI href) {
- return Builder.class.cast(super.href(href));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder name(String name) {
- return Builder.class.cast(super.name(name));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder links(Set links) {
- return Builder.class.cast(super.links(links));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder actions(Set actions) {
- return Builder.class.cast(super.actions(actions));
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Builder fromAttributes(Map attributes) {
- return Builder.class.cast(super.fromAttributes(attributes));
- }
-
- }
-
- @XmlElement(name = "Index", required = false)
- private int index;
-
- @XmlElement(name = "Groups", required = false)
- private Groups groups = Groups.builder().build();
-
- private LayoutRow(URI href, String type, String name, Set links, Set actions, int index, Set groups) {
- super(href, type, name, links, actions);
- this.index = index;
- this.groups = Groups.builder().groups(groups).build();
- }
-
- private LayoutRow() {
- //For JAXB
- }
-
- public int getIndex() {
- return index;
- }
-
- public Set getGroups() {
- return groups.getGroups();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
- if (!super.equals(o)) return false;
-
- LayoutRow layoutRow = (LayoutRow) o;
-
- if (index != layoutRow.index) return false;
- if (!groups.equals(layoutRow.groups)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- int result = super.hashCode();
- result = 31 * result + index;
- result = 31 * result + groups.hashCode();
- return result;
- }
-
- @Override
- public String string() {
- return super.string()+", index="+index+", groups="+groups;
- }
-}
\ No newline at end of file
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Rows.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Rows.java
deleted file mode 100644
index 3de18713f1..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/layout/Rows.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.layout;
-
-import com.google.common.collect.Sets;
-
-import javax.xml.bind.annotation.XmlElement;
-import java.util.Collections;
-import java.util.Set;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * Wraps individual LayoutRow elements.
- *
- * @author Jason King
- */
-public class Rows {
-
- @SuppressWarnings("unchecked")
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromRows(this);
- }
-
- public static class Builder {
-
- private Set rows = Sets.newLinkedHashSet();
-
- /**
- * @see Rows#getRows
- */
- public Builder rows(Set rows) {
- this.rows = Sets.newLinkedHashSet(checkNotNull(rows, "rows"));
- return this;
- }
-
- public Builder addRow(LayoutRow row) {
- rows.add(checkNotNull(row,"row"));
- return this;
- }
-
- public Rows build() {
- return new Rows(rows);
- }
-
- public Builder fromRows(Rows in) {
- return rows(in.getRows());
- }
- }
-
- private Rows() {
- //For JAXB and builder use
- }
-
- private Rows(Set entries) {
- this.rows = Sets.newLinkedHashSet(entries);
- }
-
- @XmlElement(name = "Row", required=false)
- private Set rows = Sets.newLinkedHashSet();
-
- public Set getRows() {
- return Collections.unmodifiableSet(rows);
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- Rows tasks1 = (Rows) o;
-
- if (!rows.equals(tasks1.rows)) return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return rows.hashCode();
- }
-
- public String toString() {
- return "["+ rows.toString()+"]";
- }
-}
diff --git a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/network/AssignedIpAddresses.java b/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/network/AssignedIpAddresses.java
deleted file mode 100644
index 724e21c102..0000000000
--- a/sandbox-providers/tmrk-enterprisecloud/src/main/java/org/jclouds/tmrk/enterprisecloud/domain/network/AssignedIpAddresses.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Licensed to jclouds, Inc. (jclouds) under one or more
- * contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. jclouds licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.jclouds.tmrk.enterprisecloud.domain.network;
-
-import com.google.common.collect.Sets;
-import org.jclouds.tmrk.enterprisecloud.domain.Actions;
-import org.jclouds.tmrk.enterprisecloud.domain.Link;
-import org.jclouds.tmrk.enterprisecloud.domain.internal.Resource;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import java.net.URI;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- *
- * @author Jason King
- */
-@XmlRootElement(name="AssignedIpAddresses")
-public class AssignedIpAddresses extends Resource