domain objects

This commit is contained in:
danikov 2012-02-09 20:24:32 +00:00
parent 4dc708c494
commit 413654b66e
23 changed files with 5248 additions and 0 deletions

View File

@ -0,0 +1,158 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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 javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents a list of references to available networks.
*
*
* <p>Java class for AvailableNetworks complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="AvailableNetworks">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="Network" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AvailableNetworks", propOrder = {
"network"
})
public class AvailableNetworks {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromAvailableNetworks(this);
}
public static class Builder {
private List<Reference> network;
/**
* @see AvailableNetworks#getNetwork()
*/
public Builder network(List<Reference> network) {
this.network = network;
return this;
}
public AvailableNetworks build() {
AvailableNetworks availableNetworks = new AvailableNetworks(network);
return availableNetworks;
}
public Builder fromAvailableNetworks(AvailableNetworks in) {
return network(in.getNetwork());
}
}
private AvailableNetworks() {
// For JAXB and builder use
}
private AvailableNetworks(List<Reference> network) {
this.network = network;
}
@XmlElement(name = "Network")
protected List<Reference> network;
/**
* Gets the value of the network property.
*
* <p>
* 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 <CODE>set</CODE> method for the network property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNetwork().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<Reference> getNetwork() {
if (network == null) {
network = new ArrayList<Reference>();
}
return this.network;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
AvailableNetworks that = AvailableNetworks.class.cast(o);
return equal(network, that.network);
}
@Override
public int hashCode() {
return Objects.hashCode(network);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("network", network).toString();
}
}

View File

@ -0,0 +1,148 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Collection of supported hardware capabilities.
*
*
* <p>Java class for Capabilities complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Capabilities">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="SupportedHardwareVersions" type="{http://www.vmware.com/vcloud/v1.5}SupportedHardwareVersionsType" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Capabilities", propOrder = {
"supportedHardwareVersions"
})
public class Capabilities {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromCapabilities(this);
}
public static class Builder {
private SupportedHardwareVersions supportedHardwareVersions;
/**
* @see Capabilities#getSupportedHardwareVersions()
*/
public Builder supportedHardwareVersions(SupportedHardwareVersions supportedHardwareVersions) {
this.supportedHardwareVersions = supportedHardwareVersions;
return this;
}
public Capabilities build() {
Capabilities capabilities = new Capabilities();
capabilities.setSupportedHardwareVersions(supportedHardwareVersions);
return capabilities;
}
public Builder fromCapabilities(Capabilities in) {
return supportedHardwareVersions(in.getSupportedHardwareVersions());
}
}
private Capabilities() {
// For JAXB and builder use
}
@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;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Capabilities that = Capabilities.class.cast(o);
return equal(supportedHardwareVersions, that.supportedHardwareVersions);
}
@Override
public int hashCode() {
return Objects.hashCode(supportedHardwareVersions);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("supportedHardwareVersions", supportedHardwareVersions).toString();
}
}

View File

@ -0,0 +1,233 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Represents a capacity of a given resource.
*
*
* <p>Java class for Capacity complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Capacity">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="Units" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="Allocated" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* &lt;element name="Limit" type="{http://www.w3.org/2001/XMLSchema}long"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Capacity", propOrder = {
"units",
"allocated",
"limit"
})
@XmlSeeAlso({
// CapacityWithUsageType.class
})
public class CapacityType<T extends CapacityType<T>> {
public static <T extends CapacityType<T>> Builder<T> builder() {
return new Builder<T>();
}
public Builder<T> toBuilder() {
return new Builder<T>().fromCapacityType(this);
}
public static class Builder<T extends CapacityType<T>> {
protected String units;
protected Long allocated;
protected long limit;
/**
* @see CapacityType#getUnits()
*/
public Builder<T> units(String units) {
this.units = units;
return this;
}
/**
* @see CapacityType#getAllocated()
*/
public Builder<T> allocated(Long allocated) {
this.allocated = allocated;
return this;
}
/**
* @see CapacityType#getLimit()
*/
public Builder<T> limit(long limit) {
this.limit = limit;
return this;
}
public CapacityType<T> build() {
CapacityType<T> capacity = new CapacityType<T>();
capacity.setUnits(units);
capacity.setAllocated(allocated);
capacity.setLimit(limit);
return capacity;
}
public Builder<T> fromCapacityType(CapacityType<T> in) {
return units(in.getUnits())
.allocated(in.getAllocated())
.limit(in.getLimit());
}
}
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;
}
/**
* 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;
}
@Override
public boolean equals(Object o) {
if (this == o)
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);
}
@Override
public int hashCode() {
return Objects.hashCode(units,
allocated,
limit);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("units", units)
.add("allocated", allocated)
.add("limit", limit).toString();
}
}

View File

@ -0,0 +1,227 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Represents a capacity and usage of a given resource.
*
*
* <p>Java class for CapacityWithUsage complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CapacityWithUsage">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}CapacityType">
* &lt;sequence>
* &lt;element name="Used" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* &lt;element name="Overhead" type="{http://www.w3.org/2001/XMLSchema}long" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CapacityWithUsage", propOrder = {
"used",
"overhead"
})
public class CapacityWithUsage extends CapacityType<CapacityWithUsage>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromCapacityWithUsage(this);
}
public static class Builder extends CapacityType.Builder<CapacityWithUsage> {
private Long used;
private Long overhead;
/**
* @see CapacityWithUsage#getUsed()
*/
public Builder used(Long used) {
this.used = used;
return this;
}
/**
* @see CapacityWithUsage#getOverhead()
*/
public Builder overhead(Long overhead) {
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;
}
/**
* @see CapacityType#getUnits()
*/
public Builder units(String units) {
this.units = units;
return this;
}
/**
* @see CapacityType#getAllocated()
*/
public Builder allocated(Long allocated) {
this.allocated = allocated;
return this;
}
/**
* @see CapacityType#getLimit()
*/
public Builder limit(long limit) {
this.limit = limit;
return this;
}
@Override
public Builder fromCapacityType(CapacityType<CapacityWithUsage> in) {
return Builder.class.cast(super.fromCapacityType(in));
}
public Builder fromCapacityWithUsage(CapacityWithUsage in) {
return fromCapacityType(in)
.used(in.getUsed())
.overhead(in.getOverhead());
}
}
protected 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;
}
/**
* 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;
}
@Override
public boolean equals(Object o) {
if (this == o)
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);
}
@Override
public int hashCode() {
return Objects.hashCode(used,
overhead);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("used", used)
.add("overhead", overhead).toString();
}
}

View File

@ -0,0 +1,232 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.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;
import org.jclouds.ovf.Section;
import com.google.common.base.Objects;
/**
*
* Represents the parameters for capturing a vApp to a vApp template.
*
*
* <p>Java class for CaptureVAppParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CaptureVAppParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}ParamsType">
* &lt;sequence>
* &lt;element name="Source" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType"/>
* &lt;element ref="{http://schemas.dmtf.org/ovf/envelope/1}Section" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CaptureVAppParams", propOrder = {
"source",
"section"
})
public class CaptureVAppParams
extends ParamsType<CaptureVAppParams>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromCaptureVAppParams(this);
}
public static class Builder extends ParamsType.Builder<CaptureVAppParams> {
private Reference source;
private List<JAXBElement<? extends Section<?>>> sections;
/**
* @see CaptureVAppParams#getSource()
*/
public Builder source(Reference source) {
this.source = source;
return this;
}
/**
* @see CaptureVAppParams#getExtend()
*/
public Builder sections(List<JAXBElement<? extends Section<?>>> sections) {
this.sections = sections;
return this;
}
public CaptureVAppParams build() {
CaptureVAppParams captureVAppParams = new CaptureVAppParams(sections);
captureVAppParams.setSource(source);
return captureVAppParams;
}
@Override
public Builder fromParamsType(ParamsType<CaptureVAppParams> in) {
return Builder.class.cast(super.fromParamsType(in));
}
public Builder fromCaptureVAppParams(CaptureVAppParams in) {
return fromParamsType(in)
.source(in.getSource())
.sections(in.getSections());
}
}
private CaptureVAppParams() {
// For JAXB and builder use
}
private CaptureVAppParams(List<JAXBElement<? extends Section<?>>> sections) {
this.sections = 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<JAXBElement<? extends Section<?>>> sections;
/**
* 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.
*
* <p>
* 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 <CODE>set</CODE> method for the section property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSection().add(newItem);
* </pre>
*
*
* <p>
* 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<JAXBElement<? extends Section<?>>> getSections() {
if (sections == null) {
sections = new ArrayList<JAXBElement<? extends Section<?>>>();
}
return this.sections;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CaptureVAppParams that = CaptureVAppParams.class.cast(o);
return equal(source, that.source) &&
equal(sections, that.sections);
}
@Override
public int hashCode() {
return Objects.hashCode(source,
sections);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("source", source)
.add("sections", sections).toString();
}
}

View File

@ -0,0 +1,200 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Represents parameters for copying a media resource and optionally
* deleting the source.
*
*
* <p>Java class for CloneMediaParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CloneMediaParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}ParamsType">
* &lt;sequence>
* &lt;element name="Source" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType"/>
* &lt;element name="IsSourceDelete" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CloneMediaParams", propOrder = {
"source",
"isSourceDelete"
})
public class CloneMediaParams
extends ParamsType<CloneMediaParams>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromCloneMediaParams(this);
}
public static class Builder extends ParamsType.Builder<CloneMediaParams> {
private Reference source;
private Boolean isSourceDelete;
/**
* @see CloneMediaParams#getSource()
*/
public Builder source(Reference source) {
this.source = source;
return this;
}
/**
* @see CloneMediaParams#getIsSourceDelete()
*/
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;
}
@Override
public Builder fromParamsType(ParamsType<CloneMediaParams> in) {
return Builder.class.cast(super.fromParamsType(in));
}
public Builder fromCloneMediaParams(CloneMediaParams in) {
return fromParamsType(in)
.source(in.getSource())
.isSourceDelete(in.isSourceDelete());
}
}
private CloneMediaParams() {
// For JAXB and builder use
}
@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;
}
/**
* 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;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CloneMediaParams that = CloneMediaParams.class.cast(o);
return equal(source, that.source) &&
equal(isSourceDelete, that.isSourceDelete);
}
@Override
public int hashCode() {
return Objects.hashCode(source,
isSourceDelete);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("source", source)
.add("isSourceDelete", isSourceDelete).toString();
}
}

View File

@ -0,0 +1,107 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.
*
*
* <p>Java class for CloneVAppParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CloneVAppParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}InstantiateVAppParamsType">
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CloneVAppParams")
public class CloneVAppParams
extends InstantiateVAppParamsType<CloneVAppParams>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromCloneVAppParams(this);
}
public static class Builder extends InstantiateVAppParamsType.Builder<CloneVAppParams> {
public CloneVAppParams build() {
CloneVAppParams cloneVAppParams = new CloneVAppParams();
return cloneVAppParams;
}
@Override
public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType<CloneVAppParams> in) {
return Builder.class.cast(super.fromInstantiateVAppParamsType(in));
}
public Builder fromCloneVAppParams(CloneVAppParams in) {
return fromInstantiateVAppParamsType(in);
}
}
private CloneVAppParams() {
// For JAXB and builder use
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CloneVAppParams that = CloneVAppParams.class.cast(o);
return super.equals(that);
}
@Override
public int hashCode() {
return super.hashCode() + Objects.hashCode("");
}
@Override
public String toString() {
return Objects.toStringHelper("").toString();
}
}

View File

@ -0,0 +1,200 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Represents parameters for copying a vApp template and optionally
* deleting the source.
*
*
* <p>Java class for CloneVAppTemplateParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CloneVAppTemplateParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}ParamsType">
* &lt;sequence>
* &lt;element name="Source" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType"/>
* &lt;element name="IsSourceDelete" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CloneVAppTemplateParams", propOrder = {
"source",
"isSourceDelete"
})
public class CloneVAppTemplateParams
extends ParamsType<CloneVAppTemplateParams>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromCloneVAppTemplateParams(this);
}
public static class Builder extends ParamsType.Builder<CloneVAppTemplateParams> {
private Reference source;
private Boolean isSourceDelete;
/**
* @see CloneVAppTemplateParams#getSource()
*/
public Builder source(Reference source) {
this.source = source;
return this;
}
/**
* @see CloneVAppTemplateParams#getIsSourceDelete()
*/
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;
}
@Override
public Builder fromParamsType(ParamsType<CloneVAppTemplateParams> in) {
return Builder.class.cast(super.fromParamsType(in));
}
public Builder fromCloneVAppTemplateParams(CloneVAppTemplateParams in) {
return fromParamsType(in)
.source(in.getSource())
.isSourceDelete(in.isSourceDelete());
}
}
private CloneVAppTemplateParams() {
// For JAXB and builder use
}
@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;
}
/**
* 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;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
CloneVAppTemplateParams that = CloneVAppTemplateParams.class.cast(o);
return equal(source, that.source) &&
equal(isSourceDelete, that.isSourceDelete);
}
@Override
public int hashCode() {
return Objects.hashCode(source,
isSourceDelete);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("source", source)
.add("isSourceDelete", isSourceDelete).toString();
}
}

View File

@ -0,0 +1,261 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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 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;
/**
*
* Represents vApp composition parameters.
*
*
* <p>Java class for ComposeVAppParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ComposeVAppParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VAppCreationParamsType">
* &lt;sequence>
* &lt;element name="SourcedItem" type="{http://www.vmware.com/vcloud/v1.5}SourcedCompositionItemParamType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element ref="{http://www.vmware.com/vcloud/v1.5}AllEULAsAccepted" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="linkedClone" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ComposeVAppParams", propOrder = {
"sourcedItem",
"allEULAsAccepted"
})
@XmlSeeAlso({
// RecomposeVAppParamsType.class
})
public class ComposeVAppParams
extends VAppCreationParamsType<ComposeVAppParams>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromComposeVAppParams(this);
}
public static class Builder extends VAppCreationParamsType.Builder<ComposeVAppParams> {
private List<SourcedCompositionItemParam> sourcedItem;
private Boolean allEULAsAccepted;
private Boolean linkedClone;
/**
* @see ComposeVAppParams#getSourcedItem()
*/
public Builder sourcedItem(List<SourcedCompositionItemParam> sourcedItem) {
this.sourcedItem = sourcedItem;
return this;
}
/**
* @see ComposeVAppParams#getAllEULAsAccepted()
*/
public Builder allEULAsAccepted(Boolean allEULAsAccepted) {
this.allEULAsAccepted = allEULAsAccepted;
return this;
}
/**
* @see ComposeVAppParams#getLinkedClone()
*/
public Builder linkedClone(Boolean linkedClone) {
this.linkedClone = linkedClone;
return this;
}
public ComposeVAppParams build() {
ComposeVAppParams composeVAppParams = new ComposeVAppParams(sourcedItem);
composeVAppParams.setAllEULAsAccepted(allEULAsAccepted);
composeVAppParams.setLinkedClone(linkedClone);
return composeVAppParams;
}
@Override
public Builder fromVAppCreationParamsType(VAppCreationParamsType<ComposeVAppParams> 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());
}
}
private ComposeVAppParams() {
// For JAXB and builder use
}
private ComposeVAppParams(List<SourcedCompositionItemParam> sourcedItem) {
this.sourcedItem = sourcedItem;
}
@XmlElement(name = "SourcedItem")
protected List<SourcedCompositionItemParam> sourcedItem;
@XmlElement(name = "AllEULAsAccepted")
protected Boolean allEULAsAccepted;
@XmlAttribute
protected Boolean linkedClone;
/**
* Gets the value of the sourcedItem property.
*
* <p>
* 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 <CODE>set</CODE> method for the sourcedItem property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSourcedItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SourcedCompositionItemParamType }
*
*
*/
public List<SourcedCompositionItemParam> getSourcedItem() {
if (sourcedItem == null) {
sourcedItem = new ArrayList<SourcedCompositionItemParam>();
}
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;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ComposeVAppParams that = ComposeVAppParams.class.cast(o);
return equal(sourcedItem, that.sourcedItem) &&
equal(allEULAsAccepted, that.allEULAsAccepted) &&
equal(linkedClone, that.linkedClone);
}
@Override
public int hashCode() {
return Objects.hashCode(sourcedItem,
allEULAsAccepted,
linkedClone);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("sourcedItem", sourcedItem)
.add("allEULAsAccepted", allEULAsAccepted)
.add("linkedClone", linkedClone).toString();
}
}

View File

@ -0,0 +1,190 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Represents a compute capacity with units.
*
*
* <p>Java class for ComputeCapacity complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ComputeCapacity">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="Cpu" type="{http://www.vmware.com/vcloud/v1.5}CapacityWithUsageType"/>
* &lt;element name="Memory" type="{http://www.vmware.com/vcloud/v1.5}CapacityWithUsageType"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ComputeCapacity", propOrder = {
"cpu",
"memory"
})
public class ComputeCapacity {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromComputeCapacity(this);
}
public static class Builder {
private CapacityWithUsage cpu;
private CapacityWithUsage memory;
/**
* @see ComputeCapacity#getCpu()
*/
public Builder cpu(CapacityWithUsage cpu) {
this.cpu = cpu;
return this;
}
/**
* @see ComputeCapacity#getMemory()
*/
public Builder memory(CapacityWithUsage memory) {
this.memory = memory;
return this;
}
public ComputeCapacity build() {
ComputeCapacity computeCapacity = new ComputeCapacity();
computeCapacity.setCpu(cpu);
computeCapacity.setMemory(memory);
return computeCapacity;
}
public Builder fromComputeCapacity(ComputeCapacity in) {
return cpu(in.getCpu())
.memory(in.getMemory());
}
}
private ComputeCapacity() {
// For JAXB and builder use
}
@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;
}
@Override
public boolean equals(Object o) {
if (this == o)
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);
}
@Override
public int hashCode() {
return Objects.hashCode(cpu,
memory);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("cpu", cpu)
.add("memory", memory).toString();
}
}

View File

@ -0,0 +1,248 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents vApp instantiation parameters.
*
*
* <p>Java class for InstantiateVAppParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="InstantiateVAppParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VAppCreationParamsType">
* &lt;sequence>
* &lt;element name="Source" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType"/>
* &lt;element name="IsSourceDelete" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="linkedClone" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstantiateVAppParams", propOrder = {
"source",
"isSourceDelete"
})
@XmlSeeAlso({
// InstantiateVAppTemplateParamsType.class,
// CloneVAppParamsType.class
})
public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
extends VAppCreationParamsType<T>
{
public static <T extends InstantiateVAppParamsType<T>> Builder<T> builder() {
return new Builder<T>();
}
public Builder<T> toBuilder() {
return new Builder<T>().fromInstantiateVAppParamsType(this);
}
public static class Builder<T extends InstantiateVAppParamsType<T>> extends VAppCreationParamsType.Builder<T> {
private Reference source;
private Boolean isSourceDelete;
private Boolean linkedClone;
/**
* @see InstantiateVAppParamsType#getSource()
*/
public Builder<T> source(Reference source) {
this.source = source;
return this;
}
/**
* @see InstantiateVAppParamsType#getIsSourceDelete()
*/
public Builder<T> isSourceDelete(Boolean isSourceDelete) {
this.isSourceDelete = isSourceDelete;
return this;
}
/**
* @see InstantiateVAppParamsType#getLinkedClone()
*/
public Builder<T> linkedClone(Boolean linkedClone) {
this.linkedClone = linkedClone;
return this;
}
public InstantiateVAppParamsType<T> build() {
InstantiateVAppParamsType<T> instantiateVAppParams = new InstantiateVAppParamsType<T>();
instantiateVAppParams.setSource(source);
instantiateVAppParams.setIsSourceDelete(isSourceDelete);
instantiateVAppParams.setLinkedClone(linkedClone);
return instantiateVAppParams;
}
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public Builder<T> fromVAppCreationParamsType(VAppCreationParamsType<T> in) {
return Builder.class.cast(super.fromVAppCreationParamsType(in));
}
public Builder<T> fromInstantiateVAppParamsType(InstantiateVAppParamsType<T> in) {
return fromVAppCreationParamsType(in)
.source(in.getSource())
.isSourceDelete(in.isSourceDelete())
.linkedClone(in.isLinkedClone());
}
}
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;
/**
* 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 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;
}
@Override
public boolean equals(Object o) {
if (this == o)
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);
}
@Override
public int hashCode() {
return Objects.hashCode(source,
isSourceDelete,
linkedClone);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("source", source)
.add("isSourceDelete", isSourceDelete)
.add("linkedClone", linkedClone).toString();
}
}

View File

@ -0,0 +1,165 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import com.google.common.base.Objects;
/**
*
* Represents vApp template instantiation parameters.
*
*
* <p>Java class for InstantiateVAppTemplateParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="InstantiateVAppTemplateParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}InstantiateVAppParamsType">
* &lt;sequence>
* &lt;element ref="{http://www.vmware.com/vcloud/v1.5}AllEULAsAccepted" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstantiateVAppTemplateParams", propOrder = {
"allEULAsAccepted"
})
public class InstantiateVAppTemplateParamsType<T extends InstantiateVAppTemplateParamsType<T>>
extends InstantiateVAppParamsType<T>
{
public static <T extends InstantiateVAppTemplateParamsType<T>> Builder<T> builder() {
return new Builder<T>();
}
public Builder<T> toBuilder() {
return new Builder<T>().fromInstantiateVAppTemplateParams(this);
}
public static class Builder<T extends InstantiateVAppTemplateParamsType<T>> extends InstantiateVAppParamsType.Builder<T> {
private Boolean allEULAsAccepted;
/**
* @see InstantiateVAppTemplateParamsType#getAllEULAsAccepted()
*/
public Builder<T> allEULAsAccepted(Boolean allEULAsAccepted) {
this.allEULAsAccepted = allEULAsAccepted;
return this;
}
public InstantiateVAppTemplateParamsType<T> build() {
InstantiateVAppTemplateParamsType<T> instantiateVAppTemplateParams = new InstantiateVAppTemplateParamsType<T>();
instantiateVAppTemplateParams.setAllEULAsAccepted(allEULAsAccepted);
return instantiateVAppTemplateParams;
}
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public Builder<T> fromInstantiateVAppParamsType(InstantiateVAppParamsType<T> in) {
return Builder.class.cast(super.fromInstantiateVAppParamsType(in));
}
public Builder<T> fromInstantiateVAppTemplateParams(InstantiateVAppTemplateParamsType<T> in) {
return fromInstantiateVAppParamsType(in)
.allEULAsAccepted(in.isAllEULAsAccepted());
}
}
private InstantiateVAppTemplateParamsType() {
// For JAXB and builder use
}
@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;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
InstantiateVAppTemplateParamsType<?> that = InstantiateVAppTemplateParamsType.class.cast(o);
return equal(allEULAsAccepted, that.allEULAsAccepted);
}
@Override
public int hashCode() {
return Objects.hashCode(allEULAsAccepted);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("allEULAsAccepted", allEULAsAccepted).toString();
}
}

View File

@ -0,0 +1,180 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.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;
import org.jclouds.ovf.Section;
import com.google.common.base.Objects;
/**
*
* Represents a list of ovf:Section to configure for instantiating a VApp.
*
*
* <p>Java class for InstantiationParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="InstantiationParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element ref="{http://schemas.dmtf.org/ovf/envelope/1}Section" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "InstantiationParams", propOrder = {
"section"
})
public class InstantiationParams {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromInstantiationParams(this);
}
public static class Builder {
private List<JAXBElement<? extends Section<?>>> sections;
/**
* @see InstantiationParams#getExtend()
*/
public Builder sections(List<JAXBElement<? extends Section<?>>> sections) {
this.sections = sections;
return this;
}
public InstantiationParams build() {
InstantiationParams instantiationParams = new InstantiationParams(sections);
return instantiationParams;
}
public Builder fromInstantiationParams(InstantiationParams in) {
return sections(in.getSections());
}
}
private InstantiationParams() {
// For JAXB and builder use
}
private InstantiationParams(List<JAXBElement<? extends Section<?>>> sections) {
this.sections = sections;
}
@XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/envelope/1", type = JAXBElement.class)
protected List<JAXBElement<? extends Section<?>>> sections;
/**
*
* An ovf:Section to configure for instantiation.
* Gets the value of the section property.
*
* <p>
* 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 <CODE>set</CODE> method for the section property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSection().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link SectionType }{@code >}
* {@link JAXBElement }{@code <}{@link VirtualHardwareSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link LeaseSettingsSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link EulaSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link RuntimeInfoSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link AnnotationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link DeploymentOptionSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link StartupSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link ResourceAllocationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link NetworkConnectionSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link CustomizationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link ProductSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link GuestCustomizationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link OperatingSystemSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link NetworkConfigSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link NetworkSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link DiskSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link InstallSectionType }{@code >}
*
*
*/
public List<JAXBElement<? extends Section<?>>> getSections() {
if (sections == null) {
sections = new ArrayList<JAXBElement<? extends Section<?>>>();
}
return this.sections;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
InstantiationParams that = InstantiationParams.class.cast(o);
return equal(sections, that.sections);
}
@Override
public int hashCode() {
return Objects.hashCode(sections);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("sections", sections).toString();
}
}

View File

@ -0,0 +1,188 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents mapping between a VM and vApp network.
*
*
* <p>Java class for NetworkAssignment complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="NetworkAssignment">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;attribute name="innerNetwork" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="containerNetwork" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NetworkAssignment")
public class NetworkAssignment
{
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromNetworkAssignment(this);
}
public static class Builder {
private String innerNetwork;
private String containerNetwork;
/**
* @see NetworkAssignment#getInnerNetwork()
*/
public Builder innerNetwork(String innerNetwork) {
this.innerNetwork = innerNetwork;
return this;
}
/**
* @see NetworkAssignment#getContainerNetwork()
*/
public Builder containerNetwork(String containerNetwork) {
this.containerNetwork = containerNetwork;
return this;
}
public NetworkAssignment build() {
NetworkAssignment networkAssignment = new NetworkAssignment();
networkAssignment.setInnerNetwork(innerNetwork);
networkAssignment.setContainerNetwork(containerNetwork);
return networkAssignment;
}
public Builder fromNetworkAssignment(NetworkAssignment in) {
return innerNetwork(in.getInnerNetwork())
.containerNetwork(in.getContainerNetwork());
}
}
private NetworkAssignment() {
// For JAXB and builder use
}
@XmlAttribute(required = true)
protected String innerNetwork;
@XmlAttribute(required = true)
protected String containerNetwork;
/**
* Gets the value of the innerNetwork property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getInnerNetwork() {
return innerNetwork;
}
/**
* Sets the value of the innerNetwork property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInnerNetwork(String value) {
this.innerNetwork = value;
}
/**
* Gets the value of the containerNetwork property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getContainerNetwork() {
return containerNetwork;
}
/**
* Sets the value of the containerNetwork property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setContainerNetwork(String value) {
this.containerNetwork = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
NetworkAssignment that = NetworkAssignment.class.cast(o);
return equal(innerNetwork, that.innerNetwork) &&
equal(containerNetwork, that.containerNetwork);
}
@Override
public int hashCode() {
return Objects.hashCode(innerNetwork,
containerNetwork);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("innerNetwork", innerNetwork)
.add("containerNetwork", containerNetwork).toString();
}
}

View File

@ -0,0 +1,201 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* A basic type used to specify parameters for operations.
*
*
* <p>Java class for Params complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Params">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Params", propOrder = {
"description"
})
@XmlSeeAlso({
// CaptureVAppParams.class,
// CloneVAppTemplateParams.class,
// CloneMediaParams.class,
// UploadVAppTemplateParams.class,
// ImportVmAsVAppTemplateParams.class,
// ImportMediaParams.class,
// UpdateResourcePoolSetParams.class,
// VAppCreationParams.class
})
public class ParamsType<T extends ParamsType<T>> {
public static <T extends ParamsType<T>> Builder<T> builder() {
return new Builder<T>();
}
public Builder<T> toBuilder() {
return new Builder<T>().fromParamsType(this);
}
public static class Builder<T extends ParamsType<T>>{
private String description;
private String name;
/**
* @see ParamsType#getDescription()
*/
public Builder<T> description(String description) {
this.description = description;
return this;
}
/**
* @see ParamsType#getName()
*/
public Builder<T> name(String name) {
this.name = name;
return this;
}
public ParamsType<T> build() {
ParamsType<T> params = new ParamsType<T>();
params.setDescription(description);
params.setName(name);
return params;
}
public Builder<T> fromParamsType(ParamsType<T> in) {
return description(in.getDescription())
.name(in.getName());
}
}
protected ParamsType() {
// For JAXB and builder use
}
@XmlElement(name = "Description")
protected String description;
@XmlAttribute
protected String name;
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ParamsType<?> that = ParamsType.class.cast(o);
return equal(description, that.description) &&
equal(name, that.name);
}
@Override
public int hashCode() {
return Objects.hashCode(description,
name);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("description", description)
.add("name", name).toString();
}
}

View File

@ -0,0 +1,158 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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 javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents a list of references to resource entities.
*
*
* <p>Java class for ResourceEntities complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ResourceEntities">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="ResourceEntity" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType<?>Type" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ResourceEntities", propOrder = {
"resourceEntity"
})
public class ResourceEntities {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromResourceEntities(this);
}
public static class Builder {
private List<ReferenceType<?>> resourceEntity;
/**
* @see ResourceEntities#getResourceEntity()
*/
public Builder resourceEntity(List<ReferenceType<?>> resourceEntity) {
this.resourceEntity = resourceEntity;
return this;
}
public ResourceEntities build() {
ResourceEntities resourceEntities = new ResourceEntities(resourceEntity);
return resourceEntities;
}
public Builder fromResourceEntities(ResourceEntities in) {
return resourceEntity(in.getResourceEntity());
}
}
private ResourceEntities() {
// For JAXB and builder use
}
private ResourceEntities(List<ReferenceType<?>> resourceEntity) {
this.resourceEntity = resourceEntity;
}
@XmlElement(name = "ResourceEntity")
protected List<ReferenceType<?>> resourceEntity;
/**
* Gets the value of the resourceEntity property.
*
* <p>
* 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 <CODE>set</CODE> method for the resourceEntity property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getResourceEntity().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType<?>Type }
*
*
*/
public List<ReferenceType<?>> getResourceEntity() {
if (resourceEntity == null) {
resourceEntity = new ArrayList<ReferenceType<?>>();
}
return this.resourceEntity;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
ResourceEntities that = ResourceEntities.class.cast(o);
return equal(resourceEntity, that.resourceEntity);
}
@Override
public int hashCode() {
return Objects.hashCode(resourceEntity);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("resourceEntity", resourceEntity).toString();
}
}

View File

@ -0,0 +1,326 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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 javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents a composition item.
*
*
* <p>Java class for SourcedCompositionItemParam complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SourcedCompositionItemParam">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="Source" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType"/>
* &lt;element name="VAppScopedLocalId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="InstantiationParams" type="{http://www.vmware.com/vcloud/v1.5}InstantiationParamsType" minOccurs="0"/>
* &lt;element name="NetworkAssignment" type="{http://www.vmware.com/vcloud/v1.5}NetworkAssignmentType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="sourceDelete" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SourcedCompositionItemParam", propOrder = {
"source",
"vAppScopedLocalId",
"instantiationParams",
"networkAssignment"
})
public class SourcedCompositionItemParam {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromSourcedCompositionItemParam(this);
}
public static class Builder {
private Reference source;
private String vAppScopedLocalId;
private InstantiationParams instantiationParams;
private List<NetworkAssignment> networkAssignment;
private Boolean sourceDelete;
/**
* @see SourcedCompositionItemParam#getSource()
*/
public Builder source(Reference source) {
this.source = source;
return this;
}
/**
* @see SourcedCompositionItemParam#getVAppScopedLocalId()
*/
public Builder vAppScopedLocalId(String vAppScopedLocalId) {
this.vAppScopedLocalId = vAppScopedLocalId;
return this;
}
/**
* @see SourcedCompositionItemParam#getInstantiationParams()
*/
public Builder instantiationParams(InstantiationParams instantiationParams) {
this.instantiationParams = instantiationParams;
return this;
}
/**
* @see SourcedCompositionItemParam#getNetworkAssignment()
*/
public Builder networkAssignment(List<NetworkAssignment> networkAssignment) {
this.networkAssignment = networkAssignment;
return this;
}
/**
* @see SourcedCompositionItemParam#getSourceDelete()
*/
public Builder sourceDelete(Boolean sourceDelete) {
this.sourceDelete = sourceDelete;
return this;
}
public SourcedCompositionItemParam build() {
SourcedCompositionItemParam sourcedCompositionItemParam = new SourcedCompositionItemParam(networkAssignment);
sourcedCompositionItemParam.setSource(source);
sourcedCompositionItemParam.setVAppScopedLocalId(vAppScopedLocalId);
sourcedCompositionItemParam.setInstantiationParams(instantiationParams);
sourcedCompositionItemParam.setSourceDelete(sourceDelete);
return sourcedCompositionItemParam;
}
public Builder fromSourcedCompositionItemParam(SourcedCompositionItemParam in) {
return source(in.getSource())
.vAppScopedLocalId(in.getVAppScopedLocalId())
.instantiationParams(in.getInstantiationParams())
.networkAssignment(in.getNetworkAssignment())
.sourceDelete(in.isSourceDelete());
}
}
private SourcedCompositionItemParam() {
// For JAXB and builder use
}
private SourcedCompositionItemParam(List<NetworkAssignment> networkAssignment) {
this.networkAssignment = networkAssignment;
}
@XmlElement(name = "Source", required = true)
protected Reference source;
@XmlElement(name = "VAppScopedLocalId")
protected String vAppScopedLocalId;
@XmlElement(name = "InstantiationParams")
protected InstantiationParams instantiationParams;
@XmlElement(name = "NetworkAssignment")
protected List<NetworkAssignment> networkAssignment;
@XmlAttribute
protected Boolean sourceDelete;
/**
* 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 vAppScopedLocalId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVAppScopedLocalId() {
return vAppScopedLocalId;
}
/**
* Sets the value of the vAppScopedLocalId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVAppScopedLocalId(String value) {
this.vAppScopedLocalId = value;
}
/**
* Gets the value of the instantiationParams property.
*
* @return
* possible object is
* {@link InstantiationParams }
*
*/
public InstantiationParams getInstantiationParams() {
return instantiationParams;
}
/**
* Sets the value of the instantiationParams property.
*
* @param value
* allowed object is
* {@link InstantiationParams }
*
*/
public void setInstantiationParams(InstantiationParams value) {
this.instantiationParams = value;
}
/**
* Gets the value of the networkAssignment property.
*
* <p>
* 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 <CODE>set</CODE> method for the networkAssignment property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getNetworkAssignment().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link NetworkAssignmentType }
*
*
*/
public List<NetworkAssignment> getNetworkAssignment() {
if (networkAssignment == null) {
networkAssignment = new ArrayList<NetworkAssignment>();
}
return this.networkAssignment;
}
/**
* Gets the value of the sourceDelete property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isSourceDelete() {
return sourceDelete;
}
/**
* Sets the value of the sourceDelete property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setSourceDelete(Boolean value) {
this.sourceDelete = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
SourcedCompositionItemParam that = SourcedCompositionItemParam.class.cast(o);
return equal(source, that.source) &&
equal(vAppScopedLocalId, that.vAppScopedLocalId) &&
equal(instantiationParams, that.instantiationParams) &&
equal(networkAssignment, that.networkAssignment) &&
equal(sourceDelete, that.sourceDelete);
}
@Override
public int hashCode() {
return Objects.hashCode(source,
vAppScopedLocalId,
instantiationParams,
networkAssignment,
sourceDelete);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("source", source)
.add("vAppScopedLocalId", vAppScopedLocalId)
.add("instantiationParams", instantiationParams)
.add("networkAssignment", networkAssignment)
.add("sourceDelete", sourceDelete).toString();
}
}

View File

@ -0,0 +1,158 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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 javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents a list of supported VM hardware versions.
*
*
* <p>Java class for SupportedHardwareVersions complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SupportedHardwareVersions">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="SupportedHardwareVersion" type="{http://www.vmware.com/vcloud/v1.5}SupportedHardwareVersionType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SupportedHardwareVersions", propOrder = {
"supportedHardwareVersion"
})
public class SupportedHardwareVersions {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromSupportedHardwareVersions(this);
}
public static class Builder {
private List<String> supportedHardwareVersion;
/**
* @see SupportedHardwareVersions#getSupportedHardwareVersion()
*/
public Builder supportedHardwareVersion(List<String> supportedHardwareVersion) {
this.supportedHardwareVersion = supportedHardwareVersion;
return this;
}
public SupportedHardwareVersions build() {
SupportedHardwareVersions supportedHardwareVersions = new SupportedHardwareVersions(supportedHardwareVersion);
return supportedHardwareVersions;
}
public Builder fromSupportedHardwareVersions(SupportedHardwareVersions in) {
return supportedHardwareVersion(in.getSupportedHardwareVersion());
}
}
private SupportedHardwareVersions() {
// For JAXB and builder use
}
private SupportedHardwareVersions(List<String> supportedHardwareVersion) {
this.supportedHardwareVersion = supportedHardwareVersion;
}
@XmlElement(name = "SupportedHardwareVersion")
protected List<String> supportedHardwareVersion;
/**
* Gets the value of the supportedHardwareVersion property.
*
* <p>
* 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 <CODE>set</CODE> method for the supportedHardwareVersion property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSupportedHardwareVersion().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getSupportedHardwareVersion() {
if (supportedHardwareVersion == null) {
supportedHardwareVersion = new ArrayList<String>();
}
return this.supportedHardwareVersion;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
SupportedHardwareVersions that = SupportedHardwareVersions.class.cast(o);
return equal(supportedHardwareVersion, that.supportedHardwareVersion);
}
@Override
public int hashCode() {
return Objects.hashCode(supportedHardwareVersion);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("supportedHardwareVersion", supportedHardwareVersion).toString();
}
}

View File

@ -0,0 +1,194 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents vApp Template upload parameters.
*
*
* <p>Java class for UploadVAppTemplateParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="UploadVAppTemplateParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}ParamsType">
* &lt;attribute name="transferFormat" type="{http://www.w3.org/2001/XMLSchema}string" />
* &lt;attribute name="manifestRequired" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "UploadVAppTemplateParams")
public class UploadVAppTemplateParams
extends ParamsType<UploadVAppTemplateParams>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromUploadVAppTemplateParams(this);
}
public static class Builder extends ParamsType.Builder<UploadVAppTemplateParams> {
private String transferFormat;
private Boolean manifestRequired;
/**
* @see UploadVAppTemplateParams#getTransferFormat()
*/
public Builder transferFormat(String transferFormat) {
this.transferFormat = transferFormat;
return this;
}
/**
* @see UploadVAppTemplateParams#getManifestRequired()
*/
public Builder manifestRequired(Boolean manifestRequired) {
this.manifestRequired = manifestRequired;
return this;
}
public UploadVAppTemplateParams build() {
UploadVAppTemplateParams uploadVAppTemplateParams = new UploadVAppTemplateParams();
uploadVAppTemplateParams.setTransferFormat(transferFormat);
uploadVAppTemplateParams.setManifestRequired(manifestRequired);
return uploadVAppTemplateParams;
}
@Override
public Builder fromParamsType(ParamsType<UploadVAppTemplateParams> in) {
return Builder.class.cast(super.fromParamsType(in));
}
public Builder fromUploadVAppTemplateParams(UploadVAppTemplateParams in) {
return fromParamsType(in)
.transferFormat(in.getTransferFormat())
.manifestRequired(in.isManifestRequired());
}
}
private UploadVAppTemplateParams() {
// For JAXB and builder use
}
@XmlAttribute
protected String transferFormat;
@XmlAttribute
protected Boolean manifestRequired;
/**
* Gets the value of the transferFormat property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTransferFormat() {
return transferFormat;
}
/**
* Sets the value of the transferFormat property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTransferFormat(String value) {
this.transferFormat = value;
}
/**
* Gets the value of the manifestRequired property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isManifestRequired() {
return manifestRequired;
}
/**
* Sets the value of the manifestRequired property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setManifestRequired(Boolean value) {
this.manifestRequired = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
UploadVAppTemplateParams that = UploadVAppTemplateParams.class.cast(o);
return equal(transferFormat, that.transferFormat) &&
equal(manifestRequired, that.manifestRequired);
}
@Override
public int hashCode() {
return Objects.hashCode(transferFormat,
manifestRequired);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("transferFormat", transferFormat)
.add("manifestRequired", manifestRequired).toString();
}
}

View File

@ -0,0 +1,289 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents vApp creation parameters.
*
*
* <p>Java class for VAppCreationParams complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="VAppCreationParams">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}ParamsType">
* &lt;sequence>
* &lt;element name="VAppParent" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" minOccurs="0"/>
* &lt;element name="InstantiationParams" type="{http://www.vmware.com/vcloud/v1.5}InstantiationParamsType" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="deploy" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;attribute name="powerOn" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VAppCreationParams", propOrder = {
"vAppParent",
"instantiationParams"
})
@XmlSeeAlso({
// InstantiateOvfParamsType.class,
// ComposeVAppParamsType.class,
// InstantiateVAppParamsType.class,
// ImportVmAsVAppParamsType.class
})
public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
extends ParamsType<T>
{
public static <T extends VAppCreationParamsType<T>> Builder<T> builder() {
return new Builder<T>();
}
public Builder<T> toBuilder() {
return new Builder<T>().fromVAppCreationParamsType(this);
}
public static class Builder<T extends VAppCreationParamsType<T>> extends ParamsType.Builder<T> {
private Reference vAppParent;
private InstantiationParams instantiationParams;
private Boolean deploy;
private Boolean powerOn;
/**
* @see VAppCreationParamsType#getVAppParent()
*/
public Builder<T> vAppParent(Reference vAppParent) {
this.vAppParent = vAppParent;
return this;
}
/**
* @see VAppCreationParamsType#getInstantiationParams()
*/
public Builder<T> instantiationParams(InstantiationParams instantiationParams) {
this.instantiationParams = instantiationParams;
return this;
}
/**
* @see VAppCreationParamsType#getDeploy()
*/
public Builder<T> deploy(Boolean deploy) {
this.deploy = deploy;
return this;
}
/**
* @see VAppCreationParamsType#getPowerOn()
*/
public Builder<T> powerOn(Boolean powerOn) {
this.powerOn = powerOn;
return this;
}
public VAppCreationParamsType<T> build() {
VAppCreationParamsType<T> vAppCreationParams = new VAppCreationParamsType<T>();
vAppCreationParams.setVAppParent(vAppParent);
vAppCreationParams.setInstantiationParams(instantiationParams);
vAppCreationParams.setDeploy(deploy);
vAppCreationParams.setPowerOn(powerOn);
return vAppCreationParams;
}
/**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public Builder<T> fromParamsType(ParamsType<T> in) {
return Builder.class.cast(super.fromParamsType(in));
}
public Builder<T> fromVAppCreationParamsType(VAppCreationParamsType<T> in) {
return fromParamsType(in)
.vAppParent(in.getVAppParent())
.instantiationParams(in.getInstantiationParams())
.deploy(in.isDeploy())
.powerOn(in.isPowerOn());
}
}
protected VAppCreationParamsType() {
// For JAXB and builder use
}
@XmlElement(name = "VAppParent")
protected Reference vAppParent;
@XmlElement(name = "InstantiationParams")
protected InstantiationParams instantiationParams;
@XmlAttribute
protected Boolean deploy;
@XmlAttribute
protected Boolean powerOn;
/**
* Gets the value of the vAppParent property.
*
* @return
* possible object is
* {@link Reference }
*
*/
public Reference getVAppParent() {
return vAppParent;
}
/**
* Sets the value of the vAppParent property.
*
* @param value
* allowed object is
* {@link Reference }
*
*/
public void setVAppParent(Reference value) {
this.vAppParent = value;
}
/**
* Gets the value of the instantiationParams property.
*
* @return
* possible object is
* {@link InstantiationParams }
*
*/
public InstantiationParams getInstantiationParams() {
return instantiationParams;
}
/**
* Sets the value of the instantiationParams property.
*
* @param value
* allowed object is
* {@link InstantiationParams }
*
*/
public void setInstantiationParams(InstantiationParams value) {
this.instantiationParams = value;
}
/**
* Gets the value of the deploy property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isDeploy() {
return deploy;
}
/**
* Sets the value of the deploy property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setDeploy(Boolean value) {
this.deploy = value;
}
/**
* Gets the value of the powerOn property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isPowerOn() {
return powerOn;
}
/**
* Sets the value of the powerOn property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setPowerOn(Boolean value) {
this.powerOn = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
VAppCreationParamsType<?> that = VAppCreationParamsType.class.cast(o);
return equal(vAppParent, that.vAppParent) &&
equal(instantiationParams, that.instantiationParams) &&
equal(deploy, that.deploy) &&
equal(powerOn, that.powerOn);
}
@Override
public int hashCode() {
return Objects.hashCode(vAppParent,
instantiationParams,
deploy,
powerOn);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("vAppParent", vAppParent)
.add("instantiationParams", instantiationParams)
.add("deploy", deploy)
.add("powerOn", powerOn).toString();
}
}

View File

@ -0,0 +1,403 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.JAXBElement;
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.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import org.jclouds.ovf.Section;
import com.google.common.base.Objects;
/**
*
* Represents a vApp template.
*
*
* <p>Java class for VAppTemplate complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="VAppTemplate">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}ResourceEntityType">
* &lt;sequence>
* &lt;element name="Owner" type="{http://www.vmware.com/vcloud/v1.5}OwnerType" minOccurs="0"/>
* &lt;element name="Children" type="{http://www.vmware.com/vcloud/v1.5}VAppTemplateChildrenType" minOccurs="0"/>
* &lt;element ref="{http://schemas.dmtf.org/ovf/envelope/1}Section" maxOccurs="unbounded" minOccurs="0"/>
* &lt;element name="VAppScopedLocalId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="ovfDescriptorUploaded" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* &lt;attribute name="goldMaster" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VAppTemplate", propOrder = {
"owner",
"children",
"section",
"vAppScopedLocalId"
})
public class VAppTemplate
extends ResourceEntityType<VAppTemplate>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromVAppTemplate(this);
}
public static class Builder extends ResourceEntityType.Builder<VAppTemplate> {
private Owner owner;
private VAppTemplateChildren children;
private List<JAXBElement<? extends Section<?>>> sections;
private String vAppScopedLocalId;
private Boolean ovfDescriptorUploaded;
private Boolean goldMaster;
/**
* @see VAppTemplate#getOwner()
*/
public Builder owner(Owner owner) {
this.owner = owner;
return this;
}
/**
* @see VAppTemplate#getChildren()
*/
public Builder children(VAppTemplateChildren children) {
this.children = children;
return this;
}
/**
* @see VAppTemplate#getExtend()
*/
public Builder extend(List<JAXBElement<? extends Section<?>>> sections) {
this.sections = sections;
return this;
}
/**
* @see VAppTemplate#getVAppScopedLocalId()
*/
public Builder vAppScopedLocalId(String vAppScopedLocalId) {
this.vAppScopedLocalId = vAppScopedLocalId;
return this;
}
/**
* @see VAppTemplate#getOvfDescriptorUploaded()
*/
public Builder ovfDescriptorUploaded(Boolean ovfDescriptorUploaded) {
this.ovfDescriptorUploaded = ovfDescriptorUploaded;
return this;
}
/**
* @see VAppTemplate#getGoldMaster()
*/
public Builder goldMaster(Boolean goldMaster) {
this.goldMaster = goldMaster;
return this;
}
public VAppTemplate build() {
VAppTemplate vAppTemplate = new VAppTemplate(sections);
vAppTemplate.setOwner(owner);
vAppTemplate.setChildren(children);
vAppTemplate.setVAppScopedLocalId(vAppScopedLocalId);
vAppTemplate.setOvfDescriptorUploaded(ovfDescriptorUploaded);
vAppTemplate.setGoldMaster(goldMaster);
return vAppTemplate;
}
@Override
public Builder fromResourceEntityType(ResourceEntityType<VAppTemplate> in) {
return Builder.class.cast(super.fromResourceEntityType(in));
}
public Builder fromVAppTemplate(VAppTemplate in) {
return fromResourceEntityType(in)
.owner(in.getOwner())
.children(in.getChildren())
.extend(in.getSections())
.vAppScopedLocalId(in.getVAppScopedLocalId())
.ovfDescriptorUploaded(in.isOvfDescriptorUploaded())
.goldMaster(in.isGoldMaster());
}
}
private VAppTemplate() {
// For JAXB and builder use
}
private VAppTemplate(List<JAXBElement<? extends Section<?>>> sections) {
this.sections = sections;
}
@XmlElement(name = "Owner")
protected Owner owner;
@XmlElement(name = "Children")
protected VAppTemplateChildren children;
@XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/envelope/1", type = JAXBElement.class)
protected List<JAXBElement<? extends Section<?>>> sections;
@XmlElement(name = "VAppScopedLocalId")
protected String vAppScopedLocalId;
@XmlAttribute
protected Boolean ovfDescriptorUploaded;
@XmlAttribute
protected Boolean goldMaster;
/**
* Gets the value of the owner property.
*
* @return
* possible object is
* {@link Owner }
*
*/
public Owner getOwner() {
return owner;
}
/**
* Sets the value of the owner property.
*
* @param value
* allowed object is
* {@link Owner }
*
*/
public void setOwner(Owner value) {
this.owner = value;
}
/**
* Gets the value of the children property.
*
* @return
* possible object is
* {@link VAppTemplateChildren }
*
*/
public VAppTemplateChildren getChildren() {
return children;
}
/**
* Sets the value of the children property.
*
* @param value
* allowed object is
* {@link VAppTemplateChildren }
*
*/
public void setChildren(VAppTemplateChildren value) {
this.children = value;
}
/**
*
* Contains ovf sections for vApp template.
* Gets the value of the section property.
*
* <p>
* 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 <CODE>set</CODE> method for the section property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getSection().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link JAXBElement }{@code <}{@link SectionType }{@code >}
* {@link JAXBElement }{@code <}{@link VirtualHardwareSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link LeaseSettingsSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link EulaSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link RuntimeInfoSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link AnnotationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link DeploymentOptionSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link StartupSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link ResourceAllocationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link NetworkConnectionSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link CustomizationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link ProductSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link GuestCustomizationSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link OperatingSystemSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link NetworkConfigSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link NetworkSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link DiskSectionType }{@code >}
* {@link JAXBElement }{@code <}{@link InstallSectionType }{@code >}
*
*
*/
public List<JAXBElement<? extends Section<?>>> getSections() {
if (sections == null) {
sections = new ArrayList<JAXBElement<? extends Section<?>>>();
}
return this.sections;
}
/**
* Gets the value of the vAppScopedLocalId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getVAppScopedLocalId() {
return vAppScopedLocalId;
}
/**
* Sets the value of the vAppScopedLocalId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setVAppScopedLocalId(String value) {
this.vAppScopedLocalId = value;
}
/**
* Gets the value of the ovfDescriptorUploaded property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isOvfDescriptorUploaded() {
return ovfDescriptorUploaded;
}
/**
* Sets the value of the ovfDescriptorUploaded property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setOvfDescriptorUploaded(Boolean value) {
this.ovfDescriptorUploaded = value;
}
/**
* Gets the value of the goldMaster property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public boolean isGoldMaster() {
if (goldMaster == null) {
return false;
} else {
return goldMaster;
}
}
/**
* Sets the value of the goldMaster property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setGoldMaster(Boolean value) {
this.goldMaster = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
VAppTemplate that = VAppTemplate.class.cast(o);
return equal(owner, that.owner) &&
equal(children, that.children) &&
equal(sections, that.sections) &&
equal(vAppScopedLocalId, that.vAppScopedLocalId) &&
equal(ovfDescriptorUploaded, that.ovfDescriptorUploaded) &&
equal(goldMaster, that.goldMaster);
}
@Override
public int hashCode() {
return Objects.hashCode(owner,
children,
sections,
vAppScopedLocalId,
ovfDescriptorUploaded,
goldMaster);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("owner", owner)
.add("children", children)
.add("sections", sections)
.add("vAppScopedLocalId", vAppScopedLocalId)
.add("ovfDescriptorUploaded", ovfDescriptorUploaded)
.add("goldMaster", goldMaster).toString();
}
}

View File

@ -0,0 +1,158 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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 javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
/**
*
* Represents vApp template children.
*
*
* <p>Java class for VAppTemplateChildren complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="VAppTemplateChildren">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
* &lt;sequence>
* &lt;element name="Vm" type="{http://www.vmware.com/vcloud/v1.5}VAppTemplateType" maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VAppTemplateChildren", propOrder = {
"vm"
})
public class VAppTemplateChildren {
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromVAppTemplateChildren(this);
}
public static class Builder {
private List<VAppTemplate> vm;
/**
* @see VAppTemplateChildren#getVm()
*/
public Builder vm(List<VAppTemplate> vm) {
this.vm = vm;
return this;
}
public VAppTemplateChildren build() {
VAppTemplateChildren vAppTemplateChildren = new VAppTemplateChildren(vm);
return vAppTemplateChildren;
}
public Builder fromVAppTemplateChildren(VAppTemplateChildren in) {
return vm(in.getVm());
}
}
private VAppTemplateChildren() {
// For JAXB and builder use
}
private VAppTemplateChildren(List<VAppTemplate> vm) {
this.vm = vm;
}
@XmlElement(name = "Vm")
protected List<VAppTemplate> vm;
/**
* Gets the value of the vm property.
*
* <p>
* 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 <CODE>set</CODE> method for the vm property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getVm().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link VAppTemplateType }
*
*
*/
public List<VAppTemplate> getVm() {
if (vm == null) {
vm = new ArrayList<VAppTemplate>();
}
return this.vm;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
VAppTemplateChildren that = VAppTemplateChildren.class.cast(o);
return equal(vm, that.vm);
}
@Override
public int hashCode() {
return Objects.hashCode(vm);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("vm", vm).toString();
}
}

View File

@ -0,0 +1,624 @@
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.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.Set;
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;
import javax.xml.bind.annotation.XmlType;
import com.google.common.base.Objects;
import com.google.common.collect.Sets;
/**
*
* Represents a virtual data center (vDC).
*
*
* <p>Java class for Vdc complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Vdc">
* &lt;complexContent>
* &lt;extension base="{http://www.vmware.com/vcloud/v1.5}EntityType">
* &lt;sequence>
* &lt;element name="AllocationModel" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="StorageCapacity" type="{http://www.vmware.com/vcloud/v1.5}CapacityWithUsageType"/>
* &lt;element name="ComputeCapacity" type="{http://www.vmware.com/vcloud/v1.5}ComputeCapacityType"/>
* &lt;element name="ResourceEntities" type="{http://www.vmware.com/vcloud/v1.5}ResourceEntitiesType" minOccurs="0"/>
* &lt;element name="AvailableNetworks" type="{http://www.vmware.com/vcloud/v1.5}AvailableNetworksType" minOccurs="0"/>
* &lt;element name="Capabilities" type="{http://www.vmware.com/vcloud/v1.5}CapabilitiesType" minOccurs="0"/>
* &lt;element name="NicQuota" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="NetworkQuota" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="VmQuota" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* &lt;element name="IsEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
* &lt;/sequence>
* &lt;attribute name="status" type="{http://www.w3.org/2001/XMLSchema}int" />
* &lt;anyAttribute processContents='lax' namespace='##other'/>
* &lt;/extension>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Vdc", propOrder = {
"allocationModel",
"storageCapacity",
"computeCapacity",
"resourceEntities",
"availableNetworks",
"capabilities",
"nicQuota",
"networkQuota",
"vmQuota",
"isEnabled"
})
@XmlSeeAlso({
// AdminVdc.class
})
public class Vdc
extends EntityType<Vdc>
{
@SuppressWarnings("unchecked")
public static Builder builder() {
return new Builder();
}
public Builder toBuilder() {
return new Builder().fromVdc(this);
}
public static class Builder extends EntityType.Builder<Vdc> {
private String allocationModel;
private CapacityWithUsage storageCapacity;
private ComputeCapacity computeCapacity;
private ResourceEntities resourceEntities;
private AvailableNetworks availableNetworks;
private Capabilities capabilities;
private int nicQuota;
private int networkQuota;
private Integer vmQuota;
private Boolean isEnabled;
private Integer status;
/**
* @see Vdc#getAllocationModel()
*/
public Builder allocationModel(String allocationModel) {
this.allocationModel = allocationModel;
return this;
}
/**
* @see Vdc#getStorageCapacity()
*/
public Builder storageCapacity(CapacityWithUsage storageCapacity) {
this.storageCapacity = storageCapacity;
return this;
}
/**
* @see Vdc#getComputeCapacity()
*/
public Builder computeCapacity(ComputeCapacity computeCapacity) {
this.computeCapacity = computeCapacity;
return this;
}
/**
* @see Vdc#getResourceEntities()
*/
public Builder resourceEntities(ResourceEntities resourceEntities) {
this.resourceEntities = resourceEntities;
return this;
}
/**
* @see Vdc#getAvailableNetworks()
*/
public Builder availableNetworks(AvailableNetworks availableNetworks) {
this.availableNetworks = availableNetworks;
return this;
}
/**
* @see Vdc#getCapabilities()
*/
public Builder capabilities(Capabilities capabilities) {
this.capabilities = capabilities;
return this;
}
/**
* @see Vdc#getNicQuota()
*/
public Builder nicQuota(int nicQuota) {
this.nicQuota = nicQuota;
return this;
}
/**
* @see Vdc#getNetworkQuota()
*/
public Builder networkQuota(int networkQuota) {
this.networkQuota = networkQuota;
return this;
}
/**
* @see Vdc#getVmQuota()
*/
public Builder vmQuota(Integer vmQuota) {
this.vmQuota = vmQuota;
return this;
}
/**
* @see Vdc#isEnabled()
*/
public Builder isEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
return this;
}
/**
* @see Vdc#getStatus()
*/
public Builder status(Integer status) {
this.status = status;
return this;
}
public Vdc build() {
Vdc vdc = new Vdc();
vdc.setAllocationModel(allocationModel);
vdc.setStorageCapacity(storageCapacity);
vdc.setComputeCapacity(computeCapacity);
vdc.setResourceEntities(resourceEntities);
vdc.setAvailableNetworks(availableNetworks);
vdc.setCapabilities(capabilities);
vdc.setNicQuota(nicQuota);
vdc.setNetworkQuota(networkQuota);
vdc.setVmQuota(vmQuota);
vdc.setIsEnabled(isEnabled);
vdc.setStatus(status);
return vdc;
}
/**
* @see EntityType#getId()
*/
@Override
public Builder id(String id) {
this.id = id;
return this;
}
/**
* @see EntityType#getTasksInProgress()
*/
@Override
public Builder tasksInProgress(TasksInProgress tasksInProgress) {
this.tasksInProgress = tasksInProgress;
return this;
}
/**
* @see ReferenceType#getHref()
*/
@Override
public Builder href(URI href) {
this.href = href;
return this;
}
/**
* @see ReferenceType#getType()
*/
@Override
public Builder type(String type) {
this.type = type;
return this;
}
/**
* @see ReferenceType#getLinks()
*/
@Override
public Builder links(Set<Link> links) {
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
return this;
}
/**
* @see ReferenceType#getLinks()
*/
@Override
public Builder link(Link link) {
this.links.add(checkNotNull(link, "link"));
return this;
}
@Override
public Builder fromEntityType(EntityType<Vdc> in) {
return Builder.class.cast(super.fromEntityType(in));
}
public Builder fromVdc(Vdc in) {
return fromEntityType(in)
.allocationModel(in.getAllocationModel())
.storageCapacity(in.getStorageCapacity())
.computeCapacity(in.getComputeCapacity())
.resourceEntities(in.getResourceEntities())
.availableNetworks(in.getAvailableNetworks())
.capabilities(in.getCapabilities())
.nicQuota(in.getNicQuota())
.networkQuota(in.getNetworkQuota())
.vmQuota(in.getVmQuota())
.isEnabled(in.isEnabled())
.status(in.getStatus());
}
}
private Vdc() {
// For JAXB and builder use
}
@XmlElement(name = "AllocationModel", required = true)
protected String allocationModel;
@XmlElement(name = "StorageCapacity", required = true)
protected CapacityWithUsage storageCapacity;
@XmlElement(name = "ComputeCapacity", required = true)
protected ComputeCapacity computeCapacity;
@XmlElement(name = "ResourceEntities")
protected ResourceEntities resourceEntities;
@XmlElement(name = "AvailableNetworks")
protected AvailableNetworks availableNetworks;
@XmlElement(name = "Capabilities")
protected Capabilities capabilities;
@XmlElement(name = "NicQuota")
protected int nicQuota;
@XmlElement(name = "NetworkQuota")
protected int networkQuota;
@XmlElement(name = "VmQuota")
protected Integer vmQuota;
@XmlElement(name = "IsEnabled")
protected Boolean isEnabled;
@XmlAttribute
protected Integer status;
/**
* Gets the value of the allocationModel property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAllocationModel() {
return allocationModel;
}
/**
* Sets the value of the allocationModel property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAllocationModel(String value) {
this.allocationModel = value;
}
/**
* Gets the value of the storageCapacity property.
*
* @return
* possible object is
* {@link CapacityWithUsage }
*
*/
public CapacityWithUsage getStorageCapacity() {
return storageCapacity;
}
/**
* Sets the value of the storageCapacity property.
*
* @param value
* allowed object is
* {@link CapacityWithUsage }
*
*/
public void setStorageCapacity(CapacityWithUsage value) {
this.storageCapacity = value;
}
/**
* Gets the value of the computeCapacity property.
*
* @return
* possible object is
* {@link ComputeCapacity }
*
*/
public ComputeCapacity getComputeCapacity() {
return computeCapacity;
}
/**
* Sets the value of the computeCapacity property.
*
* @param value
* allowed object is
* {@link ComputeCapacity }
*
*/
public void setComputeCapacity(ComputeCapacity value) {
this.computeCapacity = value;
}
/**
* Gets the value of the resourceEntities property.
*
* @return
* possible object is
* {@link ResourceEntities }
*
*/
public ResourceEntities getResourceEntities() {
return resourceEntities;
}
/**
* Sets the value of the resourceEntities property.
*
* @param value
* allowed object is
* {@link ResourceEntities }
*
*/
public void setResourceEntities(ResourceEntities value) {
this.resourceEntities = value;
}
/**
* Gets the value of the availableNetworks property.
*
* @return
* possible object is
* {@link AvailableNetworks }
*
*/
public AvailableNetworks getAvailableNetworks() {
return availableNetworks;
}
/**
* Sets the value of the availableNetworks property.
*
* @param value
* allowed object is
* {@link AvailableNetworks }
*
*/
public void setAvailableNetworks(AvailableNetworks value) {
this.availableNetworks = value;
}
/**
* Gets the value of the capabilities property.
*
* @return
* possible object is
* {@link Capabilities }
*
*/
public Capabilities getCapabilities() {
return capabilities;
}
/**
* Sets the value of the capabilities property.
*
* @param value
* allowed object is
* {@link Capabilities }
*
*/
public void setCapabilities(Capabilities value) {
this.capabilities = value;
}
/**
* Gets the value of the nicQuota property.
*
*/
public int getNicQuota() {
return nicQuota;
}
/**
* Sets the value of the nicQuota property.
*
*/
public void setNicQuota(int value) {
this.nicQuota = value;
}
/**
* Gets the value of the networkQuota property.
*
*/
public int getNetworkQuota() {
return networkQuota;
}
/**
* Sets the value of the networkQuota property.
*
*/
public void setNetworkQuota(int value) {
this.networkQuota = value;
}
/**
* Gets the value of the vmQuota property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getVmQuota() {
return vmQuota;
}
/**
* Sets the value of the vmQuota property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setVmQuota(Integer value) {
this.vmQuota = value;
}
/**
* Gets the value of the isEnabled property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isEnabled() {
return isEnabled;
}
/**
* Sets the value of the isEnabled property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setIsEnabled(Boolean value) {
this.isEnabled = value;
}
/**
* Gets the value of the status property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getStatus() {
return status;
}
/**
* Sets the value of the status property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setStatus(Integer value) {
this.status = value;
}
@Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
Vdc that = Vdc.class.cast(o);
return equal(allocationModel, that.allocationModel) &&
equal(storageCapacity, that.storageCapacity) &&
equal(computeCapacity, that.computeCapacity) &&
equal(resourceEntities, that.resourceEntities) &&
equal(availableNetworks, that.availableNetworks) &&
equal(capabilities, that.capabilities) &&
equal(nicQuota, that.nicQuota) &&
equal(networkQuota, that.networkQuota) &&
equal(vmQuota, that.vmQuota) &&
equal(isEnabled, that.isEnabled) &&
equal(status, that.status);
}
@Override
public int hashCode() {
return Objects.hashCode(allocationModel,
storageCapacity,
computeCapacity,
resourceEntities,
availableNetworks,
capabilities,
nicQuota,
networkQuota,
vmQuota,
isEnabled,
status);
}
@Override
public String toString() {
return Objects.toStringHelper("")
.add("allocationModel", allocationModel)
.add("storageCapacity", storageCapacity)
.add("computeCapacity", computeCapacity)
.add("resourceEntities", resourceEntities)
.add("availableNetworks", availableNetworks)
.add("capabilities", capabilities)
.add("nicQuota", nicQuota)
.add("networkQuota", networkQuota)
.add("vmQuota", vmQuota)
.add("isEnabled", isEnabled)
.add("status", status).toString();
}
}