networks;
-
- /**
- * Gets the value of the network property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the network property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getNetwork().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link ReferenceType }
- *
- *
- */
- public List getNetworks() {
- if (networks == null) {
- networks = Lists.newArrayList();
- }
- return this.networks;
- }
+ /**
+ * Gets the value of the network property.
+ */
+ public Set getNetworks() {
+ return this.networks;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
AvailableNetworks that = AvailableNetworks.class.cast(o);
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java
index 7c8c8b6770..b6b21fa2e0 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Capabilities.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -30,14 +28,13 @@ import com.google.common.base.Objects;
/**
- *
- * Collection of supported hardware capabilities.
- *
- *
+ * Collection of supported hardware capabilities.
+ *
+ *
* Java class for Capabilities complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="Capabilities">
* <complexContent>
@@ -50,12 +47,9 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Capabilities", propOrder = {
- "supportedHardwareVersions"
+ "supportedHardwareVersions"
})
public class Capabilities {
public static Builder builder() {
@@ -67,7 +61,7 @@ public class Capabilities {
}
public static class Builder {
-
+
private SupportedHardwareVersions supportedHardwareVersions;
/**
@@ -80,9 +74,7 @@ public class Capabilities {
public Capabilities build() {
- Capabilities capabilities = new Capabilities();
- capabilities.setSupportedHardwareVersions(supportedHardwareVersions);
- return capabilities;
+ return new Capabilities(supportedHardwareVersions);
}
@@ -91,43 +83,32 @@ public class Capabilities {
}
}
+ private Capabilities(SupportedHardwareVersions supportedHardwareVersions) {
+ this.supportedHardwareVersions = supportedHardwareVersions;
+ }
+
private Capabilities() {
- // For JAXB and builder use
+ // For JAXB
}
+ @XmlElement(name = "SupportedHardwareVersions")
+ protected SupportedHardwareVersions supportedHardwareVersions;
- @XmlElement(name = "SupportedHardwareVersions")
- protected SupportedHardwareVersions supportedHardwareVersions;
-
- /**
- * Gets the value of the supportedHardwareVersions property.
- *
- * @return
- * possible object is
- * {@link SupportedHardwareVersions }
- *
- */
- public SupportedHardwareVersions getSupportedHardwareVersions() {
- return supportedHardwareVersions;
- }
-
- /**
- * Sets the value of the supportedHardwareVersions property.
- *
- * @param value
- * allowed object is
- * {@link SupportedHardwareVersions }
- *
- */
- public void setSupportedHardwareVersions(SupportedHardwareVersions value) {
- this.supportedHardwareVersions = value;
- }
+ /**
+ * Gets the value of the supportedHardwareVersions property.
+ *
+ * @return possible object is
+ * {@link SupportedHardwareVersions }
+ */
+ public SupportedHardwareVersions getSupportedHardwareVersions() {
+ return supportedHardwareVersions;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
Capabilities that = Capabilities.class.cast(o);
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityType.java
index b6e968103f..887410d52e 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityType.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityType.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
@@ -31,14 +29,13 @@ import com.google.common.base.Objects;
/**
- *
- * Represents a capacity of a given resource.
- *
- *
+ * Represents a capacity of a given resource.
+ *
+ *
* Java class for Capacity complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="Capacity">
* <complexContent>
@@ -53,20 +50,17 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Capacity", propOrder = {
- "units",
- "allocated",
- "limit"
+ "units",
+ "allocated",
+ "limit"
})
@XmlSeeAlso({
-// CapacityWithUsageType.class
+ CapacityWithUsage.class
})
public class CapacityType> {
-
+
public static > Builder builder() {
return new Builder();
}
@@ -76,7 +70,7 @@ public class CapacityType> {
}
public static class Builder> {
-
+
protected String units;
protected Long allocated;
protected Long limit;
@@ -107,119 +101,78 @@ public class CapacityType> {
public CapacityType build() {
- CapacityType capacity = new CapacityType();
- capacity.setUnits(units);
- capacity.setAllocated(allocated);
- capacity.setLimit(limit);
- return capacity;
+ return new CapacityType(units, allocated, limit);
}
public Builder fromCapacityType(CapacityType in) {
return units(in.getUnits())
- .allocated(in.getAllocated())
- .limit(in.getLimit());
+ .allocated(in.getAllocated())
+ .limit(in.getLimit());
}
}
+ protected CapacityType(String units, Long allocated, Long limit) {
+ this.units = units;
+ this.allocated = allocated;
+ this.limit = limit;
+ }
+
protected CapacityType() {
// For JAXB and builder use
}
-
- protected CapacityType(String units) {
- this.units = units;
+
+ @XmlElement(name = "Units", required = true)
+ protected String units;
+ @XmlElement(name = "Allocated")
+ protected Long allocated;
+ @XmlElement(name = "Limit")
+ protected Long limit;
+
+ /**
+ * Gets the value of the units property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getUnits() {
+ return units;
}
+ /**
+ * Gets the value of the allocated property.
+ *
+ * @return possible object is
+ * {@link Long }
+ */
+ public Long getAllocated() {
+ return allocated;
+ }
-
- @XmlElement(name = "Units", required = true)
- protected String units;
- @XmlElement(name = "Allocated")
- protected Long allocated;
- @XmlElement(name = "Limit")
- protected Long limit;
-
- /**
- * Gets the value of the units property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getUnits() {
- return units;
- }
-
- /**
- * Sets the value of the units property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setUnits(String value) {
- this.units = value;
- }
-
- /**
- * Gets the value of the allocated property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- public Long getAllocated() {
- return allocated;
- }
-
- /**
- * Sets the value of the allocated property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setAllocated(Long value) {
- this.allocated = value;
- }
-
- /**
- * Gets the value of the limit property.
- *
- */
- public Long getLimit() {
- return limit;
- }
-
- /**
- * Sets the value of the limit property.
- *
- */
- public void setLimit(Long value) {
- this.limit = value;
- }
+ /**
+ * Gets the value of the limit property.
+ */
+ public Long getLimit() {
+ return limit;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
CapacityType> that = CapacityType.class.cast(o);
- return equal(units, that.units) &&
- equal(allocated, that.allocated) &&
- equal(limit, that.limit);
+ return equal(units, that.units) &&
+ equal(allocated, that.allocated) &&
+ equal(limit, that.limit);
}
@Override
public int hashCode() {
- return Objects.hashCode(units,
- allocated,
- limit);
+ return Objects.hashCode(units,
+ allocated,
+ limit);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityWithUsage.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityWithUsage.java
index f80e445147..2c4ad4dd91 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityWithUsage.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CapacityWithUsage.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -30,14 +28,13 @@ import com.google.common.base.Objects;
/**
- *
- * Represents a capacity and usage of a given resource.
- *
- *
+ * Represents a capacity and usage of a given resource.
+ *
+ *
* Java class for CapacityWithUsage complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="CapacityWithUsage">
* <complexContent>
@@ -51,13 +48,10 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CapacityWithUsage", propOrder = {
- "used",
- "overhead"
+ "used",
+ "overhead"
})
public class CapacityWithUsage extends CapacityType
@@ -72,7 +66,7 @@ public class CapacityWithUsage extends CapacityType
}
public static class Builder extends CapacityType.Builder {
-
+
private Long used;
private Long overhead;
@@ -91,15 +85,10 @@ public class CapacityWithUsage extends CapacityType
this.overhead = overhead;
return this;
}
-
+
public CapacityWithUsage build() {
- CapacityWithUsage capacityWithUsage = new CapacityWithUsage(units);
- capacityWithUsage.setUsed(used);
- capacityWithUsage.setOverhead(overhead);
- capacityWithUsage.setAllocated(allocated);
- capacityWithUsage.setLimit(limit);
- return capacityWithUsage;
+ return new CapacityWithUsage(units, allocated, limit, used, overhead);
}
/**
@@ -125,96 +114,70 @@ public class CapacityWithUsage extends CapacityType
this.limit = limit;
return this;
}
-
+
@Override
public Builder fromCapacityType(CapacityType in) {
- return Builder.class.cast(super.fromCapacityType(in));
+ return Builder.class.cast(super.fromCapacityType(in));
}
+
public Builder fromCapacityWithUsage(CapacityWithUsage in) {
return fromCapacityType(in)
- .used(in.getUsed())
- .overhead(in.getOverhead());
+ .used(in.getUsed())
+ .overhead(in.getOverhead());
}
}
- protected CapacityWithUsage() {
+ private CapacityWithUsage(String units, Long allocated, Long limit, Long used, Long overhead) {
+ super(units, allocated, limit);
+ this.used = used;
+ this.overhead = overhead;
+ }
+
+ private CapacityWithUsage() {
// For JAXB and builder use
}
- public CapacityWithUsage(String units) {
- super(units);
+ @XmlElement(name = "Used")
+ protected Long used;
+ @XmlElement(name = "Overhead")
+ protected Long overhead;
+
+ /**
+ * Gets the value of the used property.
+ *
+ * @return possible object is
+ * {@link Long }
+ */
+ public Long getUsed() {
+ return used;
}
-
- @XmlElement(name = "Used")
- protected Long used;
- @XmlElement(name = "Overhead")
- protected Long overhead;
-
- /**
- * Gets the value of the used property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- public Long getUsed() {
- return used;
- }
-
- /**
- * Sets the value of the used property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setUsed(Long value) {
- this.used = value;
- }
-
- /**
- * Gets the value of the overhead property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- public Long getOverhead() {
- return overhead;
- }
-
- /**
- * Sets the value of the overhead property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setOverhead(Long value) {
- this.overhead = value;
- }
+ /**
+ * Gets the value of the overhead property.
+ *
+ * @return possible object is
+ * {@link Long }
+ */
+ public Long getOverhead() {
+ return overhead;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
CapacityWithUsage that = CapacityWithUsage.class.cast(o);
- return equal(used, that.used) &&
- equal(overhead, that.overhead);
+ return equal(used, that.used) &&
+ equal(overhead, that.overhead);
}
@Override
public int hashCode() {
- return Objects.hashCode(used,
- overhead);
+ return Objects.hashCode(used,
+ overhead);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CaptureVAppParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CaptureVAppParams.java
index 2fd98e8812..32b9c72159 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CaptureVAppParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CaptureVAppParams.java
@@ -20,13 +20,10 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
+import static com.google.common.base.Preconditions.checkNotNull;
-import java.util.ArrayList;
-import java.util.List;
-
+import java.util.Set;
import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
@@ -40,17 +37,18 @@ import org.jclouds.ovf.VirtualHardwareSection;
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
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.
- *
- *
+ * Represents the parameters for capturing a vApp to a vApp template.
+ *
+ *
* Java class for CaptureVAppParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="CaptureVAppParams">
* <complexContent>
@@ -64,16 +62,13 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CaptureVAppParams", propOrder = {
- "source",
- "section"
+ "source",
+ "section"
})
public class CaptureVAppParams
- extends ParamsType
+ extends ParamsType
{
@SuppressWarnings("unchecked")
@@ -86,9 +81,9 @@ public class CaptureVAppParams
}
public static class Builder extends ParamsType.Builder {
-
+
private Reference source;
- private List>> sections;
+ private Set extends Section>> sections = ImmutableSet.of();
/**
* @see CaptureVAppParams#getSource()
@@ -101,130 +96,115 @@ public class CaptureVAppParams
/**
* @see CaptureVAppParams#getSections()
*/
- public Builder sections(List>> sections) {
- this.sections = sections;
+ public Builder sections(Set extends Section>> sections) {
+ this.sections = checkNotNull(sections, "sections");
return this;
}
public CaptureVAppParams build() {
- CaptureVAppParams captureVAppParams = new CaptureVAppParams(sections);
- captureVAppParams.setSource(source);
- return captureVAppParams;
+ return new CaptureVAppParams(description, name, source, sections);
}
@Override
public Builder fromParamsType(ParamsType in) {
- return Builder.class.cast(super.fromParamsType(in));
+ return Builder.class.cast(super.fromParamsType(in));
}
+
public Builder fromCaptureVAppParams(CaptureVAppParams in) {
return fromParamsType(in)
- .source(in.getSource())
- .sections(in.getSections());
+ .source(in.getSource())
+ .sections(in.getSections());
}
}
+ private CaptureVAppParams(String description, String name, Reference source, Set extends Section>> sections) {
+ super(description, name);
+ this.source = source;
+ this.sections = sections;
+ }
+
private CaptureVAppParams() {
// For JAXB and builder use
}
- private CaptureVAppParams(List>> sections) {
- this.sections = sections;
+ private CaptureVAppParams(Set extends Section>> sections) {
+ this.sections = ImmutableSet.copyOf(sections);
}
- @XmlElement(name = "Source", required = true)
- protected Reference source;
- @XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/envelope/1", type = JAXBElement.class)
- protected List>> sections;
+ @XmlElement(name = "Source", required = true)
+ protected Reference source;
+ @XmlElementRef
+ protected Set extends Section>> sections = Sets.newLinkedHashSet();
- /**
- * Gets the value of the source property.
- *
- * @return
- * possible object is
- * {@link Reference }
- *
- */
- public Reference getSource() {
- return source;
- }
+ /**
+ * Gets the value of the source property.
+ *
+ * @return possible object is
+ * {@link Reference }
+ */
+ public Reference getSource() {
+ return source;
+ }
- /**
- * Sets the value of the source property.
- *
- * @param value
- * allowed object is
- * {@link Reference }
- *
- */
- public void setSource(Reference value) {
- this.source = value;
- }
-
- /**
- *
- * An ovf:Section to configure the captured vAppTemplate.
- * Gets the value of the section property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the section property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getSection().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link Section> }{@code >}
- * {@link JAXBElement }{@code <}{@link VirtualHardwareSection > }{@code >}
- * {@link JAXBElement }{@code <}{@link LeaseSettingsSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link EulaSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link RuntimeInfoSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link AnnotationSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link DeploymentOptionSection > }{@code >}
- * {@link JAXBElement }{@code <}{@link StartupSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link ResourceAllocationSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link NetworkConnectionSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link CustomizationSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link ProductSection > }{@code >}
- * {@link JAXBElement }{@code <}{@link GuestCustomizationSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link OperatingSystemSection > }{@code >}
- * {@link JAXBElement }{@code <}{@link NetworkConfigSection> }{@code >}
- * {@link JAXBElement }{@code <}{@link NetworkSection > }{@code >}
- * {@link JAXBElement }{@code <}{@link DiskSection > }{@code >}
- * {@link JAXBElement }{@code <}{@link InstallSection> }{@code >}
- *
- *
- */
- public List>> getSections() {
- if (sections == null) {
- sections = new ArrayList>>();
- }
- return this.sections;
- }
+ /**
+ * An ovf:Section to configure the captured vAppTemplate.
+ * Gets the value of the section property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set
method for the section property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getSection().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link JAXBElement }{@code <}{@link Section> }{@code >}
+ * {@link JAXBElement }{@code <}{@link VirtualHardwareSection > }{@code >}
+ * {@link JAXBElement }{@code <}{@link LeaseSettingsSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link EulaSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link RuntimeInfoSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link AnnotationSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link DeploymentOptionSection > }{@code >}
+ * {@link JAXBElement }{@code <}{@link StartupSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link ResourceAllocationSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link NetworkConnectionSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link CustomizationSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link ProductSection > }{@code >}
+ * {@link JAXBElement }{@code <}{@link GuestCustomizationSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link OperatingSystemSection > }{@code >}
+ * {@link JAXBElement }{@code <}{@link NetworkConfigSection> }{@code >}
+ * {@link JAXBElement }{@code <}{@link NetworkSection > }{@code >}
+ * {@link JAXBElement }{@code <}{@link DiskSection > }{@code >}
+ * {@link JAXBElement }{@code <}{@link InstallSection> }{@code >}
+ */
+ public Set extends Section>> getSections() {
+ return this.sections;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ 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);
+ return equal(source, that.source) &&
+ equal(sections, that.sections);
}
@Override
public int hashCode() {
- return Objects.hashCode(source,
+ return Objects.hashCode(source,
sections);
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java
index c7d0d92773..4495669a1d 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Catalog.java
@@ -19,11 +19,9 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.net.URI;
import java.util.Set;
-
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -33,14 +31,14 @@ import com.google.common.collect.Sets;
/**
* Container for references to VappTemplate and Media objects.
- *
+ *
*
* <complexType name="CatalogType" />
*
*
* @author grkvlt@apache.org
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Catalog")
+@XmlRootElement(name = "Catalog")
public class Catalog extends EntityType {
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG;
@@ -95,16 +93,7 @@ public class Catalog extends EntityType {
@Override
public Catalog build() {
- Catalog catalog = new Catalog(href, name);
- catalog.setOwner(owner);
- catalog.setCatalogItems(catalogItems);
- catalog.setIsPublished(isPublished);
- catalog.setDescription(description);
- catalog.setId(id);
- catalog.setType(type);
- catalog.setLinks(links);
- catalog.setTasksInProgress(tasksInProgress);
- return catalog;
+ return new Catalog(href, type, links, description, tasksInProgress, id, name, owner, catalogItems, isPublished);
}
/**
@@ -162,7 +151,7 @@ public class Catalog extends EntityType {
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder links(Set links) {
@@ -171,7 +160,7 @@ public class Catalog extends EntityType {
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder link(Link link) {
@@ -189,12 +178,16 @@ public class Catalog extends EntityType {
}
}
- private Catalog() {
- // For JAXB and builder use
+ public Catalog(URI href, String type, Set links, String description, TasksInProgress tasksInProgress, String id,
+ String name, Entity owner, CatalogItems catalogItems, Boolean published) {
+ super(href, type, links, description, tasksInProgress, id, name);
+ this.owner = owner;
+ this.catalogItems = catalogItems;
+ this.isPublished = published;
}
- private Catalog(URI href, String name) {
- super(href, name);
+ private Catalog() {
+ // For JAXB and builder use
}
@XmlElement(name = "Owner")
@@ -211,10 +204,6 @@ public class Catalog extends EntityType {
return owner;
}
- public void setOwner(Entity value) {
- this.owner = value;
- }
-
/**
* Gets the value of the catalogItems property.
*/
@@ -222,10 +211,6 @@ public class Catalog extends EntityType {
return catalogItems;
}
- public void setCatalogItems(CatalogItems value) {
- this.catalogItems = value;
- }
-
/**
* Gets the value of the isPublished property.
*/
@@ -233,7 +218,4 @@ public class Catalog extends EntityType {
return isPublished;
}
- public void setIsPublished(Boolean value) {
- this.isPublished = value;
- }
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItem.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItem.java
index 4d42e39cc8..7720193d3b 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItem.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItem.java
@@ -19,31 +19,27 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.net.URI;
-import java.util.List;
+import java.util.Collections;
import java.util.Set;
-
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
-import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
/**
- *
* Contains a reference to a VappTemplate or Media object and related metadata.
- *
+ *
*
* <complexType name="CatalogItemType" />
*
*
* @author grkvlt@apache.org
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "CatalogItem")
+@XmlRootElement(name = "CatalogItem")
public class CatalogItem extends EntityType {
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG_ITEM;
@@ -61,7 +57,7 @@ public class CatalogItem extends EntityType {
public static class Builder extends EntityType.Builder {
private Reference entity;
- private List properties = Lists.newArrayList();
+ private Set properties = Sets.newLinkedHashSet();
/**
* @see CatalogItem#getEntity()
@@ -74,8 +70,8 @@ public class CatalogItem extends EntityType {
/**
* @see CatalogItem#getProperties()
*/
- public Builder properties(List properties) {
- this.properties = Lists.newArrayList(checkNotNull(properties, "properties"));
+ public Builder properties(Set properties) {
+ this.properties = Sets.newLinkedHashSet(checkNotNull(properties, "properties"));
return this;
}
@@ -89,14 +85,7 @@ public class CatalogItem extends EntityType {
@Override
public CatalogItem build() {
- CatalogItem catalog = new CatalogItem(href, name, entity);
- catalog.setProperties(properties);
- catalog.setDescription(description);
- catalog.setId(id);
- catalog.setType(type);
- catalog.setLinks(links);
- catalog.setTasksInProgress(tasksInProgress);
- return catalog;
+ return new CatalogItem(href, type, links, description, tasksInProgress, id, name, entity, properties);
}
/**
@@ -154,7 +143,7 @@ public class CatalogItem extends EntityType {
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder links(Set links) {
@@ -163,7 +152,7 @@ public class CatalogItem extends EntityType {
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder link(Link link) {
@@ -181,20 +170,20 @@ public class CatalogItem extends EntityType {
}
}
- private CatalogItem() {
- // For JAXB and builder use
+ private CatalogItem(URI href, String type, Set links, String description, TasksInProgress tasksInProgress, String id, String name, Reference entity, Set properties) {
+ super(href, type, links, description, tasksInProgress, id, name);
+ this.entity = entity;
+ this.properties = properties;
}
- private CatalogItem(URI href, String name, Reference entity) {
- super(href, name);
- this.entity = entity;
- this.setProperties(properties);
+ private CatalogItem() {
+ // For JAXB and builder use
}
@XmlElement(name = "Entity", required = true)
private Reference entity;
@XmlElement(name = "Property")
- private List properties = Lists.newArrayList();
+ private Set properties = Sets.newLinkedHashSet();
/**
* A reference to a VappTemplate or Media object.
@@ -205,18 +194,10 @@ public class CatalogItem extends EntityType {
/**
* User-specified key/value pair.
- *
+ *
* This element has been superseded by the {@link Metadata} element, which is the preferred way to specify key/value pairs for objects.
*/
- public List getProperties() {
- return this.properties;
- }
-
- public void setProperties(List properties) {
- this.properties = Lists.newArrayList(checkNotNull(properties, "properties"));
- }
-
- public void addProperty(Property property) {
- this.properties.add(checkNotNull(property, "property"));
+ public Set getProperties() {
+ return Collections.unmodifiableSet(this.properties);
}
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItems.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItems.java
index 96ff754e8c..01037a1dfa 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItems.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogItems.java
@@ -19,31 +19,27 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.util.Collection;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
+import java.util.Collections;
+import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
-import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
/**
* Represents a list of catalog item references.
- *
+ *
*
* <complexType name="CatalogItemsType" />
*
*
* @author grkvlt@apache.org
*/
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "CatalogItems")
+@XmlRootElement(name = "CatalogItems")
public class CatalogItems {
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG_ITEMS;
@@ -58,13 +54,13 @@ public class CatalogItems {
public static class Builder {
- private List catalogItems = Lists.newArrayList();
+ private Set catalogItems = Sets.newLinkedHashSet();
/**
* @see CatalogItems#getCatalogItems()
*/
- public Builder items(List catalogItems) {
- this.catalogItems = Lists.newArrayList(checkNotNull(catalogItems, "catalogItems"));
+ public Builder items(Collection catalogItems) {
+ this.catalogItems = Sets.newLinkedHashSet(checkNotNull(catalogItems, "catalogItems"));
return this;
}
@@ -90,24 +86,16 @@ public class CatalogItems {
}
private CatalogItems(Collection tasks) {
- this.catalogItems = Lists.newArrayList(checkNotNull(catalogItems, "catalogItems"));
+ this.catalogItems = catalogItems;
}
@XmlElement(name = "CatalogItem")
- private List catalogItems = Lists.newArrayList();
+ private Set catalogItems = Sets.newLinkedHashSet();
/**
* Gets the value of the catalogItems property.
*/
- public List getCatalogItems() {
- return this.catalogItems;
- }
-
- public void setCatalogItems(List catalogItems) {
- this.catalogItems = Lists.newArrayList(checkNotNull(catalogItems, "catalogItems"));
- }
-
- public void addCatalogItem(Reference catalogItem) {
- this.catalogItems.add(checkNotNull(catalogItem, "catalogItem"));
+ public Set getCatalogItems() {
+ return Collections.unmodifiableSet(this.catalogItems);
}
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogReference.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogReference.java
index 1bbc50dc03..91179152d6 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogReference.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogReference.java
@@ -1,12 +1,9 @@
package org.jclouds.vcloud.director.v1_5.domain;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
-
import java.net.URI;
-
import javax.xml.bind.annotation.XmlRootElement;
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "CatalogReference")
+@XmlRootElement(name = "CatalogReference")
public class CatalogReference extends ReferenceType {
@SuppressWarnings("unchecked")
@@ -23,11 +20,7 @@ public class CatalogReference extends ReferenceType {
@Override
public CatalogReference build() {
- CatalogReference reference = new CatalogReference(href);
- reference.setId(id);
- reference.setName(name);
- reference.setType(type);
- return reference;
+ return new CatalogReference(href, id, name, type);
}
/**
@@ -76,8 +69,8 @@ public class CatalogReference extends ReferenceType {
}
}
- protected CatalogReference(URI href) {
- super(href);
+ public CatalogReference(URI href, String id, String name, String type) {
+ super(href, id, name, type);
}
protected CatalogReference() {
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogsList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogsList.java
index 52e0b471e7..bd4ec005ed 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogsList.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogsList.java
@@ -19,31 +19,27 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.util.Collection;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
+import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
-import com.google.common.collect.Lists;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
/**
* Container for ReferenceType elements that reference catalogs.
- *
+ *
*
* <complexType name="CatalogsListType" />
*
*
* @author grkvlt@apache.org
*/
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "CatalogsList")
+@XmlRootElement(name = "CatalogsList")
public class CatalogsList {
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG_ITEMS;
@@ -58,13 +54,13 @@ public class CatalogsList {
public static class Builder {
- private List catalogReferences = Lists.newArrayList();
+ private Set catalogReferences = Sets.newLinkedHashSet();
/**
* @see CatalogsList#getCatalogItems()
*/
- public Builder catalogs(List catalogReferences) {
- this.catalogReferences = Lists.newArrayList(checkNotNull(catalogReferences, "catalogReferences"));
+ public Builder catalogs(Collection catalogReferences) {
+ this.catalogReferences = Sets.newLinkedHashSet(checkNotNull(catalogReferences, "catalogReferences"));
return this;
}
@@ -81,7 +77,7 @@ public class CatalogsList {
}
public Builder fromCatalogsList(CatalogsList in) {
- return catalogs(in.getCatalogsList());
+ return catalogs(in.getCatalogItems());
}
}
@@ -89,25 +85,18 @@ public class CatalogsList {
// For JAXB and builder use
}
- private CatalogsList(Collection tasks) {
- this.catalogReferences = Lists.newArrayList(checkNotNull(catalogReferences, "catalogReferences"));
+ private CatalogsList(Set tasks) {
+ this.catalogReferences = ImmutableSet.copyOf(checkNotNull(catalogReferences, "catalogReferences"));
}
@XmlElement(name = "CatalogReference")
- private List catalogReferences = Lists.newArrayList();
+ private Set catalogReferences = Sets.newLinkedHashSet();
/**
* Gets the value of the catalogReferences property.
*/
- public List getCatalogsList() {
+ public Set getCatalogItems() {
return this.catalogReferences;
}
- public void setCatalogsList(List catalogReferences) {
- this.catalogReferences = Lists.newArrayList(checkNotNull(catalogReferences, "catalogReferences"));
- }
-
- public void addCatalog(Reference catalog) {
- this.catalogReferences.add(checkNotNull(catalog, "catalog"));
- }
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java
index f0434a1a42..f55c034512 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneMediaParams.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -30,15 +28,14 @@ import com.google.common.base.Objects;
/**
- *
- * Represents parameters for copying a media resource and optionally
- * deleting the source.
- *
- *
+ * Represents parameters for copying a media resource and optionally
+ * deleting the source.
+ *
+ *
* Java class for CloneMediaParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="CloneMediaParams">
* <complexContent>
@@ -52,16 +49,13 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CloneMediaParams", propOrder = {
- "source",
- "isSourceDelete"
+ "source",
+ "isSourceDelete"
})
public class CloneMediaParams
- extends ParamsType
+ extends ParamsType
{
@SuppressWarnings("unchecked")
@@ -74,7 +68,7 @@ public class CloneMediaParams
}
public static class Builder extends ParamsType.Builder {
-
+
private Reference source;
private Boolean isSourceDelete;
@@ -87,107 +81,80 @@ public class CloneMediaParams
}
/**
- * @see CloneMediaParams#getIsSourceDelete()
+ * @see CloneMediaParams#isSourceDelete()
*/
public Builder isSourceDelete(Boolean isSourceDelete) {
this.isSourceDelete = isSourceDelete;
return this;
}
-
public CloneMediaParams build() {
- CloneMediaParams cloneMediaParams = new CloneMediaParams();
- cloneMediaParams.setSource(source);
- cloneMediaParams.setIsSourceDelete(isSourceDelete);
- return cloneMediaParams;
+ return new CloneMediaParams(description, name, source, isSourceDelete);
}
-
@Override
public Builder fromParamsType(ParamsType in) {
- return Builder.class.cast(super.fromParamsType(in));
+ return Builder.class.cast(super.fromParamsType(in));
}
+
public Builder fromCloneMediaParams(CloneMediaParams in) {
return fromParamsType(in)
- .source(in.getSource())
- .isSourceDelete(in.isSourceDelete());
+ .source(in.getSource())
+ .isSourceDelete(in.isSourceDelete());
}
}
+ private CloneMediaParams(String description, String name, Reference source, Boolean sourceDelete) {
+ super(description, name);
+ this.source = source;
+ isSourceDelete = sourceDelete;
+ }
+
private CloneMediaParams() {
// For JAXB and builder use
}
+ @XmlElement(name = "Source", required = true)
+ protected Reference source;
+ @XmlElement(name = "IsSourceDelete")
+ protected Boolean isSourceDelete;
- @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 source property.
- *
- * @return
- * possible object is
- * {@link Reference }
- *
- */
- public Reference getSource() {
- return source;
- }
-
- /**
- * Sets the value of the source property.
- *
- * @param value
- * allowed object is
- * {@link Reference }
- *
- */
- public void setSource(Reference value) {
- this.source = value;
- }
-
- /**
- * Gets the value of the isSourceDelete property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isSourceDelete() {
- return isSourceDelete;
- }
-
- /**
- * Sets the value of the isSourceDelete property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setIsSourceDelete(Boolean value) {
- this.isSourceDelete = value;
- }
+ /**
+ * 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;
+ 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);
+ return equal(source, that.source) &&
+ equal(isSourceDelete, that.isSourceDelete);
}
@Override
public int hashCode() {
- return Objects.hashCode(source,
- isSourceDelete);
+ return Objects.hashCode(source,
+ isSourceDelete);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppParams.java
index 69559ff598..8ccfc0575a 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppParams.java
@@ -19,22 +19,19 @@
package org.jclouds.vcloud.director.v1_5.domain;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
- *
- * Represents parameters for copying a vApp and optionally deleting the source.
- *
- *
+ * Represents parameters for copying a vApp and optionally deleting the source.
+ *
+ *
* Java class for CloneVAppParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="CloneVAppParams">
* <complexContent>
@@ -44,13 +41,10 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CloneVAppParams")
public class CloneVAppParams
- extends InstantiateVAppParamsType
+ extends InstantiateVAppParamsType
{
@SuppressWarnings("unchecked")
@@ -63,7 +57,7 @@ public class CloneVAppParams
}
public static class Builder extends InstantiateVAppParamsType.Builder {
-
+
public CloneVAppParams build() {
CloneVAppParams cloneVAppParams = new CloneVAppParams();
@@ -85,7 +79,7 @@ public class CloneVAppParams
super.name(name);
return this;
}
-
+
/**
* @see VAppCreationParamsType#getVAppParent()
*/
@@ -117,7 +111,7 @@ public class CloneVAppParams
super.powerOn(powerOn);
return this;
}
-
+
/**
* @see InstantiateVAppParamsType#getSource()
*/
@@ -144,8 +138,9 @@ public class CloneVAppParams
@Override
public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType in) {
- return Builder.class.cast(super.fromInstantiateVAppParamsType(in));
+ return Builder.class.cast(super.fromInstantiateVAppParamsType(in));
}
+
public Builder fromCloneVAppParams(CloneVAppParams in) {
return fromInstantiateVAppParamsType(in);
}
@@ -158,7 +153,7 @@ public class CloneVAppParams
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
CloneVAppParams that = CloneVAppParams.class.cast(o);
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppTemplateParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppTemplateParams.java
index 36d4b1de62..14a61345ab 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppTemplateParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CloneVAppTemplateParams.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -30,15 +28,14 @@ import com.google.common.base.Objects;
/**
- *
- * Represents parameters for copying a vApp template and optionally
- * deleting the source.
- *
- *
+ * Represents parameters for copying a vApp template and optionally
+ * deleting the source.
+ *
+ *
* Java class for CloneVAppTemplateParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="CloneVAppTemplateParams">
* <complexContent>
@@ -52,16 +49,13 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CloneVAppTemplateParams", propOrder = {
- "source",
- "isSourceDelete"
+ "source",
+ "isSourceDelete"
})
public class CloneVAppTemplateParams
- extends ParamsType
+ extends ParamsType
{
@SuppressWarnings("unchecked")
@@ -74,7 +68,7 @@ public class CloneVAppTemplateParams
}
public static class Builder extends ParamsType.Builder {
-
+
private Reference source;
private Boolean isSourceDelete;
@@ -87,107 +81,80 @@ public class CloneVAppTemplateParams
}
/**
- * @see CloneVAppTemplateParams#getIsSourceDelete()
+ * @see CloneVAppTemplateParams#isSourceDelete()
*/
public Builder isSourceDelete(Boolean isSourceDelete) {
this.isSourceDelete = isSourceDelete;
return this;
}
-
public CloneVAppTemplateParams build() {
- CloneVAppTemplateParams cloneVAppTemplateParams = new CloneVAppTemplateParams();
- cloneVAppTemplateParams.setSource(source);
- cloneVAppTemplateParams.setIsSourceDelete(isSourceDelete);
- return cloneVAppTemplateParams;
+ return new CloneVAppTemplateParams(description, name, source, isSourceDelete);
}
-
@Override
public Builder fromParamsType(ParamsType in) {
- return Builder.class.cast(super.fromParamsType(in));
+ return Builder.class.cast(super.fromParamsType(in));
}
+
public Builder fromCloneVAppTemplateParams(CloneVAppTemplateParams in) {
return fromParamsType(in)
- .source(in.getSource())
- .isSourceDelete(in.isSourceDelete());
+ .source(in.getSource())
+ .isSourceDelete(in.isSourceDelete());
}
}
+ public CloneVAppTemplateParams(String description, String name, Reference source, Boolean sourceDelete) {
+ super(description, name);
+ this.source = source;
+ isSourceDelete = sourceDelete;
+ }
+
private CloneVAppTemplateParams() {
// For JAXB and builder use
}
+ @XmlElement(name = "Source", required = true)
+ protected Reference source;
+ @XmlElement(name = "IsSourceDelete")
+ protected Boolean isSourceDelete;
- @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 source property.
- *
- * @return
- * possible object is
- * {@link Reference }
- *
- */
- public Reference getSource() {
- return source;
- }
-
- /**
- * Sets the value of the source property.
- *
- * @param value
- * allowed object is
- * {@link Reference }
- *
- */
- public void setSource(Reference value) {
- this.source = value;
- }
-
- /**
- * Gets the value of the isSourceDelete property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isSourceDelete() {
- return isSourceDelete;
- }
-
- /**
- * Sets the value of the isSourceDelete property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setIsSourceDelete(Boolean value) {
- this.isSourceDelete = value;
- }
+ /**
+ * 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;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
CloneVAppTemplateParams that = CloneVAppTemplateParams.class.cast(o);
- return equal(source, that.source) &&
- equal(isSourceDelete, that.isSourceDelete);
+ return equal(source, that.source) &&
+ equal(isSourceDelete, that.isSourceDelete);
}
@Override
public int hashCode() {
- return Objects.hashCode(source,
- isSourceDelete);
+ return Objects.hashCode(source,
+ isSourceDelete);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComposeVAppParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComposeVAppParams.java
index de601f35c3..e9ebb23274 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComposeVAppParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComposeVAppParams.java
@@ -20,29 +20,27 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
+import static com.google.common.base.Preconditions.checkNotNull;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
+import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
/**
- *
- * Represents vApp composition parameters.
- *
- *
+ * Represents vApp composition parameters.
+ *
+ *
* Java class for ComposeVAppParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="ComposeVAppParams">
* <complexContent>
@@ -57,19 +55,16 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ComposeVAppParams", propOrder = {
- "sourcedItem",
- "allEULAsAccepted"
+ "sourcedItem",
+ "allEULAsAccepted"
})
@XmlSeeAlso({
// RecomposeVAppParamsType.class
})
public class ComposeVAppParams
- extends VAppCreationParamsType
+ extends VAppCreationParamsType
{
@SuppressWarnings("unchecked")
@@ -82,21 +77,21 @@ public class ComposeVAppParams
}
public static class Builder extends VAppCreationParamsType.Builder {
-
- private List sourcedItem;
+
+ private Set sourcedItem = Sets.newLinkedHashSet();
private Boolean allEULAsAccepted;
private Boolean linkedClone;
/**
* @see ComposeVAppParams#getSourcedItem()
*/
- public Builder sourcedItem(List sourcedItem) {
- this.sourcedItem = sourcedItem;
+ public Builder sourcedItem(Set sourcedItem) {
+ this.sourcedItem = checkNotNull(sourcedItem, "sourcedItem");
return this;
}
/**
- * @see ComposeVAppParams#getAllEULAsAccepted()
+ * @see ComposeVAppParams#isAllEULAsAccepted()
*/
public Builder allEULAsAccepted(Boolean allEULAsAccepted) {
this.allEULAsAccepted = allEULAsAccepted;
@@ -104,7 +99,7 @@ public class ComposeVAppParams
}
/**
- * @see ComposeVAppParams#getLinkedClone()
+ * @see ComposeVAppParams#isLinkedClone() ()
*/
public Builder linkedClone(Boolean linkedClone) {
this.linkedClone = linkedClone;
@@ -113,141 +108,109 @@ public class ComposeVAppParams
public ComposeVAppParams build() {
- ComposeVAppParams composeVAppParams = new ComposeVAppParams(sourcedItem);
- composeVAppParams.setAllEULAsAccepted(allEULAsAccepted);
- composeVAppParams.setLinkedClone(linkedClone);
- return composeVAppParams;
+ return new ComposeVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn,
+ sourcedItem, allEULAsAccepted, linkedClone);
}
@Override
public Builder fromVAppCreationParamsType(VAppCreationParamsType in) {
- return Builder.class.cast(super.fromVAppCreationParamsType(in));
+ return Builder.class.cast(super.fromVAppCreationParamsType(in));
}
+
public Builder fromComposeVAppParams(ComposeVAppParams in) {
return fromVAppCreationParamsType(in)
- .sourcedItem(in.getSourcedItem())
- .allEULAsAccepted(in.isAllEULAsAccepted())
- .linkedClone(in.isLinkedClone());
+ .sourcedItem(in.getSourcedItem())
+ .allEULAsAccepted(in.isAllEULAsAccepted())
+ .linkedClone(in.isLinkedClone());
}
}
+ public ComposeVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
+ Boolean deploy, Boolean powerOn, Set sourcedItem, Boolean allEULAsAccepted, Boolean linkedClone) {
+ super(description, name, vAppParent, instantiationParams, deploy, powerOn);
+ this.sourcedItem = ImmutableSet.copyOf(sourcedItem);
+ this.allEULAsAccepted = allEULAsAccepted;
+ this.linkedClone = linkedClone;
+ }
+
private ComposeVAppParams() {
// For JAXB and builder use
}
- private ComposeVAppParams(List sourcedItem) {
- this.sourcedItem = sourcedItem;
+
+ @XmlElement(name = "SourcedItem")
+ protected Set sourcedItem = Sets.newLinkedHashSet();
+ @XmlElement(name = "AllEULAsAccepted")
+ protected Boolean allEULAsAccepted;
+ @XmlAttribute
+ protected Boolean linkedClone;
+
+ /**
+ * Gets the value of the sourcedItem property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set
method for the sourcedItem property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getSourcedItem().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link SourcedCompositionItemParam }
+ */
+ public Set getSourcedItem() {
+ return this.sourcedItem;
}
+ /**
+ * 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.
+ *
+ * @return possible object is
+ * {@link Boolean }
+ */
+ public Boolean isAllEULAsAccepted() {
+ return allEULAsAccepted;
+ }
- @XmlElement(name = "SourcedItem")
- protected List sourcedItem;
- @XmlElement(name = "AllEULAsAccepted")
- protected Boolean allEULAsAccepted;
- @XmlAttribute
- protected Boolean linkedClone;
-
- /**
- * Gets the value of the sourcedItem property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the sourcedItem property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getSourcedItem().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link SourcedCompositionItemParamType }
- *
- *
- */
- public List getSourcedItem() {
- if (sourcedItem == null) {
- sourcedItem = new ArrayList();
- }
- return this.sourcedItem;
- }
-
- /**
- *
- * 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.
- *
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isAllEULAsAccepted() {
- return allEULAsAccepted;
- }
-
- /**
- * Sets the value of the allEULAsAccepted property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setAllEULAsAccepted(Boolean value) {
- this.allEULAsAccepted = value;
- }
-
- /**
- * Gets the value of the linkedClone property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isLinkedClone() {
- return linkedClone;
- }
-
- /**
- * Sets the value of the linkedClone property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setLinkedClone(Boolean value) {
- this.linkedClone = value;
- }
+ /**
+ * Gets the value of the linkedClone property.
+ *
+ * @return possible object is
+ * {@link Boolean }
+ */
+ public Boolean isLinkedClone() {
+ return linkedClone;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
ComposeVAppParams that = ComposeVAppParams.class.cast(o);
- return equal(sourcedItem, that.sourcedItem) &&
- equal(allEULAsAccepted, that.allEULAsAccepted) &&
- equal(linkedClone, that.linkedClone);
+ return equal(sourcedItem, that.sourcedItem) &&
+ equal(allEULAsAccepted, that.allEULAsAccepted) &&
+ equal(linkedClone, that.linkedClone);
}
@Override
public int hashCode() {
- return Objects.hashCode(sourcedItem,
- allEULAsAccepted,
- linkedClone);
+ return Objects.hashCode(sourcedItem,
+ allEULAsAccepted,
+ linkedClone);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComputeCapacity.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComputeCapacity.java
index 0de0b3376c..5d0556740c 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComputeCapacity.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/ComputeCapacity.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -30,14 +28,13 @@ import com.google.common.base.Objects;
/**
- *
- * Represents a compute capacity with units.
- *
- *
+ * Represents a compute capacity with units.
+ *
+ *
* Java class for ComputeCapacity complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="ComputeCapacity">
* <complexContent>
@@ -51,13 +48,10 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ComputeCapacity", propOrder = {
- "cpu",
- "memory"
+ "cpu",
+ "memory"
})
public class ComputeCapacity {
public static Builder builder() {
@@ -69,7 +63,7 @@ public class ComputeCapacity {
}
public static class Builder {
-
+
private CapacityWithUsage cpu;
private CapacityWithUsage memory;
@@ -89,95 +83,66 @@ public class ComputeCapacity {
return this;
}
-
public ComputeCapacity build() {
- ComputeCapacity computeCapacity = new ComputeCapacity();
- computeCapacity.setCpu(cpu);
- computeCapacity.setMemory(memory);
- return computeCapacity;
+ return new ComputeCapacity(cpu, memory);
}
-
public Builder fromComputeCapacity(ComputeCapacity in) {
return cpu(in.getCpu())
- .memory(in.getMemory());
+ .memory(in.getMemory());
}
}
+ private ComputeCapacity(CapacityWithUsage cpu, CapacityWithUsage memory) {
+ this.cpu = cpu;
+ this.memory = memory;
+ }
+
private ComputeCapacity() {
// For JAXB and builder use
}
+ @XmlElement(name = "Cpu", required = true)
+ protected CapacityWithUsage cpu;
+ @XmlElement(name = "Memory", required = true)
+ protected CapacityWithUsage memory;
- @XmlElement(name = "Cpu", required = true)
- protected CapacityWithUsage cpu;
- @XmlElement(name = "Memory", required = true)
- protected CapacityWithUsage memory;
-
- /**
- * Gets the value of the cpu property.
- *
- * @return
- * possible object is
- * {@link CapacityWithUsage }
- *
- */
- public CapacityWithUsage getCpu() {
- return cpu;
- }
-
- /**
- * Sets the value of the cpu property.
- *
- * @param value
- * allowed object is
- * {@link CapacityWithUsage }
- *
- */
- public void setCpu(CapacityWithUsage value) {
- this.cpu = value;
- }
-
- /**
- * Gets the value of the memory property.
- *
- * @return
- * possible object is
- * {@link CapacityWithUsage }
- *
- */
- public CapacityWithUsage getMemory() {
- return memory;
- }
-
- /**
- * Sets the value of the memory property.
- *
- * @param value
- * allowed object is
- * {@link CapacityWithUsage }
- *
- */
- public void setMemory(CapacityWithUsage value) {
- this.memory = value;
- }
+ /**
+ * Gets the value of the cpu property.
+ *
+ * @return possible object is
+ * {@link CapacityWithUsage }
+ */
+ public CapacityWithUsage getCpu() {
+ return cpu;
+ }
+
+ /**
+ * Gets the value of the memory property.
+ *
+ * @return possible object is
+ * {@link CapacityWithUsage }
+ */
+ public CapacityWithUsage getMemory() {
+ return memory;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
ComputeCapacity that = ComputeCapacity.class.cast(o);
- return equal(cpu, that.cpu) &&
- equal(memory, that.memory);
+ return equal(cpu, that.cpu) &&
+ equal(memory, that.memory);
}
@Override
public int hashCode() {
- return Objects.hashCode(cpu,
- memory);
+ return Objects.hashCode(cpu,
+ memory);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CustomizationSection.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CustomizationSection.java
index d2c85622b3..6e0b618691 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CustomizationSection.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CustomizationSection.java
@@ -20,23 +20,22 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
+import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
+import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
+import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
-import org.w3c.dom.Element;
import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
/**
@@ -64,12 +63,10 @@ import com.google.common.base.Objects;
* </complexType>
*
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "CustomizationSection")
@XmlType(propOrder = {
"customizeOnInstantiate",
- "link",
- "any"
+ "links"
})
public class CustomizationSection extends SectionType {
public static Builder builder() {
@@ -82,8 +79,7 @@ public class CustomizationSection extends SectionType {
public static class Builder extends SectionType.Builder {
private boolean customizeOnInstantiate;
- private List link;
- private List any;
+ private Set links = Sets.newLinkedHashSet();
private URI href;
private String type;
@@ -96,18 +92,10 @@ public class CustomizationSection extends SectionType {
}
/**
- * @see CustomizationSection#getLink()
+ * @see CustomizationSection#getLinks()
*/
- public Builder link(List link) {
- this.link = link;
- return this;
- }
-
- /**
- * @see CustomizationSection#getAny()
- */
- public Builder any(List any) {
- this.any = any;
+ public Builder links(Set links) {
+ this.links = checkNotNull(links, "links");
return this;
}
@@ -129,18 +117,13 @@ public class CustomizationSection extends SectionType {
public CustomizationSection build() {
- CustomizationSection customizationSection = new CustomizationSection(info, link, any);
- customizationSection.setCustomizeOnInstantiate(customizeOnInstantiate);
- customizationSection.setHref(href);
- customizationSection.setType(type);
- return customizationSection;
+ return new CustomizationSection(info, required, customizeOnInstantiate, links, href, type);
}
public Builder fromCustomizationSection(CustomizationSection in) {
return fromSection(in)
.customizeOnInstantiate(in.isCustomizeOnInstantiate())
- .link(in.getLink())
- .any(in.getAny())
+ .links(in.getLinks())
.href(in.getHref())
.type(in.getType());
}
@@ -160,13 +143,23 @@ public class CustomizationSection extends SectionType {
public Builder info(String info) {
return Builder.class.cast(super.info(info));
}
-
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Builder required(Boolean required) {
+ return Builder.class.cast(super.required(required));
+ }
}
- private CustomizationSection(String info, List link, List any) {
- super(info);
- this.link = link;
- this.any = any;
+ private CustomizationSection(@Nullable String info, @Nullable Boolean required, boolean customizeOnInstantiate, Set links,
+ URI href, String type) {
+ super(info, required);
+ this.customizeOnInstantiate = customizeOnInstantiate;
+ this.links = ImmutableSet.copyOf(links);
+ this.href = href;
+ this.type = type;
}
private CustomizationSection() {
@@ -176,9 +169,7 @@ public class CustomizationSection extends SectionType {
@XmlElement(name = "CustomizeOnInstantiate")
protected boolean customizeOnInstantiate;
@XmlElement(name = "Link")
- protected List link;
- @XmlAnyElement(lax = true)
- protected List any;
+ protected Set links = Sets.newLinkedHashSet();
@XmlAttribute
@XmlSchemaType(name = "anyURI")
protected URI href;
@@ -193,65 +184,10 @@ public class CustomizationSection extends SectionType {
}
/**
- * Sets the value of the customizeOnInstantiate property.
+ * Gets the value of the links property.
*/
- public void setCustomizeOnInstantiate(boolean value) {
- this.customizeOnInstantiate = value;
- }
-
- /**
- * Gets the value of the link property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the link property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getLink().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Link }
- */
- public List getLink() {
- if (link == null) {
- link = new ArrayList ();
- }
- return this.link;
- }
-
- /**
- * Gets the value of the any property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the any property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getAny().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- */
- public List getAny() {
- if (any == null) {
- any = new ArrayList();
- }
- return this.any;
+ public Set getLinks() {
+ return this.links;
}
/**
@@ -264,16 +200,6 @@ public class CustomizationSection extends SectionType {
return href;
}
- /**
- * Sets the value of the href property.
- *
- * @param value allowed object is
- * {@link String }
- */
- public void setHref(URI value) {
- this.href = value;
- }
-
/**
* Gets the value of the type property.
*
@@ -284,16 +210,6 @@ public class CustomizationSection extends SectionType {
return type;
}
- /**
- * Sets the value of the type property.
- *
- * @param value allowed object is
- * {@link String }
- */
- public void setType(String value) {
- this.type = value;
- }
-
@Override
public boolean equals(Object o) {
if (this == o)
@@ -301,30 +217,30 @@ public class CustomizationSection extends SectionType {
if (o == null || getClass() != o.getClass())
return false;
CustomizationSection that = CustomizationSection.class.cast(o);
- return equal(customizeOnInstantiate, that.customizeOnInstantiate) &&
- equal(link, that.link) &&
- equal(any, that.any) &&
+ return super.equals(that) &&
+ equal(customizeOnInstantiate, that.customizeOnInstantiate) &&
+ equal(links, that.links) &&
equal(href, that.href) &&
equal(type, that.type);
}
@Override
public int hashCode() {
- return Objects.hashCode(customizeOnInstantiate,
- link,
- any,
+ return Objects.hashCode(
+ super.hashCode(),
+ customizeOnInstantiate,
+ links,
href,
type);
}
@Override
- public String toString() {
- return Objects.toStringHelper("")
+ public Objects.ToStringHelper string() {
+ return super.string()
.add("customizeOnInstantiate", customizeOnInstantiate)
- .add("link", link)
- .add("any", any)
+ .add("links", links)
.add("href", href)
- .add("type", type).toString();
+ .add("type", type);
}
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java
index 4410fb0649..801375b9c0 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Entity.java
@@ -29,10 +29,10 @@ import com.google.common.collect.Sets;
* An entity.
*
* @author grkvlt@apache.org
+ * @author Adam Lowe
*/
public class Entity extends EntityType {
- @SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
@@ -46,13 +46,7 @@ public class Entity extends EntityType {
@Override
public Entity build() {
- Entity entity = new Entity(href, name);
- entity.setDescription(description);
- entity.setTasksInProgress(tasksInProgress);
- entity.setId(id);
- entity.setType(type);
- entity.setLinks(links);
- return entity;
+ return new Entity(href, type, links, description, tasksInProgress, id, name);
}
/**
@@ -110,7 +104,7 @@ public class Entity extends EntityType {
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder links(Set links) {
@@ -119,7 +113,7 @@ public class Entity extends EntityType {
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder link(Link link) {
@@ -137,21 +131,11 @@ public class Entity extends EntityType {
}
}
- protected Entity(URI href, String name) {
- super(href, name);
+ private Entity(URI href, String type, Set links, String description, TasksInProgress tasksInProgress, String id, String name) {
+ super(href, type, links, description, tasksInProgress, id, name);
}
- protected Entity() {
+ private Entity() {
// For JAXB
}
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- Entity that = Entity.class.cast(o);
- return super.equals(that);
- }
}
\ No newline at end of file
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java
index 62208ab026..077e4ad1e0 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/EntityType.java
@@ -20,11 +20,9 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.net.URI;
import java.util.Set;
-
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
@@ -34,27 +32,19 @@ import com.google.common.collect.Sets;
/**
* Basic entity type in the vCloud object model.
- *
+ *
* Includes a name, an optional description, and an optional list of links
- *
+ *
*
* <xs:complexType name="EntityType">
*
*
* @author grkvlt@apache.org
+ * @author Adam Lowe
*/
-public class EntityType> extends ResourceType {
+public abstract class EntityType> extends ResourceType {
- public static > Builder builder() {
- return new Builder();
- }
-
- @Override
- public Builder toBuilder() {
- return new Builder().fromEntityType(this);
- }
-
- public static class Builder> extends ResourceType.Builder {
+ public static abstract class Builder> extends ResourceType.Builder {
protected String description;
protected TasksInProgress tasksInProgress;
@@ -93,17 +83,6 @@ public class EntityType> extends ResourceType {
return this;
}
- @Override
- public EntityType build() {
- EntityType entity = new EntityType(href, name);
- entity.setDescription(description);
- entity.setTasksInProgress(tasksInProgress);
- entity.setId(id);
- entity.setType(type);
- entity.setLinks(links);
- return entity;
- }
-
/**
* @see ResourceType#getHref()
*/
@@ -151,22 +130,25 @@ public class EntityType> extends ResourceType {
public Builder fromEntityType(EntityType in) {
return fromResourceType(in)
- .description(in.getDescription()).tasksInProgress(in.getTasksInProgress())
- .id(in.getId()).name(in.getName());
+ .description(in.getDescription()).tasksInProgress(in.getTasksInProgress())
+ .id(in.getId()).name(in.getName());
}
}
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "Description")
+ @XmlElement(name = "Description")
private String description;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "TasksInProgress")
+ @XmlElement(name = "TasksInProgress")
private TasksInProgress tasksInProgress;
@XmlAttribute
private String id;
@XmlAttribute(required = true)
private String name;
- protected EntityType(URI href, String name) {
- super(href);
+ public EntityType(URI href, String type, Set links, String description, TasksInProgress tasksInProgress, String id, String name) {
+ super(href, type, links);
+ this.description = description;
+ this.tasksInProgress = tasksInProgress;
+ this.id = id;
this.name = name;
}
@@ -181,10 +163,6 @@ public class EntityType> extends ResourceType {
return description;
}
- public void setDescription(String description) {
- this.description = description;
- }
-
/**
* A list of queued, running, or recently completed tasks associated with this entity.
*/
@@ -192,13 +170,9 @@ public class EntityType> extends ResourceType {
return tasksInProgress;
}
- public void setTasksInProgress(TasksInProgress tasksInProgress) {
- this.tasksInProgress = tasksInProgress;
- }
-
/**
* The resource identifier, expressed in URN format.
- *
+ *
* The value of this attribute uniquely identifies the resource, persists for the life of the
* resource, and is never reused.
*/
@@ -206,20 +180,12 @@ public class EntityType> extends ResourceType {
return id;
}
- public void setId(String id) {
- this.id = id;
- }
-
/**
* Contains the name of the the entity.
*/
public String getName() {
return name;
}
-
- public void setName(String name) {
- this.name = name;
- }
@Override
public boolean equals(Object o) {
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java
index 17891e8c45..b167f7f108 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/Error.java
@@ -20,10 +20,7 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
-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.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
@@ -33,17 +30,16 @@ import com.google.common.base.Objects;
/**
* The standard error message type used in the vCloud REST API.
- *
+ *
*
* <xs:complexType name="ErrorType">
*
*
* @author grkvlt@apache.org
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "Error")
-@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "Error")
public class Error {
-
+
public static final String MEDIA_TYPE = VCloudDirectorMediaType.ERROR;
public static Builder builder() {
@@ -103,10 +99,7 @@ public class Error {
}
public Error build() {
- Error error = new Error(message, majorErrorCode, minorErrorCode);
- error.setVendorSpecificErrorCode(vendorSpecificErrorCode);
- error.setStackTrace(stackTrace);
- return error;
+ return new Error(message, majorErrorCode, minorErrorCode, vendorSpecificErrorCode, stackTrace);
}
public Builder fromError(Error in) {
@@ -129,10 +122,12 @@ public class Error {
@XmlAttribute
private String stackTrace;
- private Error(String message, Integer majorErrorCode, String minorErrorCode) {
+ private Error(String message, Integer majorErrorCode, String minorErrorCode, String vendorSpecificErrorCode, String stackTrace) {
this.message = checkNotNull(message, "message");
this.majorErrorCode = checkNotNull(majorErrorCode, "majorErrorCode");
this.minorErrorCode = checkNotNull(minorErrorCode, "minorErrorCode");
+ this.vendorSpecificErrorCode = vendorSpecificErrorCode;
+ this.stackTrace = stackTrace;
}
private Error() {
@@ -155,7 +150,7 @@ public class Error {
/**
* Specific API error code.
- *
+ *
* For example - can indicate that vApp power on failed by some reason.
*/
public String getMinorErrorCode() {
@@ -170,10 +165,6 @@ public class Error {
return vendorSpecificErrorCode;
}
- public void setVendorSpecificErrorCode(String vendorSpecificErrorCode) {
- this.vendorSpecificErrorCode = vendorSpecificErrorCode;
- }
-
/**
* The stack trace of the exception which when examined might make problem
* diagnostics easier.
@@ -182,10 +173,6 @@ public class Error {
return stackTrace;
}
- public void setStackTrace(String stackTrace) {
- this.stackTrace = stackTrace;
- }
-
@Override
public boolean equals(Object o) {
if (this == o)
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java
index ea9369ecb1..b9e455dcb0 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java
@@ -24,9 +24,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
@@ -38,14 +35,13 @@ import com.google.common.collect.Sets;
/**
- *
- * Represents a file to be transferred (uploaded or downloaded).
- *
- *
+ * Represents a file to be transferred (uploaded or downloaded).
+ *
+ *
* Java class for File complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="File">
* <complexContent>
@@ -58,26 +54,21 @@ import com.google.common.collect.Sets;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "File")
-public class File
- extends EntityType
-
-{
+public class File extends EntityType {
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
+ @Override
public Builder toBuilder() {
return new Builder().fromFile(this);
}
public static class Builder extends EntityType.Builder {
-
+
private Long size;
private Long bytesTransferred;
private String checksum;
@@ -106,16 +97,10 @@ public class File
return this;
}
-
public File build() {
- File file = new File();
- file.setSize(size);
- file.setBytesTransferred(bytesTransferred);
- file.setChecksum(checksum);
- return file;
+ return new File(href, type, links, description, tasksInProgress, id, name, size, bytesTransferred, checksum);
}
-
/**
* @see EntityType#getId()
*/
@@ -153,7 +138,7 @@ public class File
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder links(Set links) {
@@ -162,7 +147,7 @@ public class File
}
/**
- * @see ReferenceType#getLinks()
+ * @see EntityType#getLinks()
*/
@Override
public Builder link(Link link) {
@@ -173,120 +158,86 @@ public class File
@Override
public Builder fromEntityType(EntityType in) {
- return Builder.class.cast(super.fromEntityType(in));
+ return Builder.class.cast(super.fromEntityType(in));
}
+
public Builder fromFile(File in) {
return fromEntityType(in)
- .size(in.getSize())
- .bytesTransferred(in.getBytesTransferred())
- .checksum(in.getChecksum());
+ .size(in.getSize())
+ .bytesTransferred(in.getBytesTransferred())
+ .checksum(in.getChecksum());
}
}
+ public File(URI href, String type, Set links, String description, TasksInProgress tasksInProgress, String id,
+ String name, Long size, Long bytesTransferred, String checksum) {
+ super(href, type, links, description, tasksInProgress, id, name);
+ this.size = size;
+ this.bytesTransferred = bytesTransferred;
+ this.checksum = checksum;
+ }
+
private File() {
// For JAXB and builder use
}
+ @XmlAttribute
+ protected Long size;
+ @XmlAttribute
+ protected Long bytesTransferred;
+ @XmlAttribute
+ @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
+ @XmlSchemaType(name = "normalizedString")
+ protected String checksum;
- @XmlAttribute
- protected Long size;
- @XmlAttribute
- protected Long bytesTransferred;
- @XmlAttribute
- @XmlJavaTypeAdapter(NormalizedStringAdapter.class)
- @XmlSchemaType(name = "normalizedString")
- protected String checksum;
+ /**
+ * Gets the value of the size property.
+ *
+ * @return possible object is
+ * {@link Long }
+ */
+ public Long getSize() {
+ return size;
+ }
- /**
- * Gets the value of the size property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- public Long getSize() {
- return size;
- }
+ /**
+ * Gets the value of the bytesTransferred property.
+ *
+ * @return possible object is
+ * {@link Long }
+ */
+ public Long getBytesTransferred() {
+ return bytesTransferred;
+ }
- /**
- * Sets the value of the size property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setSize(Long value) {
- this.size = value;
- }
-
- /**
- * Gets the value of the bytesTransferred property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- public Long getBytesTransferred() {
- return bytesTransferred;
- }
-
- /**
- * Sets the value of the bytesTransferred property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setBytesTransferred(Long value) {
- this.bytesTransferred = value;
- }
-
- /**
- * Gets the value of the checksum property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getChecksum() {
- return checksum;
- }
-
- /**
- * Sets the value of the checksum property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setChecksum(String value) {
- this.checksum = value;
- }
+ /**
+ * Gets the value of the checksum property.
+ *
+ * @return possible object is
+ * {@link String }
+ */
+ public String getChecksum() {
+ return checksum;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
File that = File.class.cast(o);
- return equal(size, that.size) &&
- equal(bytesTransferred, that.bytesTransferred) &&
- equal(checksum, that.checksum);
+ return equal(size, that.size) &&
+ equal(bytesTransferred, that.bytesTransferred) &&
+ equal(checksum, that.checksum);
}
@Override
public int hashCode() {
- return Objects.hashCode(size,
- bytesTransferred,
- checksum);
+ return Objects.hashCode(size,
+ bytesTransferred,
+ checksum);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java
index 6a196bde57..050ecd1d86 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/FilesList.java
@@ -21,27 +21,24 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
+import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
/**
- *
- * Represents a list of files to be transferred (uploaded
- * or downloaded).
- *
- *
+ * Represents a list of files to be transferred (uploaded
+ * or downloaded).
+ *
+ *
* Java class for FilesList complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="FilesList">
* <complexContent>
@@ -54,12 +51,9 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FilesList", propOrder = {
- "files"
+ "files"
})
public class FilesList {
public static Builder builder() {
@@ -71,14 +65,14 @@ public class FilesList {
}
public static class Builder {
-
- private List files;
+
+ private Set files = Sets.newLinkedHashSet();
/**
* @see FilesList#getFiles()
*/
- public Builder file(List file) {
- this.files = file;
+ public Builder files(Set files) {
+ this.files = files;
return this;
}
@@ -90,7 +84,7 @@ public class FilesList {
public Builder fromFilesList(FilesList in) {
- return file(in.getFiles());
+ return files(in.getFiles());
}
}
@@ -98,47 +92,25 @@ public class FilesList {
// For JAXB and builder use
}
- private FilesList(List files) {
- this.files = files;
+ private FilesList(Set files) {
+ this.files = ImmutableSet.copyOf(files);
}
- @XmlElement(name = "File", required = true)
- protected List files;
+ @XmlElement(name = "File", required = true)
+ protected Set files = Sets.newLinkedHashSet();
- /**
- * Gets the value of the file property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the file property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getFile().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link FileType }
- *
- *
- */
- public List getFiles() {
- if (files == null) {
- files = new ArrayList();
- }
- return this.files;
- }
+ /**
+ * Gets the value of the file property.
+ */
+ public Set getFiles() {
+ return this.files;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
FilesList that = FilesList.class.cast(o);
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/GuestCustomizationSection.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/GuestCustomizationSection.java
index afb85241b1..e10406e68f 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/GuestCustomizationSection.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/GuestCustomizationSection.java
@@ -20,13 +20,11 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
+import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
+import java.util.Collections;
+import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -37,6 +35,8 @@ import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
/**
@@ -77,7 +77,6 @@ import com.google.common.base.Objects;
* </complexType>
*
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "GuestCustomizationSection")
@XmlType(propOrder = {
"enabled",
@@ -94,8 +93,7 @@ import com.google.common.base.Objects;
"resetPasswordRequired",
"customizationScript",
"computerName",
- "link",
- "any"
+ "links"
})
public class GuestCustomizationSection extends SectionType {
@SuppressWarnings("unchecked")
@@ -108,7 +106,6 @@ public class GuestCustomizationSection extends SectionType {
-
private Boolean enabled;
private Boolean changeSid;
private String virtualMachineId;
@@ -123,8 +120,7 @@ public class GuestCustomizationSection extends SectionType link;
- private List any;
+ private Set links = Sets.newLinkedHashSet();
private URI href;
private String type;
@@ -243,16 +239,8 @@ public class GuestCustomizationSection extends SectionType link) {
- this.link = link;
- return this;
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getAny()
- */
- public Builder any(List any) {
- this.any = any;
+ public Builder links(Set links) {
+ this.links = checkNotNull(links, "links");
return this;
}
@@ -274,25 +262,13 @@ public class GuestCustomizationSection extends SectionType links, URI href, String type) {
+ super(info, required);
+ this.enabled = enabled;
+ this.changeSid = changeSid;
+ this.virtualMachineId = virtualMachineId;
+ this.joinDomainEnabled = joinDomainEnabled;
+ this.useOrgSettings = useOrgSettings;
+ this.domainName = domainName;
+ this.domainUserName = domainUserName;
+ this.domainUserPassword = domainUserPassword;
+ this.adminPasswordEnabled = adminPasswordEnabled;
+ this.adminPasswordAuto = adminPasswordAuto;
+ this.adminPassword = adminPassword;
+ this.resetPasswordRequired = resetPasswordRequired;
+ this.customizationScript = customizationScript;
+ this.computerName = computerName;
+ this.links = ImmutableSet.copyOf(links);
+ this.href = href;
+ this.type = type;
}
private GuestCustomizationSection() {
// For JAXB and builder use
- super(null);
- }
-
- private GuestCustomizationSection(@Nullable String info, Boolean resetPasswordRequired, List link, List any) {
- super(info);
- this.resetPasswordRequired = resetPasswordRequired;
- this.link = link;
- this.any = any;
}
@XmlElement(name = "Enabled")
- protected Boolean enabled;
+ private Boolean enabled;
@XmlElement(name = "ChangeSid")
- protected Boolean changeSid;
+ private Boolean changeSid;
@XmlElement(name = "VirtualMachineId")
- protected String virtualMachineId;
+ private String virtualMachineId;
@XmlElement(name = "JoinDomainEnabled")
- protected Boolean joinDomainEnabled;
+ private Boolean joinDomainEnabled;
@XmlElement(name = "UseOrgSettings")
- protected Boolean useOrgSettings;
+ private Boolean useOrgSettings;
@XmlElement(name = "DomainName")
- protected String domainName;
+ private String domainName;
@XmlElement(name = "DomainUserName")
- protected String domainUserName;
+ private String domainUserName;
@XmlElement(name = "DomainUserPassword")
- protected String domainUserPassword;
+ private String domainUserPassword;
@XmlElement(name = "AdminPasswordEnabled")
- protected Boolean adminPasswordEnabled;
+ private Boolean adminPasswordEnabled;
@XmlElement(name = "AdminPasswordAuto")
- protected Boolean adminPasswordAuto;
+ private Boolean adminPasswordAuto;
@XmlElement(name = "AdminPassword")
- protected String adminPassword;
+ private String adminPassword;
@XmlElement(name = "ResetPasswordRequired")
- protected Boolean resetPasswordRequired;
+ private Boolean resetPasswordRequired;
@XmlElement(name = "CustomizationScript")
- protected String customizationScript;
+ private String customizationScript;
@XmlElement(name = "ComputerName")
- protected String computerName;
+ private String computerName;
@XmlElement(name = "Link")
- protected List link;
- @XmlAnyElement(lax = true)
- protected List any;
+ private Set links = Sets.newLinkedHashSet();
@XmlAttribute
@XmlSchemaType(name = "anyURI")
- protected URI href;
+ private URI href;
@XmlAttribute
- protected String type;
+ private String type;
/**
* Gets the value of the enabled property.
@@ -394,16 +391,6 @@ public class GuestCustomizationSection extends SectionType
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the link property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getLink().add(newItem);
- *
- *
- *
- *
* Objects of the following type(s) are allowed in the list
* {@link Link }
*/
- public List getLink() {
- if (link == null) {
- link = new ArrayList ();
- }
- return this.link;
- }
-
- /**
- * Gets the value of the any property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the any property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getAny().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link org.w3c.dom.Element }
- */
- public List getAny() {
- if (any == null) {
- any = new ArrayList();
- }
- return this.any;
+ public Set getLink() {
+ return Collections.unmodifiableSet(this.links);
}
/**
@@ -726,13 +539,6 @@ public class GuestCustomizationSection extends SectionType {
-
+ extends InstantiateVAppParamsType {
+
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
@@ -39,23 +38,13 @@ public class InstantiateVAppParams
return new Builder();
}
- public static class Builder
- extends InstantiateVAppParamsType.Builder {
+ public static class Builder
+ extends InstantiateVAppParamsType.Builder {
public InstantiateVAppParams build() {
- InstantiateVAppParams instantiateVAppParams = new InstantiateVAppParams();
- instantiateVAppParams.setSource(source);
- instantiateVAppParams.setIsSourceDelete(isSourceDelete);
- instantiateVAppParams.setLinkedClone(linkedClone);
- instantiateVAppParams.setVAppParent(vAppParent);
- instantiateVAppParams.setInstantiationParams(instantiationParams);
- instantiateVAppParams.setDeploy(deploy);
- instantiateVAppParams.setPowerOn(powerOn);
- instantiateVAppParams.setDescription(description);
- instantiateVAppParams.setName(name);
- return instantiateVAppParams;
+ return new InstantiateVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone);
}
-
+
/**
* @see InstantiateVAppParams#getSource()
*/
@@ -65,7 +54,7 @@ public class InstantiateVAppParams
}
/**
- * @see InstantiateVAppParams#getIsSourceDelete()
+ * @see InstantiateVAppParams#isSourceDelete()
*/
public Builder isSourceDelete(Boolean isSourceDelete) {
super.isSourceDelete(isSourceDelete);
@@ -73,13 +62,13 @@ public class InstantiateVAppParams
}
/**
- * @see InstantiateVAppParams#getLinkedClone()
+ * @see InstantiateVAppParams#isLinkedClone()
*/
public Builder linkedClone(Boolean linkedClone) {
super.linkedClone(linkedClone);
return this;
}
-
+
/**
* @see ParamsType#getDescription()
*/
@@ -95,7 +84,7 @@ public class InstantiateVAppParams
super.name(name);
return this;
}
-
+
/**
* @see VAppCreationParamsType#getVAppParent()
*/
@@ -113,7 +102,7 @@ public class InstantiateVAppParams
}
/**
- * @see VAppCreationParamsType#getDeploy()
+ * @see VAppCreationParamsType#isDeploy()
*/
public Builder deploy(Boolean deploy) {
super.deploy(deploy);
@@ -121,7 +110,7 @@ public class InstantiateVAppParams
}
/**
- * @see VAppCreationParamsType#getPowerOn()
+ * @see VAppCreationParamsType#isPowerOn()
*/
public Builder powerOn(Boolean powerOn) {
super.powerOn(powerOn);
@@ -134,13 +123,19 @@ public class InstantiateVAppParams
@Override
public Builder fromInstantiateVAppParamsType(
InstantiateVAppParamsType in) {
- return Builder.class.cast(super.fromVAppCreationParamsType(in));
+ return Builder.class.cast(super.fromVAppCreationParamsType(in));
}
+
public Builder fromInstantiateVAppParams(InstantiateVAppParams in) {
return fromInstantiateVAppParamsType(in);
}
}
+ private InstantiateVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
+ Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
+ super(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
+ }
+
protected InstantiateVAppParams() {
// For JAXB and builder use
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppParamsType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppParamsType.java
index 4f35618a76..1cc06daf5d 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppParamsType.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppParamsType.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSeeAlso;
@@ -32,14 +30,13 @@ import com.google.common.base.Objects;
/**
- *
- * Represents vApp instantiation parameters.
- *
- *
+ * Represents vApp instantiation parameters.
+ *
+ *
* Java class for InstantiateVAppParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="InstantiateVAppParams">
* <complexContent>
@@ -54,20 +51,17 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstantiateVAppParams", propOrder = {
- "source",
- "isSourceDelete"
+ "source",
+ "isSourceDelete"
})
@XmlSeeAlso({
// InstantiateVAppTemplateParamsType.class,
// CloneVAppParamsType.class
})
public class InstantiateVAppParamsType>
- extends VAppCreationParamsType
+ extends VAppCreationParamsType
{
public static > Builder builder() {
@@ -79,7 +73,7 @@ public class InstantiateVAppParamsType>
}
public static class Builder> extends VAppCreationParamsType.Builder {
-
+
protected Reference source;
protected Boolean isSourceDelete;
protected Boolean linkedClone;
@@ -93,7 +87,7 @@ public class InstantiateVAppParamsType>
}
/**
- * @see InstantiateVAppParamsType#getIsSourceDelete()
+ * @see InstantiateVAppParamsType#isSourceDelete()
*/
public Builder isSourceDelete(Boolean isSourceDelete) {
this.isSourceDelete = isSourceDelete;
@@ -101,28 +95,17 @@ public class InstantiateVAppParamsType>
}
/**
- * @see InstantiateVAppParamsType#getLinkedClone()
+ * @see InstantiateVAppParamsType#isLinkedClone()
*/
public Builder linkedClone(Boolean linkedClone) {
this.linkedClone = linkedClone;
return this;
}
-
public InstantiateVAppParamsType build() {
- InstantiateVAppParamsType instantiateVAppParams = new InstantiateVAppParamsType();
- instantiateVAppParams.setSource(source);
- instantiateVAppParams.setIsSourceDelete(isSourceDelete);
- instantiateVAppParams.setLinkedClone(linkedClone);
- instantiateVAppParams.setVAppParent(vAppParent);
- instantiateVAppParams.setInstantiationParams(instantiationParams);
- instantiateVAppParams.setDeploy(deploy);
- instantiateVAppParams.setPowerOn(powerOn);
- instantiateVAppParams.setDescription(description);
- instantiateVAppParams.setName(name);
- return instantiateVAppParams;
+ return new InstantiateVAppParamsType(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone);
}
-
+
/**
* @see ParamsType#getDescription()
*/
@@ -138,7 +121,7 @@ public class InstantiateVAppParamsType>
super.name(name);
return this;
}
-
+
/**
* @see VAppCreationParamsType#getVAppParent()
*/
@@ -156,7 +139,7 @@ public class InstantiateVAppParamsType>
}
/**
- * @see VAppCreationParamsType#getDeploy()
+ * @see VAppCreationParamsType#isDeploy()
*/
public Builder deploy(Boolean deploy) {
super.deploy(deploy);
@@ -164,7 +147,7 @@ public class InstantiateVAppParamsType>
}
/**
- * @see VAppCreationParamsType#getPowerOn()
+ * @see VAppCreationParamsType#isPowerOn()
*/
public Builder powerOn(Boolean powerOn) {
super.powerOn(powerOn);
@@ -177,118 +160,84 @@ public class InstantiateVAppParamsType>
@SuppressWarnings("unchecked")
@Override
public Builder fromVAppCreationParamsType(VAppCreationParamsType in) {
- return Builder.class.cast(super.fromVAppCreationParamsType(in));
+ return Builder.class.cast(super.fromVAppCreationParamsType(in));
}
+
public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType in) {
return fromVAppCreationParamsType(in)
- .source(in.getSource())
- .isSourceDelete(in.isSourceDelete())
- .linkedClone(in.isLinkedClone());
+ .source(in.getSource())
+ .isSourceDelete(in.isSourceDelete())
+ .linkedClone(in.isLinkedClone());
}
}
+ public InstantiateVAppParamsType(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
+ Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
+ super(description, name, vAppParent, instantiationParams, deploy, powerOn);
+ this.source = source;
+ isSourceDelete = sourceDelete;
+ this.linkedClone = linkedClone;
+ }
+
protected InstantiateVAppParamsType() {
// For JAXB and builder use
}
+ @XmlElement(name = "Source", required = true)
+ protected Reference source;
+ @XmlElement(name = "IsSourceDelete")
+ protected Boolean isSourceDelete;
+ @XmlAttribute
+ protected Boolean linkedClone;
- @XmlElement(name = "Source", required = true)
- protected Reference source;
- @XmlElement(name = "IsSourceDelete")
- protected Boolean isSourceDelete;
- @XmlAttribute
- protected Boolean linkedClone;
+ /**
+ * Gets the value of the source property.
+ *
+ * @return possible object is
+ * {@link Reference }
+ */
+ public Reference getSource() {
+ return source;
+ }
- /**
- * 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;
+ }
- /**
- * Sets the value of the source property.
- *
- * @param value
- * allowed object is
- * {@link Reference }
- *
- */
- public void setSource(Reference value) {
- this.source = value;
- }
-
- /**
- * Gets the value of the isSourceDelete property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isSourceDelete() {
- return isSourceDelete;
- }
-
- /**
- * Sets the value of the isSourceDelete property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setIsSourceDelete(Boolean value) {
- this.isSourceDelete = value;
- }
-
- /**
- * Gets the value of the linkedClone property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isLinkedClone() {
- return linkedClone;
- }
-
- /**
- * Sets the value of the linkedClone property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setLinkedClone(Boolean value) {
- this.linkedClone = value;
- }
+ /**
+ * Gets the value of the linkedClone property.
+ *
+ * @return possible object is
+ * {@link Boolean }
+ */
+ public Boolean isLinkedClone() {
+ return linkedClone;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
InstantiateVAppParamsType> that = InstantiateVAppParamsType.class.cast(o);
- return equal(source, that.source) &&
- equal(isSourceDelete, that.isSourceDelete) &&
- equal(linkedClone, that.linkedClone);
+ return equal(source, that.source) &&
+ equal(isSourceDelete, that.isSourceDelete) &&
+ equal(linkedClone, that.linkedClone);
}
@Override
public int hashCode() {
- return Objects.hashCode(source,
- isSourceDelete,
- linkedClone);
+ return Objects.hashCode(source,
+ isSourceDelete,
+ linkedClone);
}
@Override
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java
index ce7e905f34..cedbfba1cc 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java
@@ -21,8 +21,6 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -30,14 +28,13 @@ import com.google.common.base.Objects;
/**
- *
- * Represents vApp template instantiation parameters.
- *
- *
+ * Represents vApp template instantiation parameters.
+ *
+ *
* Java class for InstantiateVAppTemplateParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="InstantiateVAppTemplateParams">
* <complexContent>
@@ -50,16 +47,13 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstantiateVAppTemplateParams", propOrder = {
- "allEULAsAccepted"
+ "allEULAsAccepted"
})
public class InstantiateVAppTemplateParams
- extends InstantiateVAppParamsType {
-
+ extends InstantiateVAppParamsType {
+
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
@@ -70,11 +64,11 @@ public class InstantiateVAppTemplateParams
}
public static class Builder extends InstantiateVAppParamsType.Builder {
-
+
private Boolean allEULAsAccepted;
/**
- * @see InstantiateVAppTemplateParamsType#getAllEULAsAccepted()
+ * @see InstantiateVAppTemplateParams#isAllEULAsAccepted()
*/
public Builder allEULAsAccepted(Boolean allEULAsAccepted) {
this.allEULAsAccepted = allEULAsAccepted;
@@ -82,11 +76,9 @@ public class InstantiateVAppTemplateParams
}
public InstantiateVAppTemplateParams build() {
- InstantiateVAppTemplateParams instantiateVAppTemplateParams = new InstantiateVAppTemplateParams();
- instantiateVAppTemplateParams.setAllEULAsAccepted(allEULAsAccepted);
- return instantiateVAppTemplateParams;
+ return new InstantiateVAppTemplateParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone, allEULAsAccepted);
}
-
+
/**
* @see ParamsType#getDescription()
*/
@@ -102,7 +94,7 @@ public class InstantiateVAppTemplateParams
super.name(name);
return this;
}
-
+
/**
* @see VAppCreationParamsType#getVAppParent()
*/
@@ -120,7 +112,7 @@ public class InstantiateVAppTemplateParams
}
/**
- * @see VAppCreationParamsType#getDeploy()
+ * @see VAppCreationParamsType#isDeploy()
*/
public Builder deploy(Boolean deploy) {
super.deploy(deploy);
@@ -128,7 +120,7 @@ public class InstantiateVAppTemplateParams
}
/**
- * @see VAppCreationParamsType#getPowerOn()
+ * @see VAppCreationParamsType#isPowerOn()
*/
public Builder powerOn(Boolean powerOn) {
super.powerOn(powerOn);
@@ -140,58 +132,47 @@ public class InstantiateVAppTemplateParams
*/
@Override
public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType in) {
- return Builder.class.cast(super.fromInstantiateVAppParamsType(in));
+ return Builder.class.cast(super.fromInstantiateVAppParamsType(in));
}
-
+
public Builder fromInstantiateVAppTemplateParams(InstantiateVAppTemplateParams in) {
return fromInstantiateVAppParamsType(in)
- .allEULAsAccepted(in.isAllEULAsAccepted());
+ .allEULAsAccepted(in.isAllEULAsAccepted());
}
}
+ public InstantiateVAppTemplateParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
+ Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone, Boolean allEULAsAccepted) {
+ super(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
+ this.allEULAsAccepted = allEULAsAccepted;
+ }
+
private InstantiateVAppTemplateParams() {
// For JAXB and builder use
}
+ @XmlElement(name = "AllEULAsAccepted")
+ protected Boolean allEULAsAccepted;
- @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.
- *
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public Boolean isAllEULAsAccepted() {
- return allEULAsAccepted;
- }
-
- /**
- * Sets the value of the allEULAsAccepted property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setAllEULAsAccepted(Boolean value) {
- this.allEULAsAccepted = value;
- }
+ /**
+ * 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.
+ *
+ * @return possible object is
+ * {@link Boolean }
+ */
+ public Boolean isAllEULAsAccepted() {
+ return allEULAsAccepted;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
InstantiateVAppTemplateParams that = InstantiateVAppTemplateParams.class.cast(o);
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiationParams.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiationParams.java
index aca8d92e07..6154a70e67 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiationParams.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiationParams.java
@@ -20,13 +20,12 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
+import static com.google.common.base.Preconditions.checkNotNull;
import java.util.ArrayList;
import java.util.List;
-
+import java.util.Set;
import javax.xml.bind.JAXBElement;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
@@ -38,17 +37,17 @@ import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
import com.google.common.base.Objects;
+import com.google.common.collect.Sets;
/**
- *
- * Represents a list of ovf:Section to configure for instantiating a VApp.
- *
- *
+ * Represents a list of ovf:Section to configure for instantiating a VApp.
+ *
+ *
* Java class for InstantiationParams complex type.
- *
+ *
* The following schema fragment specifies the expected content contained within this class.
- *
+ *
*
* <complexType name="InstantiationParams">
* <complexContent>
@@ -61,12 +60,9 @@ import com.google.common.base.Objects;
* </complexContent>
* </complexType>
*
- *
- *
*/
-@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstantiationParams", propOrder = {
- "section"
+ "section"
})
public class InstantiationParams {
public static Builder builder() {
@@ -78,14 +74,13 @@ public class InstantiationParams {
}
public static class Builder {
-
- private List>> sections;
+ private Set extends SectionType>> sections = Sets.newLinkedHashSet();
/**
* @see InstantiationParams#getSections()
*/
- public Builder sections(List>> sections) {
- this.sections = sections;
+ public Builder sections(Set extends SectionType>> sections) {
+ this.sections = checkNotNull(sections, "sections");
return this;
}
@@ -105,67 +100,61 @@ public class InstantiationParams {
// For JAXB and builder use
}
- private InstantiationParams(List>> sections) {
+ private InstantiationParams(Set extends SectionType>> sections) {
this.sections = sections;
}
- @XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/envelope/1", type = JAXBElement.class)
- protected List>> sections;
+ @XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/envelope/1", type = JAXBElement.class)
+ protected Set extends SectionType>> sections = Sets.newLinkedHashSet();
- /**
- *
- * An ovf:Section to configure for instantiation.
- *
- * Gets the value of the section property.
- *
- *
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a set
method for the section property.
- *
- *
- * For example, to add a new item, do as follows:
- *
- * getSection().add(newItem);
- *
- *
- *
- *
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link SectionType }{@code >}
- * {@link JAXBElement }{@code <}{@link VirtualHardwareSection }{@code >}
- * {@link JAXBElement }{@code <}{@link LeaseSettingsSection }{@code >}
- * {@link JAXBElement }{@code <}{@link EulaSection }{@code >}
- * {@link JAXBElement }{@code <}{@link RuntimeInfoSection }{@code >}
- * {@link JAXBElement }{@code <}{@link AnnotationSection }{@code >}
- * {@link JAXBElement }{@code <}{@link DeploymentOptionSection }{@code >}
- * {@link JAXBElement }{@code <}{@link StartupSection }{@code >}
- * {@link JAXBElement }{@code <}{@link ResourceAllocationSection }{@code >}
- * {@link JAXBElement }{@code <}{@link NetworkConnectionSection }{@code >}
- * {@link JAXBElement }{@code <}{@link CustomizationSection }{@code >}
- * {@link JAXBElement }{@code <}{@link ProductSection }{@code >}
- * {@link JAXBElement }{@code <}{@link GuestCustomizationSection }{@code >}
- * {@link JAXBElement }{@code <}{@link org.jclouds.ovf.OperatingSystemSection }{@code >}
- * {@link JAXBElement }{@code <}{@link NetworkConfigSection }{@code >}
- * {@link JAXBElement }{@code <}{@link NetworkSection }{@code >}
- * {@link JAXBElement }{@code <}{@link DiskSection }{@code >}
- * {@link JAXBElement }{@code <}{@link InstallSection }{@code >}
- *
- *
- */
- public List>> getSections() {
- if (sections == null) {
- sections = new ArrayList>>();
- }
- return this.sections;
- }
+ /**
+ * An ovf:Section to configure for instantiation.
+ *
+ * Gets the value of the section property.
+ *
+ *
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a set
method for the section property.
+ *
+ *
+ * For example, to add a new item, do as follows:
+ *
+ * getSection().add(newItem);
+ *
+ *
+ *
+ *
+ * Objects of the following type(s) are allowed in the list
+ * {@link JAXBElement }{@code <}{@link SectionType }{@code >}
+ * {@link JAXBElement }{@code <}{@link VirtualHardwareSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link LeaseSettingsSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link EulaSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link RuntimeInfoSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link AnnotationSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link DeploymentOptionSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link StartupSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link ResourceAllocationSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link NetworkConnectionSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link CustomizationSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link ProductSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link GuestCustomizationSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link org.jclouds.ovf.OperatingSystemSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link NetworkConfigSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link NetworkSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link DiskSection }{@code >}
+ * {@link JAXBElement }{@code <}{@link InstallSection }{@code >}
+ */
+ public Set extends SectionType>> getSections() {
+ return this.sections;
+ }
@Override
public boolean equals(Object o) {
if (this == o)
- return true;
+ return true;
if (o == null || getClass() != o.getClass())
return false;
InstantiationParams that = InstantiationParams.class.cast(o);
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpAddresses.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpAddresses.java
index b2ade6616f..0d2d4b1302 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpAddresses.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpAddresses.java
@@ -20,10 +20,8 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.util.Set;
-
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -33,10 +31,10 @@ import com.google.common.collect.Sets;
/**
* A list of IpAddresses.
- *
+ *
* @author danikov
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "IpAddresses")
+@XmlRootElement(name = "IpAddresses")
public class IpAddresses {
public static Builder builder() {
@@ -83,7 +81,7 @@ public class IpAddresses {
this.ipAddresses = ImmutableSet.copyOf(orgs);
}
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "IpAddress")
+ @XmlElement(name = "IpAddress")
private Set ipAddresses = Sets.newLinkedHashSet();
public Set getIpAddresses() {
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRange.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRange.java
index fa4a45a456..43941e6981 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRange.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRange.java
@@ -19,7 +19,6 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -28,12 +27,12 @@ import com.google.common.base.Objects;
/**
* Represents a range of IP addresses, start and end inclusive.
- *
+ *
* @author danikov
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "IpRange")
+@XmlRootElement(name = "IpRange")
public class IpRange {
-
+
public static Builder builder() {
return new Builder();
}
@@ -43,7 +42,7 @@ public class IpRange {
}
public static class Builder {
-
+
private String startAddress;
private String endAddress;
@@ -71,7 +70,7 @@ public class IpRange {
return startAddress(in.getStartAddress()).endAddress(in.getEndAddress());
}
}
-
+
private IpRange() {
// For JAXB and builder use
}
@@ -80,27 +79,26 @@ public class IpRange {
this.startAddress = startAddress;
this.endAddress = endAddress;
}
-
-
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "StartAddress")
+
+ @XmlElement(name = "StartAddress")
private String startAddress;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "EndAddress")
+ @XmlElement(name = "EndAddress")
private String endAddress;
-
+
/**
* @return Start address of the IP range.
*/
public String getStartAddress() {
return startAddress;
}
-
+
/**
* @return End address of the IP range.
*/
public String getEndAddress() {
return endAddress;
}
-
+
@Override
public boolean equals(Object o) {
if (this == o)
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRanges.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRanges.java
index 4b44ca5deb..f1dd1b0165 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRanges.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpRanges.java
@@ -20,11 +20,9 @@ package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Preconditions.checkNotNull;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
import java.util.Set;
-
-import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlRootElement;
import com.google.common.base.Objects;
@@ -33,10 +31,10 @@ import com.google.common.collect.Sets;
/**
* A list of IpAddresses.
- *
+ *
* @author danikov
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "IpRanges")
+@XmlRootElement(name = "IpRanges")
public class IpRanges {
public static Builder builder() {
@@ -83,7 +81,7 @@ public class IpRanges {
this.ipRanges = ImmutableSet.copyOf(ipRanges);
}
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "IpRange")
+ @XmlElementRef
private Set ipRanges = Sets.newLinkedHashSet();
public Set getIpRanges() {
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpScope.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpScope.java
index ba8db803a5..c1acd7ff5b 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpScope.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/IpScope.java
@@ -19,10 +19,7 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-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.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -30,13 +27,12 @@ import com.google.common.base.Objects;
/**
* Specify network settings like gateway, network mask, DNS servers, IP ranges, etc.
- *
+ *
* @author danikov
*/
-@XmlRootElement(namespace = VCLOUD_1_5_NS, name = "IpScope")
-@XmlAccessorType(XmlAccessType.FIELD)
+@XmlRootElement(name = "IpScope")
public class IpScope {
-
+
public static Builder builder() {
return new Builder();
}
@@ -46,7 +42,7 @@ public class IpScope {
}
public static class Builder {
-
+
private boolean isInherited;
private String gateway;
private String netmask;
@@ -111,7 +107,7 @@ public class IpScope {
this.ipRanges = ipRanges;
return this;
}
-
+
/**
* @see IpScope#getAllocatedIpAddresses()
*/
@@ -121,15 +117,7 @@ public class IpScope {
}
public IpScope build() {
- IpScope ipScope = new IpScope(isInherited);
- ipScope.setGateway(gateway);
- ipScope.setNetmask(netmask);
- ipScope.setDns1(dns1);
- ipScope.setDns2(dns2);
- ipScope.setDnsSuffix(dnsSuffix);
- ipScope.setIpRanges(ipRanges);
- ipScope.setAllocatedIpAddresses(allocatedIpAddresses);
- return ipScope;
+ return new IpScope(isInherited, gateway, netmask, dns1, dns2, dnsSuffix, ipRanges, allocatedIpAddresses);
}
public Builder fromIpScope(IpScope in) {
@@ -142,30 +130,39 @@ public class IpScope {
.allocatedIpAddresses(in.getAllocatedIpAddresses());
}
}
-
+
private IpScope() {
// For JAXB and builder use
}
- private IpScope(boolean isInherited) {
- this.isInherited = isInherited;
+ public IpScope(boolean inherited, String gateway, String netmask, String dns1, String dns2, String dnsSuffix,
+ IpRanges ipRanges, IpAddresses allocatedIpAddresses) {
+ this.isInherited = inherited;
+ this.gateway = gateway;
+ this.netmask = netmask;
+ this.dns1 = dns1;
+ this.dns2 = dns2;
+ this.dnsSuffix = dnsSuffix;
+ this.ipRanges = ipRanges;
+ this.allocatedIpAddresses = allocatedIpAddresses;
}
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "IsInherited")
+
+ @XmlElement(name = "IsInherited")
private boolean isInherited;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "Gateway")
+ @XmlElement(name = "Gateway")
private String gateway;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "Netmask")
+ @XmlElement(name = "Netmask")
private String netmask;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "Dns1")
+ @XmlElement(name = "Dns1")
private String dns1;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "Dns2")
+ @XmlElement(name = "Dns2")
private String dns2;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "DnsSuffix")
+ @XmlElement(name = "DnsSuffix")
private String dnsSuffix;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "IpRanges")
+ @XmlElement(name = "IpRanges")
private IpRanges ipRanges;
- @XmlElement(namespace = VCLOUD_1_5_NS, name = "AllocatedIpAddresses")
+ @XmlElement(name = "AllocatedIpAddresses")
private IpAddresses allocatedIpAddresses;
/**
@@ -174,17 +171,13 @@ public class IpScope {
public boolean isInherited() {
return isInherited;
}
-
+
/**
* @return Gateway of the network..
*/
public String getGateway() {
return gateway;
}
-
- public void setGateway(String gateway) {
- this.gateway = gateway;
- }
/**
* @return Network mask.
@@ -192,10 +185,6 @@ public class IpScope {
public String getNetmask() {
return netmask;
}
-
- public void setNetmask(String netmask) {
- this.netmask = netmask;
- }
/**
* @return Primary DNS server.
@@ -203,21 +192,13 @@ public class IpScope {
public String getDns1() {
return dns1;
}
-
- public void setDns1(String dns1) {
- this.dns1 = dns1;
- }
-
+
/**
* @return Secondary DNS server.
*/
public String getDns2() {
return dns2;
}
-
- public void setDns2(String dns2) {
- this.dns2 = dns2;
- }
/**
* @return DNS suffix.
@@ -225,33 +206,21 @@ public class IpScope {
public String getDnsSuffix() {
return dnsSuffix;
}
-
- public void setDnsSuffix(String dnsSuffix) {
- this.dnsSuffix = dnsSuffix;
- }
-
+
/**
* @return IP ranges used for static pool allocation in the network.
*/
public IpRanges getIpRanges() {
return ipRanges;
}
-
- public void setIpRanges(IpRanges ipRanges) {
- this.ipRanges = ipRanges;
- }
-
+
/**
* @return Read-only list of allocated IP addresses in the network.
*/
public IpAddresses getAllocatedIpAddresses() {
return allocatedIpAddresses;
}
-
- public void setAllocatedIpAddresses(IpAddresses allocatedIpAddresses) {
- this.allocatedIpAddresses = allocatedIpAddresses;
- }
-
+
@Override
public boolean equals(Object o) {
if (this == o)
@@ -285,5 +254,5 @@ public class IpScope {
.add("ipRanges", ipRanges)
.add("allocatedIpAddresses", allocatedIpAddresses).toString();
}
-
+
}
diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/LeaseSettingsSection.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/LeaseSettingsSection.java
index fcae07baa4..84a905f3a9 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/LeaseSettingsSection.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/LeaseSettingsSection.java
@@ -20,14 +20,11 @@
package org.jclouds.vcloud.director.v1_5.domain;
import static com.google.common.base.Objects.equal;
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
+import static com.google.common.base.Preconditions.checkNotNull;
import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlAnyElement;
+import java.util.Collections;
+import java.util.Set;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@@ -37,9 +34,9 @@ import javax.xml.datatype.XMLGregorianCalendar;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
-import org.w3c.dom.Element;
import com.google.common.base.Objects;
+import com.google.common.collect.Sets;
/**
@@ -70,15 +67,13 @@ import com.google.common.base.Objects;
* </complexType>
*
*/
-@XmlAccessorType(XmlAccessType.FIELD)
-@XmlRootElement(name = "LeaseSettingsSection", namespace = VCLOUD_1_5_NS)
+@XmlRootElement(name = "LeaseSettingsSection")
@XmlType(propOrder = {
- "link",
+ "links",
"deploymentLeaseInSeconds",
"storageLeaseInSeconds",
"deploymentLeaseExpiration",
- "storageLeaseExpiration",
- "any"
+ "storageLeaseExpiration"
})
public class LeaseSettingsSection extends SectionType {
public static Builder builder() {
@@ -90,20 +85,19 @@ public class LeaseSettingsSection extends SectionType {
}
public static class Builder extends SectionType.Builder {
- private List links;
+ private Set links = Sets.newLinkedHashSet();
private Integer deploymentLeaseInSeconds;
private Integer storageLeaseInSeconds;
private XMLGregorianCalendar deploymentLeaseExpiration;
private XMLGregorianCalendar storageLeaseExpiration;
- private List any;
private URI href;
private String type;
/**
* @see LeaseSettingsSection#getLinks()
*/
- public Builder links(List links) {
- this.links = links;
+ public Builder links(Set links) {
+ this.links = checkNotNull(links, "links");
return this;
}
@@ -139,14 +133,6 @@ public class LeaseSettingsSection extends SectionType {
return this;
}
- /**
- * @see LeaseSettingsSection#getAny()
- */
- public Builder any(List any) {
- this.any = any;
- return this;
- }
-
/**
* @see LeaseSettingsSection#getHref()
*/
@@ -165,14 +151,9 @@ public class LeaseSettingsSection extends SectionType {
public LeaseSettingsSection build() {
- LeaseSettingsSection leaseSettingsSection = new LeaseSettingsSection(info, links, any);
- leaseSettingsSection.setDeploymentLeaseInSeconds(deploymentLeaseInSeconds);
- leaseSettingsSection.setStorageLeaseInSeconds(storageLeaseInSeconds);
- leaseSettingsSection.setDeploymentLeaseExpiration(deploymentLeaseExpiration);
- leaseSettingsSection.setStorageLeaseExpiration(storageLeaseExpiration);
- leaseSettingsSection.setHref(href);
- leaseSettingsSection.setType(type);
- return leaseSettingsSection;
+ return new LeaseSettingsSection(info, required, links, deploymentLeaseInSeconds,
+ storageLeaseInSeconds, deploymentLeaseExpiration,
+ storageLeaseExpiration, href, type);
}
public Builder fromLeaseSettingsSection(LeaseSettingsSection in) {
@@ -182,7 +163,6 @@ public class LeaseSettingsSection extends SectionType {
.storageLeaseInSeconds(in.getStorageLeaseInSeconds())
.deploymentLeaseExpiration(in.getDeploymentLeaseExpiration())
.storageLeaseExpiration(in.getStorageLeaseExpiration())
- .any(in.getAny())
.href(in.getHref())
.type(in.getType());
}
@@ -202,10 +182,18 @@ public class LeaseSettingsSection extends SectionType {
public Builder info(String info) {
return Builder.class.cast(super.info(info));
}
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Builder required(Boolean required) {
+ return Builder.class.cast(super.required(required));
+ }
}
@XmlElement(name = "Link")
- protected List link;
+ protected Set links;
@XmlElement(name = "DeploymentLeaseInSeconds")
protected Integer deploymentLeaseInSeconds;
@XmlElement(name = "StorageLeaseInSeconds")
@@ -216,18 +204,23 @@ public class LeaseSettingsSection extends SectionType {
@XmlElement(name = "StorageLeaseExpiration")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar storageLeaseExpiration;
- @XmlAnyElement(lax = true)
- protected List any;
@XmlAttribute
@XmlSchemaType(name = "anyURI")
protected URI href;
@XmlAttribute
protected String type;
- private LeaseSettingsSection(@Nullable String info, List