You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/11/17 17:21:28 UTC
[21/32] jclouds-labs git commit: JCLOUDS-780 Remove vcloud-director.
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgNetwork.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgNetwork.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgNetwork.java
deleted file mode 100644
index 77aa8bf..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgNetwork.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.org;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import org.jclouds.vcloud.director.v1_5.domain.Reference;
-import org.jclouds.vcloud.director.v1_5.domain.network.IpAddresses;
-import org.jclouds.vcloud.director.v1_5.domain.network.Network;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "OrgNetwork")
-public class OrgNetwork extends Network {
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return new ConcreteBuilder().fromOrgNetwork(this);
- }
-
- public abstract static class Builder<T extends Builder<T>> extends Network.Builder<T> {
- private Reference networkPool;
- private IpAddresses allowedExternalIpAddresses;
-
- /**
- * @see OrgNetwork#getNetworkPool()
- */
- public T networkPool(Reference networkPool) {
- this.networkPool = networkPool;
- return self();
- }
-
- /**
- * @see OrgNetwork#getAllowedExternalIpAddresses()
- */
- public T allowedExternalIpAddresses(IpAddresses allowedExternalIpAddresses) {
- this.allowedExternalIpAddresses = allowedExternalIpAddresses;
- return self();
- }
-
- @Override
- public OrgNetwork build() {
- return new OrgNetwork(this);
- }
-
- public T fromOrgNetwork(OrgNetwork in) {
- return fromEntityType(in).configuration(in.getConfiguration())
- .networkPool(in.getNetworkPool())
- .allowedExternalIpAddresses(in.getAllowedExternalIpAddresses());
- }
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- @Override
- protected ConcreteBuilder self() {
- return this;
- }
- }
-
- protected OrgNetwork() {
- // For JAXB
- }
-
- private OrgNetwork(Builder<?> b) {
- super(b);
- networkPool = b.networkPool;
- allowedExternalIpAddresses = b.allowedExternalIpAddresses;
- }
-
- @XmlElement(name = "NetworkPool")
- private Reference networkPool;
- @XmlElement(name = "AllowedExternalIpAddresses")
- private IpAddresses allowedExternalIpAddresses;
-
- /**
- * @return optional network pool
- */
- public Reference getNetworkPool() {
- return networkPool;
- }
-
- /**
- * @return optional network pool
- */
- public IpAddresses getAllowedExternalIpAddresses() {
- return allowedExternalIpAddresses;
- }
-
- @Override
- public boolean equals(Object o) {
- if (!super.equals(o))
- return false;
- OrgNetwork that = OrgNetwork.class.cast(o);
- return super.equals(that) &&
- equal(networkPool, that.networkPool) &&
- equal(allowedExternalIpAddresses, that.allowedExternalIpAddresses);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(),
- networkPool,
- allowedExternalIpAddresses);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("networkPool", networkPool)
- .add("allowedExternalIpAddresses", allowedExternalIpAddresses);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgPasswordPolicySettings.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgPasswordPolicySettings.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgPasswordPolicySettings.java
deleted file mode 100644
index 78f957b..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgPasswordPolicySettings.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.org;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.domain.Resource;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "OrgPasswordPolicySettings")
-@XmlType(propOrder = {
- "accountLockoutEnabled",
- "invalidLoginsBeforeLockout",
- "accountLockoutIntervalMinutes"
-})
-public class OrgPasswordPolicySettings extends Resource {
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromOrgPasswordPolicySettings(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends Resource.Builder<B> {
-
- private boolean accountLockoutEnabled;
- private int invalidLoginsBeforeLockout;
- private int accountLockoutIntervalMinutes;
-
- /**
- * @see OrgPasswordPolicySettings#getAccountLockoutEnabled()
- */
- public B accountLockoutEnabled(boolean accountLockoutEnabled) {
- this.accountLockoutEnabled = accountLockoutEnabled;
- return self();
- }
-
- /**
- * @see OrgPasswordPolicySettings#getInvalidLoginsBeforeLockout()
- */
- public B invalidLoginsBeforeLockout(int invalidLoginsBeforeLockout) {
- this.invalidLoginsBeforeLockout = invalidLoginsBeforeLockout;
- return self();
- }
-
- /**
- * @see OrgPasswordPolicySettings#getAccountLockoutIntervalMinutes()
- */
- public B accountLockoutIntervalMinutes(int accountLockoutIntervalMinutes) {
- this.accountLockoutIntervalMinutes = accountLockoutIntervalMinutes;
- return self();
- }
-
- @Override
- public OrgPasswordPolicySettings build() {
- return new OrgPasswordPolicySettings(this);
- }
-
- public B fromOrgPasswordPolicySettings(OrgPasswordPolicySettings in) {
- return fromResource(in)
- .accountLockoutEnabled(in.isAccountLockoutEnabled())
- .invalidLoginsBeforeLockout(in.getInvalidLoginsBeforeLockout())
- .accountLockoutIntervalMinutes(in.getAccountLockoutIntervalMinutes());
- }
- }
-
- protected OrgPasswordPolicySettings() {
- // For JAXB
- }
-
- protected OrgPasswordPolicySettings(Builder<?> builder) {
- super(builder);
- this.accountLockoutEnabled = builder.accountLockoutEnabled;
- this.invalidLoginsBeforeLockout = builder.invalidLoginsBeforeLockout;
- this.accountLockoutIntervalMinutes = builder.accountLockoutIntervalMinutes;
- }
-
- @XmlElement(name = "AccountLockoutEnabled")
- protected boolean accountLockoutEnabled;
- @XmlElement(name = "InvalidLoginsBeforeLockout")
- protected int invalidLoginsBeforeLockout;
- @XmlElement(name = "AccountLockoutIntervalMinutes")
- protected int accountLockoutIntervalMinutes;
-
- /**
- * Gets the value of the accountLockoutEnabled property.
- *
- */
- public boolean isAccountLockoutEnabled() {
- return accountLockoutEnabled;
- }
-
- /**
- * Gets the value of the invalidLoginsBeforeLockout property.
- *
- */
- public Integer getInvalidLoginsBeforeLockout() {
- return invalidLoginsBeforeLockout;
- }
-
- /**
- * Gets the value of the accountLockoutIntervalMinutes property.
- *
- */
- public Integer getAccountLockoutIntervalMinutes() {
- return accountLockoutIntervalMinutes;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- OrgPasswordPolicySettings that = OrgPasswordPolicySettings.class.cast(o);
- return super.equals(that) &&
- equal(accountLockoutEnabled, that.accountLockoutEnabled) &&
- equal(invalidLoginsBeforeLockout, that.invalidLoginsBeforeLockout) &&
- equal(accountLockoutIntervalMinutes, that.accountLockoutIntervalMinutes);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(),
- accountLockoutEnabled,
- invalidLoginsBeforeLockout,
- accountLockoutIntervalMinutes);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("accountLockoutEnabled", accountLockoutEnabled)
- .add("invalidLoginsBeforeLockout", invalidLoginsBeforeLockout)
- .add("accountLockoutIntervalMinutes", accountLockoutIntervalMinutes);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgSettings.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgSettings.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgSettings.java
deleted file mode 100644
index dd1a7e1..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgSettings.java
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.org;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.domain.Resource;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-/**
- * Describes various settings for some organization.
- * This type establishes quotas and policies for the organization.
- * It also contains elements that specify the details of
- * how the organization connects to LDAP and email services.
- */
-@XmlRootElement(name = "OrgSettings")
-@XmlType(propOrder = {
- "generalSettings",
- "vAppLeaseSettings",
- "vAppTemplateLeaseSettings",
- "ldapSettings",
- "emailSettings",
- "passwordPolicy"
-})
-public class OrgSettings extends Resource {
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromOrgSettings(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends Resource.Builder<B> {
-
- private OrgGeneralSettings generalSettings;
- private OrgLeaseSettings vAppLeaseSettings;
- private OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings;
- private OrgLdapSettings ldapSettings;
- private OrgEmailSettings emailSettings;
- private OrgPasswordPolicySettings passwordPolicy;
-
- /**
- * @see OrgSettings#getGeneralSettings()
- */
- public B generalSettings(OrgGeneralSettings generalSettings) {
- this.generalSettings = generalSettings;
- return self();
- }
-
- /**
- * @see OrgSettings#getVAppLeaseSettings()
- */
- public B vAppLeaseSettings(OrgLeaseSettings vAppLeaseSettings) {
- this.vAppLeaseSettings = vAppLeaseSettings;
- return self();
- }
-
- /**
- * @see OrgSettings#getVAppTemplateLeaseSettings()
- */
- public B vAppTemplateLeaseSettings(OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings) {
- this.vAppTemplateLeaseSettings = vAppTemplateLeaseSettings;
- return self();
- }
-
- /**
- * @see OrgSettings#getLdapSettings()
- */
- public B ldapSettings(OrgLdapSettings ldapSettings) {
- this.ldapSettings = ldapSettings;
- return self();
- }
-
- /**
- * @see OrgSettings#getEmailSettings()
- */
- public B emailSettings(OrgEmailSettings emailSettings) {
- this.emailSettings = emailSettings;
- return self();
- }
-
- /**
- * @see OrgSettings#getPasswordPolicy()
- */
- public B passwordPolicy(OrgPasswordPolicySettings passwordPolicy) {
- this.passwordPolicy = passwordPolicy;
- return self();
- }
-
- @Override
- public OrgSettings build() {
- return new OrgSettings(this);
- }
-
- public B fromOrgSettings(OrgSettings in) {
- return fromResource(in)
- .generalSettings(in.getGeneralSettings())
- .vAppLeaseSettings(in.getVAppLeaseSettings())
- .vAppTemplateLeaseSettings(in.getVAppTemplateLeaseSettings())
- .ldapSettings(in.getLdapSettings())
- .emailSettings(in.getEmailSettings())
- .passwordPolicy(in.getPasswordPolicy());
- }
- }
-
- @SuppressWarnings("unused")
- private OrgSettings() {
- // For JAXB
- }
-
- public OrgSettings(Builder<?> builder) {
- super(builder);
- this.generalSettings = builder.generalSettings;
- this.vAppLeaseSettings = builder.vAppLeaseSettings;
- this.vAppTemplateLeaseSettings = builder.vAppTemplateLeaseSettings;
- this.ldapSettings = builder.ldapSettings;
- this.emailSettings = builder.emailSettings;
- this.passwordPolicy = builder.passwordPolicy;
- }
-
- @XmlElement(name = "OrgGeneralSettings")
- private OrgGeneralSettings generalSettings;
- @XmlElement(name = "VAppLeaseSettings")
- private OrgLeaseSettings vAppLeaseSettings;
- @XmlElement(name = "VAppTemplateLeaseSettings")
- private OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings;
- @XmlElement(name = "OrgLdapSettings")
- private OrgLdapSettings ldapSettings;
- @XmlElement(name = "OrgEmailSettings")
- private OrgEmailSettings emailSettings;
- @XmlElement(name = "OrgPasswordPolicySettings")
- private OrgPasswordPolicySettings passwordPolicy;
-
- /**
- * Gets the value of the orgGeneralSettings property.
- *
- * @return
- * possible object is
- * {@link OrgGeneralSettings }
- *
- */
- public OrgGeneralSettings getGeneralSettings() {
- return generalSettings;
- }
-
- /**
- * Gets the value of the vAppLeaseSettings property.
- *
- * @return
- * possible object is
- * {@link OrgLeaseSettings }
- *
- */
- public OrgLeaseSettings getVAppLeaseSettings() {
- return vAppLeaseSettings;
- }
-
- /**
- * Gets the value of the vAppTemplateLeaseSettings property.
- *
- * @return
- * possible object is
- * {@link OrgVAppTemplateLeaseSettings }
- *
- */
- public OrgVAppTemplateLeaseSettings getVAppTemplateLeaseSettings() {
- return vAppTemplateLeaseSettings;
- }
-
- /**
- * Gets the value of the orgLdapSettings property.
- *
- * @return
- * possible object is
- * {@link OrgLdapSettings }
- *
- */
- public OrgLdapSettings getLdapSettings() {
- return ldapSettings;
- }
-
- /**
- * Gets the value of the orgEmailSettings property.
- *
- * @return
- * possible object is
- * {@link OrgEmailSettings }
- *
- */
- public OrgEmailSettings getEmailSettings() {
- return emailSettings;
- }
-
- /**
- * Gets the value of the orgPasswordPolicySettings property.
- *
- * @return
- * possible object is
- * {@link OrgPasswordPolicySettings }
- *
- */
- public OrgPasswordPolicySettings getPasswordPolicy() {
- return passwordPolicy;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- OrgSettings that = OrgSettings.class.cast(o);
- return super.equals(that) &&
- equal(generalSettings, that.generalSettings) &&
- equal(vAppLeaseSettings, that.vAppLeaseSettings) &&
- equal(vAppTemplateLeaseSettings, that.vAppTemplateLeaseSettings) &&
- equal(ldapSettings, that.ldapSettings) &&
- equal(emailSettings, that.emailSettings) &&
- equal(passwordPolicy, that.passwordPolicy);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(),
- generalSettings,
- vAppLeaseSettings,
- vAppTemplateLeaseSettings,
- ldapSettings,
- emailSettings,
- passwordPolicy);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("generalSettings", generalSettings)
- .add("vAppLeaseSettings", vAppLeaseSettings)
- .add("vAppTemplateLeaseSettings", vAppTemplateLeaseSettings)
- .add("ldapSettings", ldapSettings)
- .add("emailSettings", emailSettings)
- .add("passwordPolicy", passwordPolicy);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgVAppTemplateLeaseSettings.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgVAppTemplateLeaseSettings.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgVAppTemplateLeaseSettings.java
deleted file mode 100644
index b60b5f5..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/OrgVAppTemplateLeaseSettings.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.org;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.domain.Resource;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-/**
- * Expiration and storage policy for vApp templates in an organization.
- */
-@XmlRootElement(name = "OrgVAppTemplateLeaseSettings")
-@XmlType(propOrder = {
- "deleteOnStorageLeaseExpiration",
- "storageLeaseSeconds"
-})
-public class OrgVAppTemplateLeaseSettings extends Resource {
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromOrgVAppTemplateLeaseSettings(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends Resource.Builder<B> {
-
- private Boolean deleteOnStorageLeaseExpiration;
- private Integer storageLeaseSeconds;
-
- /**
- * @see OrgVAppTemplateLeaseSettings#getDeleteOnStorageLeaseExpiration()
- */
- public B deleteOnStorageLeaseExpiration(Boolean deleteOnStorageLeaseExpiration) {
- this.deleteOnStorageLeaseExpiration = deleteOnStorageLeaseExpiration;
- return self();
- }
-
- /**
- * @see OrgVAppTemplateLeaseSettings#getStorageLeaseSeconds()
- */
- public B storageLeaseSeconds(Integer storageLeaseSeconds) {
- this.storageLeaseSeconds = storageLeaseSeconds;
- return self();
- }
-
-
- @Override
- public OrgVAppTemplateLeaseSettings build() {
- return new OrgVAppTemplateLeaseSettings(this);
- }
-
- public B fromOrgVAppTemplateLeaseSettings(OrgVAppTemplateLeaseSettings in) {
- return fromResource(in)
- .deleteOnStorageLeaseExpiration(in.deleteOnStorageLeaseExpiration())
- .storageLeaseSeconds(in.getStorageLeaseSeconds());
- }
- }
-
- protected OrgVAppTemplateLeaseSettings() {
- // For JAXB and B use
- }
-
- protected OrgVAppTemplateLeaseSettings(Builder<?> builder) {
- super(builder);
- this.deleteOnStorageLeaseExpiration = builder.deleteOnStorageLeaseExpiration;
- this.storageLeaseSeconds = builder.storageLeaseSeconds;
- }
-
- @XmlElement(name = "DeleteOnStorageLeaseExpiration")
- private Boolean deleteOnStorageLeaseExpiration;
- @XmlElement(name = "StorageLeaseSeconds")
- private Integer storageLeaseSeconds;
-
- /**
- * Gets the value of the deleteOnStorageLeaseExpiration property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean deleteOnStorageLeaseExpiration() {
- return deleteOnStorageLeaseExpiration;
- }
-
- /**
- * Gets the value of the storageLeaseSeconds property.
- *
- * @return
- * possible object is
- * {@link Integer }
- *
- */
- public Integer getStorageLeaseSeconds() {
- return storageLeaseSeconds;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- OrgVAppTemplateLeaseSettings that = OrgVAppTemplateLeaseSettings.class.cast(o);
- return super.equals(that) &&
- equal(deleteOnStorageLeaseExpiration, that.deleteOnStorageLeaseExpiration) &&
- equal(storageLeaseSeconds, that.storageLeaseSeconds);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(),
- deleteOnStorageLeaseExpiration,
- storageLeaseSeconds);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("deleteOnStorageLeaseExpiration", deleteOnStorageLeaseExpiration)
- .add("storageLeaseSeconds", storageLeaseSeconds);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/package-info.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/package-info.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/package-info.java
deleted file mode 100644
index 26953e0..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/org/package-info.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.
- */
-@XmlSchema(namespace = VCLOUD_1_5_NS,
- elementFormDefault = XmlNsForm.QUALIFIED,
- xmlns = {
- @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS)
- }
-)
-@XmlAccessorType(XmlAccessType.FIELD)
-package org.jclouds.vcloud.director.v1_5.domain.org;
-
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java
deleted file mode 100644
index e187429..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/package-info.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.
- */
-@XmlSchema(namespace = VCLOUD_1_5_NS,
- elementFormDefault = XmlNsForm.QUALIFIED,
- xmlns = {
- @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS)
- }
-)
-@XmlAccessorType(XmlAccessType.FIELD)
-package org.jclouds.vcloud.director.v1_5.domain;
-
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CaptureVAppParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CaptureVAppParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CaptureVAppParams.java
deleted file mode 100644
index 603b5d4..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CaptureVAppParams.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.dmtf.ovf.DeploymentOptionSection;
-import org.jclouds.dmtf.ovf.DiskSection;
-import org.jclouds.dmtf.ovf.NetworkSection;
-import org.jclouds.dmtf.ovf.ProductSection;
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.dmtf.ovf.StartupSection;
-import org.jclouds.vcloud.director.v1_5.domain.Reference;
-import org.jclouds.vcloud.director.v1_5.domain.section.CustomizationSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-/**
- * Represents the parameters for capturing a vApp to a vApp template.
- */
-@XmlType(name = "CaptureVAppParams", propOrder = {
- "source",
- "sections"
-})
-@XmlRootElement(name = "CaptureVAppParams")
-public class CaptureVAppParams extends ParamsType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromCaptureVAppParams(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends ParamsType.Builder<B> {
-
- private Reference source;
- private Set<SectionType> sections = Sets.newLinkedHashSet();
-
- /**
- * @see CaptureVAppParams#getSource()
- */
- public B source(Reference source) {
- this.source = source;
- return self();
- }
-
- /**
- * Sets source to a new Reference that uses this URI as the href.
- *
- * @see CaptureVAppParams#getSource()
- */
- public B source(URI source) {
- this.source = Reference.builder().href(source).build();
- return self();
- }
-
- /**
- * @see CaptureVAppParams#getSections()
- */
- public B section(SectionType section) {
- this.sections.add(checkNotNull(section, "section"));
- return self();
- }
-
- /**
- * @see CaptureVAppParams#getSections()
- */
- public B sections(Iterable<? extends SectionType> sections) {
- this.sections = Sets.newLinkedHashSet(checkNotNull(sections, "sections"));
- return self();
- }
-
- @Override
- public CaptureVAppParams build() {
- return new CaptureVAppParams(this);
- }
-
- public B fromCaptureVAppParams(CaptureVAppParams in) {
- return fromParamsType(in)
- .source(in.getSource())
- .sections(in.getSections());
- }
- }
-
- private CaptureVAppParams(Builder<?> builder) {
- super(builder);
- this.source = builder.source;
- this.sections = builder.sections.isEmpty() ? null : ImmutableSet.copyOf(builder.sections);
- }
-
- private CaptureVAppParams() {
- // for JAXB
- }
-
- private CaptureVAppParams(Set<? extends SectionType> sections) {
- this.sections = ImmutableSet.copyOf(sections);
- }
-
- @XmlElement(name = "Source", required = true)
- protected Reference source;
- @XmlElementRefs({
- @XmlElementRef(type = VirtualHardwareSection.class),
- @XmlElementRef(type = LeaseSettingsSection.class),
-// @XmlElementRef(type = EulaSection.class),
- @XmlElementRef(type = RuntimeInfoSection.class),
-// @XmlElementRef(type = AnnotationSection.class),
- @XmlElementRef(type = DeploymentOptionSection.class),
- @XmlElementRef(type = StartupSection.class),
-// @XmlElementRef(type = ResourceAllocationSection.class),
- @XmlElementRef(type = NetworkConnectionSection.class),
- @XmlElementRef(type = CustomizationSection.class),
- @XmlElementRef(type = ProductSection.class),
- @XmlElementRef(type = GuestCustomizationSection.class),
- @XmlElementRef(type = OperatingSystemSection.class),
- @XmlElementRef(type = NetworkConfigSection.class),
- @XmlElementRef(type = NetworkSection.class),
-// @XmlElementRef(type = InstallSection.class),
- @XmlElementRef(type = DiskSection.class)
- })
- protected Set<SectionType> sections = Sets.newLinkedHashSet();
-
- /**
- * Gets the value of the source property.
- */
- public Reference getSource() {
- return source;
- }
-
- /**
- * An {@code ovf:Section} to configure the captured vAppTemplate.
- *
- * Objects of the following type(s) are allowed in the list:
- * <ul>
- * <li>{@link VirtualHardwareSectionType}
- * <li>{@link LeaseSettingsSectionType}
- * <li>{@link EulaSectionType}
- * <li>{@link RuntimeInfoSectionType}
- * <li>{@link AnnotationSectionType}
- * <li>{@link DeploymentOptionSectionType}
- * <li>{@link StartupSectionType}
- * <li>{@link ResourceAllocationSectionType}
- * <li>{@link NetworkConnectionSectionType}
- * <li>{@link CustomizationSectionType}
- * <li>{@link ProductSectionType}
- * <li>{@link GuestCustomizationSectionType}
- * <li>{@link OperatingSystemSectionType}
- * <li>{@link NetworkConfigSectionType}
- * <li>{@link NetworkSectionType}
- * <li>{@link DiskSectionType}
- * <li>{@link InstallSectionType}
- * </ul>
- */
- public Set<SectionType> getSections() {
- return sections != null ? ImmutableSet.copyOf(sections) : ImmutableSet.<SectionType>of();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- CaptureVAppParams that = CaptureVAppParams.class.cast(o);
- return equal(source, that.source)
- && equal(sections, that.sections);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(source,
- sections);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("")
- .add("source", source)
- .add("sections", sections).toString();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneMediaParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneMediaParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneMediaParams.java
deleted file mode 100644
index 1baa54a..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneMediaParams.java
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.domain.Reference;
-
-import com.google.common.base.Objects;
-
-
-/**
- * Represents parameters for copying a media resource and optionally
- * deleting the source.
- */
-@XmlRootElement(name = "CloneMediaParams")
-@XmlType(propOrder = {
- "source",
- "isSourceDelete"
-})
-public class CloneMediaParams extends ParamsType {
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromCloneMediaParams(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends ParamsType.Builder<B> {
-
- private Reference source;
- private Boolean isSourceDelete;
-
- /**
- * @see CloneMediaParams#getSource()
- */
- public B source(Reference source) {
- this.source = source;
- return self();
- }
-
- /**
- * @see CloneMediaParams#isSourceDelete()
- */
- public B isSourceDelete(Boolean isSourceDelete) {
- this.isSourceDelete = isSourceDelete;
- return self();
- }
-
- @Override
- public CloneMediaParams build() {
- return new CloneMediaParams(this);
- }
-
- public B fromCloneMediaParams(CloneMediaParams in) {
- return fromParamsType(in)
- .source(in.getSource())
- .isSourceDelete(in.isSourceDelete());
- }
- }
-
- private CloneMediaParams(Builder<?> builder) {
- super(builder);
- this.source = builder.source;
- isSourceDelete = builder.isSourceDelete;
- }
-
- private CloneMediaParams() {
- // for JAXB
- }
-
-
- @XmlElement(name = "Source", required = true)
- protected Reference source;
- @XmlElement(name = "IsSourceDelete")
- protected Boolean isSourceDelete;
-
- /**
- * Gets the value of the source property.
- *
- * @return possible object is
- * {@link Reference }
- */
- public Reference getSource() {
- return source;
- }
-
- /**
- * Gets the value of the isSourceDelete property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isSourceDelete() {
- return isSourceDelete;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- CloneMediaParams that = CloneMediaParams.class.cast(o);
- return equal(source, that.source) &&
- equal(isSourceDelete, that.isSourceDelete);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(source,
- isSourceDelete);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("")
- .add("source", source)
- .add("isSourceDelete", isSourceDelete).toString();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppParams.java
deleted file mode 100644
index 4e8cf3e..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppParams.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * Represents parameters for copying a vApp and optionally deleting the source.
- */
-@XmlType(name = "CloneVAppParams")
-@XmlRootElement(name = "CloneVAppParams")
-public class CloneVAppParams extends InstantiateVAppParams {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromCloneVAppParams(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends InstantiateVAppParams.Builder<B> {
-
- @SuppressWarnings("unchecked")
- @Override
- protected B self() {
- return (B) this;
- }
-
- @Override
- public CloneVAppParams build() {
- return new CloneVAppParams(this);
- }
-
- public B fromCloneVAppParams(CloneVAppParams in) {
- return fromInstantiateVAppParamsType(in);
- }
- }
-
- protected CloneVAppParams() {
- // For JAXB and B use
- }
-
- public CloneVAppParams(Builder<?> builder) {
- super(builder);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppTemplateParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppTemplateParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppTemplateParams.java
deleted file mode 100644
index 8912fb5..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/CloneVAppTemplateParams.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-
-import java.net.URI;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.domain.Reference;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-
-/**
- * Represents parameters for copying a vApp template and optionally
- * deleting the source.
- */
-@XmlType(name = "CloneVAppTemplateParams", propOrder = {
- "source",
- "isSourceDelete"
-})
-@XmlRootElement(name = "CloneVAppTemplateParams")
-public class CloneVAppTemplateParams extends ParamsType {
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromCloneVAppTemplateParams(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends ParamsType.Builder<B> {
-
- private Reference source;
- private Boolean isSourceDelete;
-
- @SuppressWarnings("unchecked")
- @Override
- protected B self() {
- return (B) this;
- }
-
- /**
- * @see CloneVAppTemplateParams#getSource()
- */
- public B source(Reference source) {
- this.source = source;
- return self();
- }
-
- /**
- * Sets source to a new Reference that uses this URI as the href.
- *
- * @see CloneVAppTemplateParams#getSource()
- */
- public B source(URI source) {
- this.source = Reference.builder().href(source).build();
- return self();
- }
-
- /**
- * @see CloneVAppTemplateParams#isSourceDelete()
- */
- public B isSourceDelete(Boolean isSourceDelete) {
- this.isSourceDelete = isSourceDelete;
- return self();
- }
-
- @Override
- public CloneVAppTemplateParams build() {
- return new CloneVAppTemplateParams(this);
- }
-
- public B fromCloneVAppTemplateParams(CloneVAppTemplateParams in) {
- return fromParamsType(in)
- .source(in.getSource())
- .isSourceDelete(in.isSourceDelete());
- }
- }
-
- protected CloneVAppTemplateParams(Builder<?> builder) {
- super(builder);
- this.source = builder.source;
- isSourceDelete = builder.isSourceDelete;
- }
-
- protected CloneVAppTemplateParams() {
- // for JAXB
- }
-
-
- @XmlElement(name = "Source", required = true)
- protected Reference source;
- @XmlElement(name = "IsSourceDelete")
- protected Boolean isSourceDelete;
-
- /**
- * Gets the value of the source property.
- */
- public Reference getSource() {
- return source;
- }
-
- /**
- * Gets the value of the isSourceDelete property.
- */
- public Boolean isSourceDelete() {
- return isSourceDelete;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- CloneVAppTemplateParams that = CloneVAppTemplateParams.class.cast(o);
- return super.equals(that) &&
- equal(this.source, that.source) &&
- equal(this.isSourceDelete, that.isSourceDelete);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), source, isSourceDelete);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("source", source)
- .add("isSourceDelete", isSourceDelete);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ComposeVAppParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ComposeVAppParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ComposeVAppParams.java
deleted file mode 100644
index f201974..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ComposeVAppParams.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Lists;
-
-/**
- * The vCloud API supports composing a vApp from any combination of vApp templates, vApps,
- * or virtual machines. When you compose a vApp, all children of each composition source
- * become peers in the Children collection of the composed vApp. To compose a vApp, a api
- * makes a compose vApp request whose body is a ComposeVAppParams element, includes the
- * following information:
- * <ul>
- * <li>An InstantiationParams element that applies to the composed vApp itself and any vApp templates referenced in
- * Item elements.
- * <li>A SourcedItem element for each virtual machine, vApp, or vAppTemplate to include in the composition. Each
- * SourcedItem can contain the following elements:
- * <ul>
- * <li>A required Source element whose href attribute value is a reference to a vApp template, vApp, or VM to include
- * in the composition. If the Source element references a VM, the Item must also include an InstantiationParams
- * element specific to that VM.
- * <li>An optional NetworkAssignment element that specifies how the network connections of child VM elements are
- * mapped to vApp networks in the parent.
- * </ul>
- * </ul>
- * If any of the composition items is subject to a EULA, the ComposeVAppParams element must include an
- * AllEULAsAccepted element that has a value of true, indicating that you accept the EULA. Otherwise, composition
- * fails.
- */
-@XmlRootElement(name = "ComposeVAppParams")
-@XmlType(name = "ComposeVAppParamsType")
-public class ComposeVAppParams extends VAppCreationParams {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromComposeVAppParams(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends VAppCreationParams.Builder<B> {
-
- private List<SourcedCompositionItemParam> sourcedItems = Lists.newArrayList();
- private Boolean allEULAsAccepted;
- private Boolean linkedClone;
-
- /**
- * @see ComposeVAppParams#getSourcedItems()
- */
- public B sourcedItems(List<SourcedCompositionItemParam> sourcedItems) {
- this.sourcedItems = Lists.newArrayList(checkNotNull(sourcedItems, "sourcedItems"));
- return self();
- }
-
- /**
- * @see ComposeVAppParams#getSourcedItem()
- */
- public B sourcedItem(SourcedCompositionItemParam sourcedItem) {
- this.sourcedItems.add(checkNotNull(sourcedItem, "sourcedItem"));
- return self();
- }
-
- /**
- * @see ComposeVAppParams#isAllEULAsAccepted()
- */
- public B allEULAsAccepted(Boolean allEULAsAccepted) {
- this.allEULAsAccepted = allEULAsAccepted;
- return self();
- }
-
- /**
- * @see ComposeVAppParams#isLinkedClone()
- */
- public B linkedClone(Boolean linkedClone) {
- this.linkedClone = linkedClone;
- return self();
- }
-
- @Override
- public ComposeVAppParams build() {
- return new ComposeVAppParams(this);
- }
-
- public B fromComposeVAppParams(ComposeVAppParams in) {
- return fromVAppCreationParamsType(in).sourcedItems(in.getSourcedItems()).allEULAsAccepted(in.isAllEULAsAccepted()).linkedClone(in.isLinkedClone());
- }
- }
-
- public ComposeVAppParams(Builder<?> builder) {
- super(builder);
- this.sourcedItems = ImmutableList.copyOf(builder.sourcedItems);
- this.allEULAsAccepted = builder.allEULAsAccepted;
- this.linkedClone = builder.linkedClone;
- }
-
- protected ComposeVAppParams() {
- // for JAXB
- }
-
- @XmlElement(name = "SourcedItem")
- protected List<SourcedCompositionItemParam> sourcedItems = Lists.newArrayList();
- @XmlElement(name = "AllEULAsAccepted")
- protected Boolean allEULAsAccepted;
- @XmlAttribute
- protected Boolean linkedClone;
-
- /**
- * Gets the value of the sourcedItems property.
- */
- public List<SourcedCompositionItemParam> getSourcedItems() {
- return ImmutableList.copyOf(sourcedItems);
- }
-
- /**
- * Used to confirm acceptance of all EULAs in a vApp template.
- *
- * Instantiation fails if this element is missing, empty, or set to
- * false and one or more EulaSection elements are present.
- */
- public Boolean isAllEULAsAccepted() {
- return allEULAsAccepted;
- }
-
- /**
- * Gets the value of the linkedClone property.
- */
- public Boolean isLinkedClone() {
- return linkedClone;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- ComposeVAppParams that = ComposeVAppParams.class.cast(o);
- return super.equals(that) &&
- equal(this.sourcedItems, that.sourcedItems) && equal(this.allEULAsAccepted, that.allEULAsAccepted) && equal(this.linkedClone, that.linkedClone);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), sourcedItems, allEULAsAccepted, linkedClone);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string().add("sourcedItems", sourcedItems).add("allEULAsAccepted", allEULAsAccepted).add("linkedClone", linkedClone);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java
deleted file mode 100644
index 7e109f1..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/ControlAccessParams.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.List;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlElementWrapper;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.domain.AccessSetting;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Sets;
-
-@XmlRootElement(name = "ControlAccessParams")
-@XmlType(name = "ControlAccessParamsType")
-public class ControlAccessParams {
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromControlAccessParams(this);
- }
-
- public static class Builder {
-
- private Boolean sharedToEveryone = Boolean.FALSE;
- private String everyoneAccessLevel;
- private Set<AccessSetting> accessSettings;
-
- /**
- * @see ControlAccessParams#getIsSharedToEveryone()
- */
- public Builder isSharedToEveryone(Boolean sharedToEveryone) {
- this.sharedToEveryone = sharedToEveryone;
- return this;
- }
-
- /**
- * @see ControlAccessParams#getIsSharedToEveryone()
- */
- public Builder sharedToEveryone() {
- this.sharedToEveryone = Boolean.TRUE;
- return this;
- }
-
- /**
- * @see ControlAccessParams#getIsSharedToEveryone()
- */
- public Builder notSharedToEveryone() {
- this.sharedToEveryone = Boolean.FALSE;
- return this;
- }
-
- /**
- * @see ControlAccessParams#getEveryoneAccessLevel()
- */
- public Builder everyoneAccessLevel(String everyoneAccessLevel) {
- this.everyoneAccessLevel = everyoneAccessLevel;
- return this;
- }
-
- /**
- * @see ControlAccessParams#getAccessSettings()
- */
- public Builder accessSettings(Iterable<AccessSetting> accessSettings) {
- this.accessSettings = Sets.newLinkedHashSet(checkNotNull(accessSettings));
- return this;
- }
-
- /**
- * @see ControlAccessParams#getAccessSettings()
- */
- public Builder accessSetting(AccessSetting accessSetting) {
- if (accessSettings == null) {
- accessSettings = Sets.newLinkedHashSet();
- }
- accessSettings.add(checkNotNull(accessSetting, "accessSetting"));
- return this;
- }
-
- public ControlAccessParams build() {
- ControlAccessParams controlAccessParams = new ControlAccessParams(sharedToEveryone, everyoneAccessLevel, accessSettings);
- return controlAccessParams;
- }
-
- public Builder fromControlAccessParams(ControlAccessParams in) {
- return isSharedToEveryone(in.isSharedToEveryone()).everyoneAccessLevel(in.getEveryoneAccessLevel()).accessSettings(in.getAccessSettings());
- }
- }
-
- protected ControlAccessParams() {
- // For JAXB and builder use
- }
-
- public ControlAccessParams(Boolean sharedToEveryone, String everyoneAccessLevel, Iterable<AccessSetting> accessSettings) {
- this.sharedToEveryone = sharedToEveryone;
- if (sharedToEveryone) {
- this.everyoneAccessLevel = checkNotNull(everyoneAccessLevel, "everyoneAccessLevel");
- this.accessSettings = null;
- } else {
- this.everyoneAccessLevel = null;
- this.accessSettings = Iterables.isEmpty(checkNotNull(accessSettings, "accessSettings")) ? null : ImmutableList.copyOf(accessSettings);
- }
- }
-
- @XmlElement(name = "IsSharedToEveryone", required = true)
- protected Boolean sharedToEveryone;
- @XmlElement(name = "EveryoneAccessLevel")
- protected String everyoneAccessLevel;
- @XmlElementWrapper(name = "AccessSettings")
- @XmlElement(name = "AccessSetting")
- protected List<AccessSetting> accessSettings;
-
- /**
- * If true, this means that the resource is shared with everyone in the organization.
- *
- * Defaults to false. Sharing settings must be manipulated through the organization.
- */
- public Boolean isSharedToEveryone() {
- return sharedToEveryone;
- }
-
- /**
- * If {@link #isSharedToEveryone()} is true, this element must be present and determines the access level.
- */
- public String getEveryoneAccessLevel() {
- return everyoneAccessLevel;
- }
-
- /**
- * The access settings to be applied if {@link #isSharedToEveryone()} is false.
- *
- * Required on create and edit if {@link #isSharedToEveryone()} is false.
- */
- public List<AccessSetting> getAccessSettings() {
- return accessSettings == null ? ImmutableList.<AccessSetting>of() : accessSettings;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- ControlAccessParams that = ControlAccessParams.class.cast(o);
- return equal(this.sharedToEveryone, that.sharedToEveryone) && equal(this.everyoneAccessLevel, that.everyoneAccessLevel) && equal(this.accessSettings, that.accessSettings);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(sharedToEveryone, everyoneAccessLevel, accessSettings);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("").add("sharedToEveryone", sharedToEveryone).add("everyoneAccessLevel", everyoneAccessLevel).add("accessSettings", accessSettings).toString();
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/DeployVAppParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/DeployVAppParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/DeployVAppParams.java
deleted file mode 100644
index b50c930..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/DeployVAppParams.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-
-/**
- * Represents vApp/VM deployment parameters.
- */
-@XmlRootElement(name = "DeployVAppParams")
-@XmlType(name = "DeployVAppParamsType")
-public class DeployVAppParams {
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromDeployVAppParams(this);
- }
-
- public static class Builder {
-
- private Boolean powerOn = Boolean.TRUE;
- private Integer deploymentLeaseSeconds;
- private Boolean forceCustomization = Boolean.FALSE;
-
- /**
- * @see DeployVAppParams#isPowerOn()
- */
- public Builder powerOn(Boolean powerOn) {
- this.powerOn = powerOn;
- return this;
- }
-
- /**
- * @see DeployVAppParams#isPowerOn()
- */
- public Builder powerOn() {
- this.powerOn = Boolean.TRUE;
- return this;
- }
-
- /**
- * @see DeployVAppParams#isPowerOn()
- */
- public Builder notPowerOn() {
- this.powerOn = Boolean.FALSE;
- return this;
- }
-
- /**
- * @see DeployVAppParams#getDeploymentLeaseSeconds()
- */
- public Builder deploymentLeaseSeconds(Integer deploymentLeaseSeconds) {
- this.deploymentLeaseSeconds = deploymentLeaseSeconds;
- return this;
- }
-
- /**
- * @see DeployVAppParams#isForceCustomization()
- */
- public Builder forceCustomization(Boolean forceCustomization) {
- this.forceCustomization = forceCustomization;
- return this;
- }
-
- /**
- * @see DeployVAppParams#isForceCustomization()
- */
- public Builder forceCustomization() {
- this.forceCustomization = Boolean.TRUE;
- return this;
- }
-
- /**
- * @see DeployVAppParams#isForceCustomization()
- */
- public Builder notForceCustomization() {
- this.forceCustomization = Boolean.FALSE;
- return this;
- }
-
- public DeployVAppParams build() {
- DeployVAppParams deployVAppParams = new DeployVAppParams(powerOn, deploymentLeaseSeconds, forceCustomization);
- return deployVAppParams;
- }
-
- public Builder fromDeployVAppParams(DeployVAppParams in) {
- return powerOn(in.isPowerOn()).deploymentLeaseSeconds(in.getDeploymentLeaseSeconds()).forceCustomization(in.isForceCustomization());
- }
- }
-
- protected DeployVAppParams() {
- // For JAXB and builder use
- }
-
- public DeployVAppParams(Boolean powerOn, Integer deploymentLeaseSeconds, Boolean forceCustomization) {
- this.powerOn = powerOn;
- this.deploymentLeaseSeconds = deploymentLeaseSeconds;
- this.forceCustomization = forceCustomization;
- }
-
- @XmlAttribute
- protected Boolean powerOn;
- @XmlAttribute
- protected Integer deploymentLeaseSeconds;
- @XmlAttribute
- protected Boolean forceCustomization;
-
- /**
- * Used to specify whether to power on vapp on deployment, if not set default value is true.
- */
- public Boolean isPowerOn() {
- return powerOn;
- }
-
- public void setPowerOn(Boolean value) {
- this.powerOn = value;
- }
-
- /**
- * Lease in seconds for deployment.
- */
- public Integer getDeploymentLeaseSeconds() {
- return deploymentLeaseSeconds;
- }
-
- public void setDeploymentLeaseSeconds(Integer value) {
- this.deploymentLeaseSeconds = value;
- }
-
- /**
- * Used to specify whether to force customization on deployment, if not set default value is false.
- */
- public Boolean isForceCustomization() {
- return forceCustomization;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- DeployVAppParams that = DeployVAppParams.class.cast(o);
- return equal(powerOn, that.powerOn) && equal(deploymentLeaseSeconds, that.deploymentLeaseSeconds) && equal(forceCustomization, that.forceCustomization);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(powerOn, deploymentLeaseSeconds, forceCustomization);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("").add("powerOn", powerOn).add("deploymentLeaseSeconds", deploymentLeaseSeconds).add("forceCustomization", forceCustomization).toString();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppParams.java
deleted file mode 100644
index b0b52d7..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppParams.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-
-import java.net.URI;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
-import org.jclouds.vcloud.director.v1_5.domain.Reference;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "InstantiateVAppParams")
-@XmlType(name = "InstantiateVAppParamsType")
-public class InstantiateVAppParams extends VAppCreationParams {
-
- public static final String MEDIA_TYPe = VCloudDirectorMediaType.INSTANTIATE_VAPP_TEMPLATE_PARAMS;
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromInstantiateVAppParamsType(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends VAppCreationParams.Builder<B> {
-
- private Reference source;
- private Boolean sourceDelete;
- private Boolean linkedClone;
-
- @SuppressWarnings("unchecked")
- @Override
- protected B self() {
- return (B) this;
- }
-
- /**
- * @see InstantiateVAppParamsType#getSource()
- */
- public B source(Reference source) {
- this.source = source;
- return self();
- }
-
- /**
- * Sets source to a new Reference that uses this URI as the href.
- *
- * @see InstantiateVAppParamsType#getSource()
- */
- public B source(URI source) {
- this.source = Reference.builder().href(source).build();
- return self();
- }
-
- /**
- * @see InstantiateVAppParamsType#isSourceDelete()
- */
- public B isSourceDelete(Boolean sourceDelete) {
- this.sourceDelete = sourceDelete;
- return self();
- }
-
- /**
- * @see InstantiateVAppParamsType#isSourceDelete()
- */
- public B sourceDelete() {
- this.sourceDelete = Boolean.TRUE;
- return self();
- }
-
- /**
- * @see InstantiateVAppParamsType#isSourceDelete()
- */
- public B notSourceDelete() {
- this.sourceDelete = Boolean.FALSE;
- return self();
- }
-
- /**
- * @see InstantiateVAppParamsType#isLinkedClone()
- */
- public B isLinkedClone(Boolean linkedClone) {
- this.linkedClone = linkedClone;
- return self();
- }
-
- /**
- * @see InstantiateVAppParamsType#isLinkedClone()
- */
- public B linkedClone() {
- this.linkedClone = Boolean.TRUE;
- return self();
- }
-
- /**
- * @see InstantiateVAppParamsType#isLinkedClone()
- */
- public B notLinkedClone() {
- this.linkedClone = Boolean.FALSE;
- return self();
- }
-
- @Override
- public InstantiateVAppParams build() {
- return new InstantiateVAppParams(this);
- }
-
- public B fromInstantiateVAppParamsType(InstantiateVAppParams in) {
- return fromVAppCreationParamsType(in)
- .source(in.getSource())
- .isSourceDelete(in.isSourceDelete())
- .isLinkedClone(in.isLinkedClone());
- }
- }
-
- protected InstantiateVAppParams() {
- // For JAXB and builder use
- }
-
- public InstantiateVAppParams(Builder<?> builder) {
- super(builder);
- this.source = builder.source;
- this.sourceDelete = builder.sourceDelete;
- this.linkedClone = builder.linkedClone;
- }
-
- @XmlElement(name = "Source", required = true)
- private Reference source;
- @XmlElement(name = "IsSourceDelete")
- private Boolean sourceDelete;
- @XmlAttribute
- private Boolean linkedClone;
-
- /**
- * Gets the value of the source property.
- */
- public Reference getSource() {
- return source;
- }
-
- /**
- * Gets the value of the isSourceDelete property.
- */
- public Boolean isSourceDelete() {
- return sourceDelete;
- }
-
- /**
- * Gets the value of the linkedClone property.
- */
- public Boolean isLinkedClone() {
- return linkedClone;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- InstantiateVAppParams that = InstantiateVAppParams.class.cast(o);
- return super.equals(that) &&
- equal(this.source, that.source) &&
- equal(this.sourceDelete, that.sourceDelete) &&
- equal(this.linkedClone, that.linkedClone);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), source, sourceDelete, linkedClone);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("source", source)
- .add("isSourceDelete", sourceDelete)
- .add("linkedClone", linkedClone);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppTemplateParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppTemplateParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppTemplateParams.java
deleted file mode 100644
index b67a5f1..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiateVAppTemplateParams.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "InstantiateVAppTemplateParams")
-public class InstantiateVAppTemplateParams extends InstantiateVAppParams {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromInstantiateVAppTemplateParams(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public abstract static class Builder<B extends Builder<B>> extends InstantiateVAppParams.Builder<B> {
-
- private Boolean allEULAsAccepted;
-
- /**
- * @see InstantiateVAppTemplateParams#isAllEULAsAccepted()
- */
- public B allEULAsAccepted(Boolean allEULAsAccepted) {
- this.allEULAsAccepted = allEULAsAccepted;
- return self();
- }
-
- @Override
- public InstantiateVAppTemplateParams build() {
- return new InstantiateVAppTemplateParams(this);
- }
-
- public B fromInstantiateVAppTemplateParams(InstantiateVAppTemplateParams in) {
- return fromInstantiateVAppParamsType(in).allEULAsAccepted(in.isAllEULAsAccepted());
- }
- }
-
- protected InstantiateVAppTemplateParams(Builder<?> builder) {
- super(builder);
- this.allEULAsAccepted = builder.allEULAsAccepted;
- }
-
- protected InstantiateVAppTemplateParams() {
- // for JAXB
- }
-
-
- @XmlElement(name = "AllEULAsAccepted")
- protected Boolean allEULAsAccepted;
-
- /**
- * Used to confirm acceptance of all EULAs in a
- * vApp template. Instantiation fails if this
- * element is missing, empty, or set to false
- * and one or more EulaSection elements are
- * present.
- */
- public Boolean isAllEULAsAccepted() {
- return allEULAsAccepted;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- InstantiateVAppTemplateParams that = InstantiateVAppTemplateParams.class.cast(o);
- return super.equals(that) && equal(this.allEULAsAccepted, that.allEULAsAccepted);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), allEULAsAccepted);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string().add("allEULAsAccepted", allEULAsAccepted);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiationParams.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiationParams.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiationParams.java
deleted file mode 100644
index 913cc9a..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/params/InstantiationParams.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF 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.vcloud.director.v1_5.domain.params;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElementRef;
-import javax.xml.bind.annotation.XmlElementRefs;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.dmtf.ovf.DeploymentOptionSection;
-import org.jclouds.dmtf.ovf.DiskSection;
-import org.jclouds.dmtf.ovf.NetworkSection;
-import org.jclouds.dmtf.ovf.ProductSection;
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.dmtf.ovf.StartupSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.CustomizationSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
-import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-@XmlRootElement(name = "InstantiationParams")
-@XmlType(name = "InstantiationParamsType")
-public class InstantiationParams {
-
- public static Builder builder() {
- return new Builder();
- }
-
- public Builder toBuilder() {
- return new Builder().fromInstantiationParams(this);
- }
-
- public static class Builder {
- private Set<SectionType> sections = Sets.newLinkedHashSet();
-
- /**
- * @see InstantiationParams#getSections()
- */
- public Builder sections(Iterable<? extends SectionType> sections) {
- this.sections = Sets.newLinkedHashSet(checkNotNull(sections, "sections"));
- return this;
- }
-
- /**
- * @see InstantiationParams#getSections()
- */
- public Builder section(SectionType section) {
- this.sections.add(checkNotNull(section, "section"));
- return this;
- }
-
- public InstantiationParams build() {
- InstantiationParams instantiationParams = new InstantiationParams(sections);
- return instantiationParams;
- }
-
- public Builder fromInstantiationParams(InstantiationParams in) {
- return sections(in.getSections());
- }
- }
-
- private InstantiationParams() {
- // for JAXB
- }
-
- private InstantiationParams(Set<? extends SectionType> sections) {
- this.sections = sections.isEmpty() ? null : ImmutableSet.copyOf(sections);
- }
-
- @XmlElementRefs({
- @XmlElementRef(type = VirtualHardwareSection.class),
- @XmlElementRef(type = LeaseSettingsSection.class),
-// @XmlElementRef(type = EulaSection.class),
- @XmlElementRef(type = RuntimeInfoSection.class),
-// @XmlElementRef(type = AnnotationSection.class),
- @XmlElementRef(type = DeploymentOptionSection.class),
- @XmlElementRef(type = StartupSection.class),
-// @XmlElementRef(type = ResourceAllocationSection.class),
- @XmlElementRef(type = NetworkConnectionSection.class),
- @XmlElementRef(type = CustomizationSection.class),
- @XmlElementRef(type = ProductSection.class),
- @XmlElementRef(type = GuestCustomizationSection.class),
- @XmlElementRef(type = OperatingSystemSection.class),
- @XmlElementRef(type = NetworkConfigSection.class),
- @XmlElementRef(type = NetworkSection.class),
-// @XmlElementRef(type = InstallSection.class),
- @XmlElementRef(type = DiskSection.class)
- })
- protected Set<SectionType> sections = Sets.newLinkedHashSet();
-
- /**
- * An {@code ovf:Section} to configure for instantiation.
- *
- * Objects of the following type(s) are allowed in the list:
- * <ul>
- * <li>{@link VirtualHardwareSection}
- * <li>{@link LeaseSettingsSection}
- * <li>{@link EulaSection}
- * <li>{@link RuntimeInfoSection}
- * <li>{@link AnnotationSection}
- * <li>{@link DeploymentOptionSection}
- * <li>{@link StartupSection}
- * <li>{@link ResourceAllocationSection}
- * <li>{@link NetworkConnectionSection}
- * <li>{@link CustomizationSection}
- * <li>{@link ProductSection}
- * <li>{@link GuestCustomizationSection}
- * <li>{@link OperatingSystemSection}
- * <li>{@link NetworkConfigSection}
- * <li>{@link NetworkSection}
- * <li>{@link DiskSection}
- * <li>{@link InstallSection}
- * </ul>
- */
- public Set<SectionType> getSections() {
- return sections != null ? ImmutableSet.copyOf(sections) : ImmutableSet.<SectionType>of();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- InstantiationParams that = InstantiationParams.class.cast(o);
- return equal(this.sections, that.sections);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(sections);
- }
-
- @Override
- public String toString() {
- return Objects.toStringHelper("").add("sections", sections).toString();
- }
-
-}