You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ad...@apache.org on 2014/11/17 17:21:25 UTC
[18/32] jclouds-labs git commit: JCLOUDS-780 Remove vcloud-director.
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
deleted file mode 100644
index 22194a1..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppRecord.java
+++ /dev/null
@@ -1,332 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.query;
-
-import static com.google.common.base.Objects.equal;
-
-import java.util.Date;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "VAppRecord")
-@XmlType(name = "QueryResultVAppRecordType")
-public class QueryResultVAppRecord extends QueryResultRecord {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromQueryResultVAppRecord(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
-
- private String name;
- private String vdc;
- private String vdcName;
- private Boolean isPublic;
- private Boolean isEnabled;
- private Boolean isBusy;
- private Date creationDate;
- private String status;
- private String ownerName;
- private Boolean isDeployed;
- private Boolean isInMaintenanceMode;
-
- /**
- * @see QueryResultVAppRecord#getName()
- */
- public B name(String name) {
- this.name = name;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getVdc()
- */
- public B vdc(String vdc) {
- this.vdc = vdc;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getVdcName()
- */
- public B vdcName(String vdcName) {
- this.vdcName = vdcName;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getIsPublic()
- */
- public B isPublic(Boolean isPublic) {
- this.isPublic = isPublic;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getIsEnabled()
- */
- public B isEnabled(Boolean isEnabled) {
- this.isEnabled = isEnabled;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getIsBusy()
- */
- public B isBusy(Boolean isBusy) {
- this.isBusy = isBusy;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getCreationDate()
- */
- public B creationDate(Date creationDate) {
- this.creationDate = creationDate;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getStatus()
- */
- public B status(String status) {
- this.status = status;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getOwnerName()
- */
- public B ownerName(String ownerName) {
- this.ownerName = ownerName;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getIsDeployed()
- */
- public B isDeployed(Boolean isDeployed) {
- this.isDeployed = isDeployed;
- return self();
- }
-
- /**
- * @see QueryResultVAppRecord#getIsInMaintenanceMode()
- */
- public B isInMaintenanceMode(Boolean isInMaintenanceMode) {
- this.isInMaintenanceMode = isInMaintenanceMode;
- return self();
- }
-
- @Override
- public QueryResultVAppRecord build() {
- return new QueryResultVAppRecord(this);
- }
-
- public B fromQueryResultVAppRecord(QueryResultVAppRecord in) {
- return fromQueryResultRecordType(in)
- .name(in.getName())
- .vdc(in.getVdc())
- .vdcName(in.getVdcName())
- .isPublic(in.isIsPublic())
- .isEnabled(in.isIsEnabled())
- .isBusy(in.isIsBusy())
- .creationDate(in.getCreationDate())
- .status(in.getStatus())
- .ownerName(in.getOwnerName())
- .isDeployed(in.isIsDeployed())
- .isInMaintenanceMode(in.isIsInMaintenanceMode());
- }
- }
-
- private QueryResultVAppRecord() {
- // For JAXB and builder use
- }
-
- private QueryResultVAppRecord(Builder<?> builder) {
- super(builder);
- this.name = builder.name;
- this.vdc = builder.vdc;
- this.vdcName = builder.vdcName;
- this.isPublic = builder.isPublic;
- this.isEnabled = builder.isEnabled;
- this.isBusy = builder.isBusy;
- this.creationDate = builder.creationDate;
- this.status = builder.status;
- this.ownerName = builder.ownerName;
- this.isDeployed = builder.isDeployed;
- this.isInMaintenanceMode = builder.isInMaintenanceMode;
- }
-
- @XmlAttribute
- protected String name;
- @XmlAttribute
- protected String vdc;
- @XmlAttribute
- protected String vdcName;
- @XmlAttribute
- protected Boolean isPublic;
- @XmlAttribute
- protected Boolean isEnabled;
- @XmlAttribute
- protected Boolean isBusy;
- @XmlAttribute
- @XmlSchemaType(name = "dateTime")
- protected Date creationDate;
- @XmlAttribute
- protected String status;
- @XmlAttribute
- protected String ownerName;
- @XmlAttribute
- protected Boolean isDeployed;
- @XmlAttribute
- protected Boolean isInMaintenanceMode;
-
- /**
- * Gets the value of the name property.
- */
- public String getName() {
- return name;
- }
-
- /**
- * Gets the value of the vdc property.
- */
- public String getVdc() {
- return vdc;
- }
-
- /**
- * Gets the value of the vdcName property.
- */
- public String getVdcName() {
- return vdcName;
- }
-
- /**
- * Gets the value of the isPublic property.
- */
- public Boolean isIsPublic() {
- return isPublic;
- }
-
- /**
- * Gets the value of the isEnabled property.
- */
- public Boolean isIsEnabled() {
- return isEnabled;
- }
-
- /**
- * Gets the value of the isBusy property.
- */
- public Boolean isIsBusy() {
- return isBusy;
- }
-
- /**
- * Gets the value of the creationDate property.
- */
- public Date getCreationDate() {
- return creationDate;
- }
-
- /**
- * Gets the value of the status property.
- */
- public String getStatus() {
- return status;
- }
-
- /**
- * Gets the value of the ownerName property.
- */
- public String getOwnerName() {
- return ownerName;
- }
-
- /**
- * Gets the value of the isDeployed property.
- */
- public Boolean isIsDeployed() {
- return isDeployed;
- }
-
- /**
- * Gets the value of the isInMaintenanceMode property.
- */
- public Boolean isIsInMaintenanceMode() {
- return isInMaintenanceMode;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- QueryResultVAppRecord that = QueryResultVAppRecord.class.cast(o);
- return super.equals(that) &&
- equal(this.name, that.name) &&
- equal(this.vdc, that.vdc) &&
- equal(this.vdcName, that.vdcName) &&
- equal(this.isPublic, that.isPublic) &&
- equal(this.isEnabled, that.isEnabled) &&
- equal(this.isBusy, that.isBusy) &&
- equal(this.creationDate, that.creationDate) &&
- equal(this.status, that.status) &&
- equal(this.ownerName, that.ownerName) &&
- equal(this.isDeployed, that.isDeployed) &&
- equal(this.isInMaintenanceMode, that.isInMaintenanceMode);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), name, vdc, vdcName, isPublic, isEnabled, isBusy, creationDate, status, ownerName, isDeployed, isInMaintenanceMode);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string()
- .add("name", name)
- .add("vdc", vdc)
- .add("vdcName", vdcName)
- .add("isPublic", isPublic)
- .add("isEnabled", isEnabled)
- .add("isBusy", isBusy)
- .add("creationDate", creationDate)
- .add("status", status)
- .add("ownerName", ownerName)
- .add("isDeployed", isDeployed)
- .add("isInMaintenanceMode", isInMaintenanceMode);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
deleted file mode 100644
index 0c419fb..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVAppTemplateRecord.java
+++ /dev/null
@@ -1,357 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.query;
-
-import static com.google.common.base.Objects.equal;
-
-import java.util.Date;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "VAppTemplateRecord")
-@XmlType(name = "QueryResultVAppTemplateRecordType")
-public class QueryResultVAppTemplateRecord extends QueryResultRecord {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromQueryResultVappTemplateRecord(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
-
- private String ownerName;
- private String catalogName;
- private Boolean isPublished;
- private String name;
- private String vdc;
- private String vdcName;
- private String org;
- private Date creationDate;
- private Boolean isBusy;
- private Boolean isGoldMaster;
- private Boolean isEnabled;
- private String status;
- private Boolean isDeployed;
-
- /**
- * @see QueryResultVAppTemplateRecord#getOwnerName()
- */
- public B ownerName(String ownerName) {
- this.ownerName = ownerName;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#getCatalogName()
- */
- public B catalogName(String catalogName) {
- this.catalogName = catalogName;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#isPublished()
- */
- public B isPublished(Boolean val) {
- this.isPublished = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#getName()
- */
- public B name(String name) {
- this.name = name;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#getVdc()
- */
- public B vdc(String val) {
- this.vdc = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#getVdcName()
- */
- public B vdcName(String val) {
- this.vdcName = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#get()
- */
- public B org(String val) {
- this.org = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#getCreationDate()
- */
- public B creationDate(Date val) {
- this.creationDate = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#isBusy()
- */
- public B isBusy(Boolean val) {
- this.isBusy = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#isGoldMaster()
- */
- public B isGoldMaster(Boolean val) {
- this.isGoldMaster = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#isEnabled()
- */
- public B isEnabled(Boolean isEnabled) {
- this.isPublished = isEnabled;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#getStatus()
- */
- public B status(String val) {
- this.status = val;
- return self();
- }
-
- /**
- * @see QueryResultVAppTemplateRecord#isDeployed()
- */
- public B isDeployed(Boolean val) {
- this.isDeployed = val;
- return self();
- }
-
- @Override
- public QueryResultVAppTemplateRecord build() {
- return new QueryResultVAppTemplateRecord(this);
- }
-
- public B fromQueryResultVappTemplateRecord(QueryResultVAppTemplateRecord in) {
- return fromQueryResultRecordType(in)
- .ownerName(in.getOwnerName())
- .catalogName(in.getCatalogName())
- .name(in.getName())
- .isPublished(in.isPublished())
- .vdc(in.getVdc())
- .vdcName(in.getVdcName())
- .org(in.get())
- .creationDate(in.getCreationDate())
- .isBusy(in.isBusy())
- .isGoldMaster(in.isGoldMaster())
- .isEnabled(in.isEnabled())
- .status(in.getStatus())
- .isDeployed(in.isDeployed());
- }
- }
-
- private QueryResultVAppTemplateRecord(Builder<?> builder) {
- super(builder);
- this.ownerName = builder.ownerName;
- this.catalogName = builder.catalogName;
- this.isPublished = builder.isPublished;
- this.name = builder.name;
- this.vdc = builder.vdc;
- this.vdcName = builder.vdcName;
- this.org = builder.org;
- this.creationDate = builder.creationDate;
- this.isBusy = builder.isBusy;
- this.isGoldMaster = builder.isGoldMaster;
- this.isEnabled = builder.isEnabled;
- this.status = builder.status;
- this.isDeployed = builder.isDeployed;
- }
-
- private QueryResultVAppTemplateRecord() {
- // for JAXB
- }
-
- @XmlAttribute
- private String ownerName;
- @XmlAttribute
- private String catalogName;
- @XmlAttribute
- private Boolean isPublished;
- @XmlAttribute
- private String name;
- @XmlAttribute
- private String vdc;
- @XmlAttribute
- private String vdcName;
- @XmlAttribute
- private String org;
- @XmlAttribute
- private Date creationDate;
- @XmlAttribute
- private Boolean isBusy;
- @XmlAttribute
- private Boolean isGoldMaster;
- @XmlAttribute
- private Boolean isEnabled;
- @XmlAttribute
- private String status;
- @XmlAttribute
- private Boolean isDeployed;
-
- /**
- * Owner name.
- */
- public String getOwnerName() {
- return ownerName;
- }
-
- /**
- * Catalog name.
- */
- public String getCatalogName() {
- return catalogName;
- }
-
- /**
- * Shows whether it is in published catalog.
- */
- public boolean isPublished() {
- return isPublished;
- }
-
- /**
- * Gets the value of the name property.
- *
- * @return possible object is {@link String }
- */
- public String getName() {
- return name;
- }
-
- /**
- * vDC reference or id
- */
- public String getVdc() {
- return vdc;
- }
-
- /**
- * vDC name
- */
- public String getVdcName() {
- return vdcName;
- }
-
- /**
- * Organization reference or id
- */
- public String get() {
- return org;
- }
-
- /**
- * Creation date
- */
- public Date getCreationDate() {
- return creationDate;
- }
-
- /**
- * Shows whether it is busy
- */
- public Boolean isBusy() {
- return isBusy;
- }
-
- /**
- * Shows whether Vapp template is marked as a gold master
- */
- public Boolean isGoldMaster() {
- return isGoldMaster;
- }
-
- /**
- * Shows whether vDC is enabled
- */
- public Boolean isEnabled() {
- return isEnabled;
- }
-
- /**
- * Vapp template status
- */
- public String getStatus() {
- return status;
- }
-
- /**
- * Shows whether it is deployed
- */
- public Boolean isDeployed() {
- return isDeployed;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- QueryResultVAppTemplateRecord that = QueryResultVAppTemplateRecord.class.cast(o);
- return super.equals(that) && equal(ownerName, that.ownerName) && equal(catalogName, that.catalogName)
- && equal(isPublished, that.isPublished) && equal(name, that.name) && equal(vdc, that.vdc) && equal(vdcName, that.vdcName)
- && equal(org, that.org) && equal(creationDate, that.creationDate) && equal(isBusy, that.isBusy)
- && equal(isGoldMaster, that.isGoldMaster) && equal(isEnabled, that.isEnabled) && equal(status, that.status)
- && equal(isDeployed, that.isDeployed);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), ownerName, catalogName, isPublished, name, vdc, vdcName, org, creationDate, isBusy, isGoldMaster, isEnabled, status, isDeployed);
- }
-
- @Override
- public ToStringHelper string() {
- return super.string().add("name", name).add("ownerName", ownerName).add("catalogName", catalogName)
- .add("isPublished", isPublished()).add("vdc", vdc).add("vdcName", vdcName).add("org", org)
- .add("creationDate", creationDate).add("isBusy", isBusy).add("isGoldMaster", isGoldMaster)
- .add("isEnabled", isEnabled).add("status", status).add("isDeployed", isDeployed);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
deleted file mode 100644
index 3ed3da2..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/QueryResultVMRecord.java
+++ /dev/null
@@ -1,406 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.query;
-
-import static com.google.common.base.Objects.equal;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-import com.google.common.base.Objects;
-import com.google.common.base.Objects.ToStringHelper;
-
-@XmlRootElement(name = "VMRecord")
-@XmlType(name = "QueryResultVMRecordType")
-public class QueryResultVMRecord extends QueryResultRecord {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromQueryResultVMRecord(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends QueryResultRecord.Builder<B> {
-
- private String name;
- private String containerName;
- private String container;
- private String vdc;
- private Boolean isVAppTemplate;
- private Boolean isDeleted;
- private String guestOs;
- private Integer numberOfCpus;
- private Integer memoryMB;
- private String status;
- private Boolean isBusy;
- private Boolean isDeployed;
- private Boolean isPublished;
- private Boolean catalogName;
- private Integer hardwareVersion;
- private Boolean isInMaintenanceMode;
-
- /**
- * @see QueryResultVMRecord#getName()
- */
- public B name(String val) {
- this.name = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getContainerName()
- */
- public B containerName(String val) {
- this.containerName = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getContainer()
- */
- public B container(String val) {
- this.container = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getVdc()
- */
- public B vdc(String val) {
- this.vdc = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isVAppTemplate()
- */
- public B isVAppTemplate(Boolean val) {
- this.isVAppTemplate = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isDeleted()
- */
- public B isDeleted(Boolean val) {
- this.isDeleted = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getGuestOs()
- */
- public B guestOs(String val) {
- this.guestOs = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getNumberOfCpus()
- */
- public B numberOfCpus(Integer val) {
- this.numberOfCpus = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getMemoryMB()
- */
- public B memoryMB(Integer val) {
- this.memoryMB = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getStatus()
- */
- public B status(String val) {
- this.status = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isBusy()
- */
- public B isBusy(Boolean val) {
- this.isBusy = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isDeployed()
- */
- public B isDeployed(Boolean val) {
- this.isDeployed = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isPublished()
- */
- public B isPublished(Boolean val) {
- this.isPublished = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isCatalogName()
- */
- public B catalogName(Boolean val) {
- this.catalogName = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#getHardwareVersion()
- */
- public B hardwareVersion(Integer val) {
- this.hardwareVersion = val;
- return self();
- }
-
- /**
- * @see QueryResultVMRecord#isInMaintenanceMode()
- */
- public B isInMaintenanceMode(Boolean val) {
- this.isInMaintenanceMode = val;
- return self();
- }
-
- @Override
- public QueryResultVMRecord build() {
- return new QueryResultVMRecord(this);
- }
-
- public B fromQueryResultVMRecord(QueryResultVMRecord in) {
- return fromQueryResultRecordType(in)
- .name(in.getName())
- .containerName(in.getContainerName())
- .container(in.getContainer())
- .vdc(in.getVdc())
- .isVAppTemplate(in.isVAppTemplate())
- .isDeleted(in.isDeleted())
- .guestOs(in.getGuestOs())
- .numberOfCpus(in.getNumberOfCpus())
- .memoryMB(in.getMemoryMB())
- .status(in.getStatus())
- .isBusy(in.isBusy())
- .isDeployed(in.isDeployed())
- .isPublished(in.isPublished())
- .catalogName(in.isCatalogName())
- .hardwareVersion(in.getHardwareVersion())
- .isInMaintenanceMode(in.isInMaintenanceMode());
- }
-
- }
-
- @XmlAttribute
- private String name;
- @XmlAttribute
- private String containerName;
- @XmlAttribute
- private String container;
- @XmlAttribute
- private String vdc;
- @XmlAttribute
- private Boolean isVAppTemplate;
- @XmlAttribute
- private Boolean isDeleted;
- @XmlAttribute
- private String guestOs;
- @XmlAttribute
- private Integer numberOfCpus;
- @XmlAttribute
- private Integer memoryMB;
- @XmlAttribute
- private String status;
- @XmlAttribute
- private Boolean isBusy;
- @XmlAttribute
- private Boolean isDeployed;
- @XmlAttribute
- private Boolean isPublished;
- @XmlAttribute
- private Boolean catalogName;
- @XmlAttribute
- private Integer hardwareVersion;
- @XmlAttribute
- private Boolean isInMaintenanceMode;
-
- protected QueryResultVMRecord(Builder<?> builder) {
- super(builder);
- this.name = builder.name;
- this.containerName = builder.containerName;
- this.container = builder.container;
- this.vdc = builder.vdc;
- this.isVAppTemplate = builder.isVAppTemplate;
- this.isDeleted = builder.isDeleted;
- this.guestOs = builder.guestOs;
- this.numberOfCpus = builder.numberOfCpus;
- this.memoryMB = builder.memoryMB;
- this.status = builder.status;
- this.isBusy = builder.isBusy;
- this.isDeployed = builder.isDeployed;
- this.isPublished = builder.isPublished;
- this.catalogName = builder.catalogName;
- this.hardwareVersion = builder.hardwareVersion;
- this.isInMaintenanceMode = builder.isInMaintenanceMode;
- }
-
- protected QueryResultVMRecord() {
- // for JAXB
- }
-
- /**
- * name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Vapp name or Vapp template name
- */
- public String getContainerName() {
- return containerName;
- }
-
- /**
- * Vapp or Vapp template
- */
- public String getContainer() {
- return container;
- }
-
- /**
- * vDC reference or id
- */
- public String getVdc() {
- return vdc;
- }
-
- /**
- * Shows whether the VM belongs to VApp or VAppTemplate
- */
- public Boolean isVAppTemplate() {
- return isVAppTemplate;
- }
-
- /**
- * Shows whether it is deleted
- */
- public Boolean isDeleted() {
- return isDeleted;
- }
-
- /**
- * Guest operating system
- */
- public String getGuestOs() {
- return guestOs;
- }
-
- /**
- * Number of CPUs
- */
- public Integer getNumberOfCpus() {
- return numberOfCpus;
- }
-
- /**
- * Memory in MB
- */
- public Integer getMemoryMB() {
- return memoryMB;
- }
-
- /**
- * Status
- */
- public String getStatus() {
- return status;
- }
-
- /**
- * Shows whether it is busy
- */
- public Boolean isBusy() {
- return isBusy;
- }
-
- /**
- * Shows whether it is deployed
- */
- public Boolean isDeployed() {
- return isDeployed;
- }
-
- /**
- * Shows whether it is in published catalog
- */
- public Boolean isPublished() {
- return isPublished;
- }
-
- /**
- * Catalog name
- */
- public Boolean isCatalogName() {
- return catalogName;
- }
-
- /**
- * Hardware version
- */
- public Integer getHardwareVersion() {
- return hardwareVersion;
- }
-
- /**
- * Shows whether it is in maintenance mode
- */
- public Boolean isInMaintenanceMode() {
- return isInMaintenanceMode;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- QueryResultVMRecord that = QueryResultVMRecord.class.cast(o);
-
- return super.equals(that) && equal(name, that.name) && equal(containerName, that.containerName) && equal(container, that.container) && equal(vdc, that.vdc) && equal(isVAppTemplate, that.isVAppTemplate) && equal(isDeleted, that.isDeleted) && equal(guestOs, that.guestOs) && equal(numberOfCpus, that.numberOfCpus) && equal(memoryMB, that.memoryMB) && equal(status, that.status) && equal(isBusy, that.isBusy) && equal(isDeployed, that.isDeployed) && equal(isPublished, that.isPublished) && equal(catalogName, that.catalogName) && equal(hardwareVersion, that.hardwareVersion) && equal(isInMaintenanceMode, that.isInMaintenanceMode);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), name, containerName, container, vdc, isVAppTemplate, isDeleted, guestOs, numberOfCpus, memoryMB, status, isBusy, isDeployed, isPublished, catalogName, hardwareVersion, isInMaintenanceMode);
- }
- @Override
- public ToStringHelper string() {
- return super.string().add("name", name).add("containerName", containerName).add("container", container).add("vdc", vdc).add("isVAppTemplate", isVAppTemplate).add("isDeleted", isDeleted).add("guestOs", guestOs).add("numberOfCpus", numberOfCpus).add("memoryMB", memoryMB).add("status", status).add("isBusy", isBusy).add("isDeployed", isDeployed).add("isPublished", isPublished).add("catalogName", catalogName).add("hardwareVersion", hardwareVersion).add("isInMaintenanceMode", isInMaintenanceMode);
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
deleted file mode 100644
index f0156e5..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/VAppReferences.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.query;
-
-import javax.xml.bind.annotation.XmlRootElement;
-
-@XmlRootElement(name = "VAppReferences")
-public class VAppReferences extends QueryResultReferences {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- @Override
- public Builder<?> toBuilder() {
- return builder().fromVAppReferences(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends QueryResultReferences.Builder<B> {
-
- @Override
- public VAppReferences build() {
- return new VAppReferences(this);
- }
-
- public B fromVAppReferences(VAppReferences in) {
- return fromQueryResultReferences(in);
- }
- }
-
- protected VAppReferences(Builder<?> builder) {
- super(builder);
- }
-
- protected VAppReferences() {
- // for JAXB
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- VAppReferences that = VAppReferences.class.cast(o);
- return super.equals(that);
- }
-
- // NOTE hashcode inherited from QueryResultReferences
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java
deleted file mode 100644
index 28d2c60..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/query/package-info.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-@XmlSchema(namespace = VCLOUD_1_5_NS,
- elementFormDefault = XmlNsForm.QUALIFIED,
- xmlns = {
- @XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS)
- }
-)
-@XmlAccessorType(XmlAccessType.FIELD)
-package org.jclouds.vcloud.director.v1_5.domain.query;
-
-import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlNs;
-import javax.xml.bind.annotation.XmlNsForm;
-import javax.xml.bind.annotation.XmlSchema;
-
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
deleted file mode 100644
index 355798e..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/CustomizationSection.java
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.section;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-@XmlRootElement(name = "CustomizationSection")
-public class CustomizationSection extends SectionType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder<?> toBuilder() {
- return builder().fromCustomizationSection(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends SectionType.Builder<B> {
- private boolean customizeOnInstantiate;
- private Set<Link> links = Sets.newLinkedHashSet();
- private URI href;
- private String type;
-
- /**
- * @see CustomizationSection#isCustomizeOnInstantiate()
- */
- public B customizeOnInstantiate(boolean customizeOnInstantiate) {
- this.customizeOnInstantiate = customizeOnInstantiate;
- return self();
- }
-
- /**
- * @see CustomizationSection#getLinks()
- */
- public B links(Set<Link> links) {
- this.links = checkNotNull(links, "links");
- return self();
- }
-
- /**
- * @see CustomizationSection#getHref()
- */
- public B href(URI href) {
- this.href = href;
- return self();
- }
-
- /**
- * @see CustomizationSection#getType()
- */
- public B type(String type) {
- this.type = type;
- return self();
- }
-
-
- @Override
- public CustomizationSection build() {
- return new CustomizationSection(this);
- }
-
- public B fromCustomizationSection(CustomizationSection in) {
- return fromSectionType(in)
- .customizeOnInstantiate(in.isCustomizeOnInstantiate())
- .links(in.getLinks())
- .href(in.getHref())
- .type(in.getType());
- }
- }
-
- private CustomizationSection(Builder<?> builder) {
- super(builder);
- this.customizeOnInstantiate = builder.customizeOnInstantiate;
- this.links = ImmutableSet.copyOf(builder.links);
- this.href = builder.href;
- this.type = builder.type;
- }
-
- private CustomizationSection() {
- // For JAXB
- }
-
- @XmlElement(name = "CustomizeOnInstantiate", required = true)
- protected boolean customizeOnInstantiate;
- @XmlElement(name = "Link")
- protected Set<Link> links = Sets.newLinkedHashSet();
- @XmlAttribute
- @XmlSchemaType(name = "anyURI")
- protected URI href;
- @XmlAttribute
- protected String type;
-
- /**
- * Gets the value of the customizeOnInstantiate property.
- */
- public boolean isCustomizeOnInstantiate() {
- return customizeOnInstantiate;
- }
-
- /**
- * Gets the value of the links property.
- */
- public Set<Link> getLinks() {
- return Collections.unmodifiableSet(this.links);
- }
-
- /**
- * Gets the value of the href property.
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * Gets the value of the type property.
- */
- public String getType() {
- return type;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- CustomizationSection that = CustomizationSection.class.cast(o);
- return super.equals(that) &&
- equal(customizeOnInstantiate, that.customizeOnInstantiate) &&
- equal(links, that.links) &&
- equal(href, that.href) &&
- equal(type, that.type);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(
- super.hashCode(),
- customizeOnInstantiate,
- links,
- href,
- type);
- }
-
- @Override
- public Objects.ToStringHelper string() {
- return super.string()
- .add("customizeOnInstantiate", customizeOnInstantiate)
- .add("links", links)
- .add("href", href)
- .add("type", type);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
deleted file mode 100644
index 33d3409..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/GuestCustomizationSection.java
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.section;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-@XmlRootElement(name = "GuestCustomizationSection")
-@XmlType(propOrder = {
- "enabled",
- "changeSid",
- "virtualMachineId",
- "joinDomainEnabled",
- "useOrgSettings",
- "domainName",
- "domainUserName",
- "domainUserPassword",
- "adminPasswordEnabled",
- "adminPasswordAuto",
- "adminPassword",
- "resetPasswordRequired",
- "customizationScript",
- "computerName",
- "links"
-})
-public class GuestCustomizationSection extends SectionType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder<?> toBuilder() {
- return builder().fromGuestCustomizationSection(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends SectionType.Builder<B> {
- private Boolean enabled;
- private Boolean changeSid;
- private String virtualMachineId;
- private Boolean joinDomainEnabled;
- private Boolean useOrgSettings;
- private String domainName;
- private String domainUserName;
- private String domainUserPassword;
- private Boolean adminPasswordEnabled;
- private Boolean adminPasswordAuto;
- private String adminPassword;
- private Boolean resetPasswordRequired;
- private String customizationScript;
- private String computerName;
- private Set<Link> links = Sets.newLinkedHashSet();
- private URI href;
- private String type;
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isEnabled()
- */
- public B enabled(Boolean enabled) {
- this.enabled = enabled;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isChangeSid()
- */
- public B changeSid(Boolean changeSid) {
- this.changeSid = changeSid;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getVirtualMachineId()
- */
- public B virtualMachineId(String virtualMachineId) {
- this.virtualMachineId = virtualMachineId;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isJoinDomainEnabled()
- */
- public B joinDomainEnabled(Boolean joinDomainEnabled) {
- this.joinDomainEnabled = joinDomainEnabled;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isUseOrgSettings()
- */
- public B useOrgSettings(Boolean useOrgSettings) {
- this.useOrgSettings = useOrgSettings;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getDomainName()
- */
- public B domainName(String domainName) {
- this.domainName = domainName;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getDomainUserName()
- */
- public B domainUserName(String domainUserName) {
- this.domainUserName = domainUserName;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getDomainUserPassword()
- */
- public B domainUserPassword(String domainUserPassword) {
- this.domainUserPassword = domainUserPassword;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isAdminPasswordEnabled()
- */
- public B adminPasswordEnabled(Boolean adminPasswordEnabled) {
- this.adminPasswordEnabled = adminPasswordEnabled;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isAdminPasswordAuto()
- */
- public B adminPasswordAuto(Boolean adminPasswordAuto) {
- this.adminPasswordAuto = adminPasswordAuto;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getAdminPassword()
- */
- public B adminPassword(String adminPassword) {
- this.adminPassword = adminPassword;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#isResetPasswordRequired()
- */
- public B resetPasswordRequired(Boolean resetPasswordRequired) {
- this.resetPasswordRequired = resetPasswordRequired;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getCustomizationScript()
- */
- public B customizationScript(String customizationScript) {
- this.customizationScript = customizationScript;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getComputerName()
- */
- public B computerName(String computerName) {
- this.computerName = computerName;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getLinks()
- */
- public B links(Set<Link> links) {
- this.links = checkNotNull(links, "links");
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getHref()
- */
- public B href(URI href) {
- this.href = href;
- return self();
- }
-
- /**
- * @see org.jclouds.vcloud.director.v1_5.domain.GuestCustomizationSection#getType()
- */
- public B type(String type) {
- this.type = type;
- return self();
- }
-
- @Override
- public GuestCustomizationSection build() {
- return new GuestCustomizationSection(this);
- }
-
- public B fromGuestCustomizationSection(GuestCustomizationSection in) {
- return fromSectionType(in)
- .enabled(in.isEnabled())
- .changeSid(in.isChangeSid())
- .virtualMachineId(in.getVirtualMachineId())
- .joinDomainEnabled(in.isJoinDomainEnabled())
- .useOrgSettings(in.isUseOrgSettings())
- .domainName(in.getDomainName())
- .domainUserName(in.getDomainUserName())
- .domainUserPassword(in.getDomainUserPassword())
- .adminPasswordEnabled(in.isAdminPasswordEnabled())
- .adminPasswordAuto(in.isAdminPasswordAuto())
- .adminPassword(in.getAdminPassword())
- .resetPasswordRequired(in.isResetPasswordRequired())
- .customizationScript(in.getCustomizationScript())
- .computerName(in.getComputerName())
- .links(in.getLinks())
- .href(in.getHref())
- .type(in.getType());
- }
- }
-
- private GuestCustomizationSection(Builder<?> builder) {
- super(builder);
- this.enabled = builder.enabled;
- this.changeSid = builder.changeSid;
- this.virtualMachineId = builder.virtualMachineId;
- this.joinDomainEnabled = builder.joinDomainEnabled;
- this.useOrgSettings = builder.useOrgSettings;
- this.domainName = builder.domainName;
- this.domainUserName = builder.domainUserName;
- this.domainUserPassword = builder.domainUserPassword;
- this.adminPasswordEnabled = builder.adminPasswordEnabled;
- this.adminPasswordAuto = builder.adminPasswordAuto;
- this.adminPassword = builder.adminPassword;
- this.resetPasswordRequired = builder.resetPasswordRequired;
- this.customizationScript = builder.customizationScript;
- this.computerName = builder.computerName;
- this.href = builder.href;
- this.links = ImmutableSet.copyOf(builder.links);
- this.type = builder.type;
- }
-
- private GuestCustomizationSection() {
- // for JAXB
- }
-
-
- @XmlElement(name = "Enabled")
- private Boolean enabled;
- @XmlElement(name = "ChangeSid")
- private Boolean changeSid;
- @XmlElement(name = "VirtualMachineId")
- private String virtualMachineId;
- @XmlElement(name = "JoinDomainEnabled")
- private Boolean joinDomainEnabled;
- @XmlElement(name = "UseOrgSettings")
- private Boolean useOrgSettings;
- @XmlElement(name = "DomainName")
- private String domainName;
- @XmlElement(name = "DomainUserName")
- private String domainUserName;
- @XmlElement(name = "DomainUserPassword")
- private String domainUserPassword;
- @XmlElement(name = "AdminPasswordEnabled")
- private Boolean adminPasswordEnabled;
- @XmlElement(name = "AdminPasswordAuto")
- private Boolean adminPasswordAuto;
- @XmlElement(name = "AdminPassword")
- private String adminPassword;
- @XmlElement(name = "ResetPasswordRequired")
- private Boolean resetPasswordRequired;
- @XmlElement(name = "CustomizationScript")
- private String customizationScript;
- @XmlElement(name = "ComputerName")
- private String computerName;
- @XmlElement(name = "Link")
- private Set<Link> links = Sets.newLinkedHashSet();
- @XmlAttribute
- @XmlSchemaType(name = "anyURI")
- private URI href;
- @XmlAttribute
- private String type;
-
- /**
- * Gets the value of the enabled property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isEnabled() {
- return enabled;
- }
-
- /**
- * Gets the value of the changeSid property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isChangeSid() {
- return changeSid;
- }
-
- /**
- * Gets the value of the virtualMachineId property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getVirtualMachineId() {
- return virtualMachineId;
- }
-
- /**
- * Gets the value of the joinDomainEnabled property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isJoinDomainEnabled() {
- return joinDomainEnabled;
- }
-
- /**
- * Gets the value of the useOrgSettings property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isUseOrgSettings() {
- return useOrgSettings;
- }
-
-
- /**
- * Gets the value of the domainName property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getDomainName() {
- return domainName;
- }
-
- /**
- * Gets the value of the domainUserName property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getDomainUserName() {
- return domainUserName;
- }
-
- /**
- * Gets the value of the domainUserPassword property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getDomainUserPassword() {
- return domainUserPassword;
- }
-
- /**
- * Gets the value of the adminPasswordEnabled property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isAdminPasswordEnabled() {
- return adminPasswordEnabled;
- }
-
- /**
- * Gets the value of the adminPasswordAuto property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isAdminPasswordAuto() {
- return adminPasswordAuto;
- }
-
- /**
- * Gets the value of the adminPassword property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getAdminPassword() {
- return adminPassword;
- }
-
- /**
- * Gets the value of the resetPasswordRequired property.
- *
- * @return possible object is
- * {@link Boolean }
- */
- public Boolean isResetPasswordRequired() {
- return resetPasswordRequired;
- }
-
- /**
- * Gets the value of the customizationScript property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getCustomizationScript() {
- return customizationScript;
- }
-
- /**
- * Gets the value of the computerName property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getComputerName() {
- return computerName;
- }
-
- /**
- * Gets the value of the link property.
- * <p/>
- * Objects of the following type(s) are allowed in the list
- * {@link Link }
- */
- public Set<Link> getLinks() {
- return Collections.unmodifiableSet(this.links);
- }
-
- /**
- * Gets the value of the href property.
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * Gets the value of the type property.
- *
- * @return possible object is
- * {@link String }
- */
- public String getType() {
- return type;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- GuestCustomizationSection that = GuestCustomizationSection.class.cast(o);
- return super.equals(that) &&
- equal(enabled, that.enabled) &&
- equal(changeSid, that.changeSid) &&
- equal(virtualMachineId, that.virtualMachineId) &&
- equal(joinDomainEnabled, that.joinDomainEnabled) &&
- equal(useOrgSettings, that.useOrgSettings) &&
- equal(domainName, that.domainName) &&
- equal(domainUserName, that.domainUserName) &&
- equal(domainUserPassword, that.domainUserPassword) &&
- equal(adminPasswordEnabled, that.adminPasswordEnabled) &&
- equal(adminPasswordAuto, that.adminPasswordAuto) &&
- equal(adminPassword, that.adminPassword) &&
- equal(resetPasswordRequired, that.resetPasswordRequired) &&
- equal(customizationScript, that.customizationScript) &&
- equal(computerName, that.computerName) &&
- equal(links, that.links) &&
- equal(href, that.href) &&
- equal(type, that.type);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(),
- enabled,
- changeSid,
- virtualMachineId,
- joinDomainEnabled,
- useOrgSettings,
- domainName,
- domainUserName,
- domainUserPassword,
- adminPasswordEnabled,
- adminPasswordAuto,
- adminPassword,
- resetPasswordRequired,
- customizationScript,
- computerName,
- links,
- href,
- type);
- }
-
- @Override
- public Objects.ToStringHelper string() {
- return super.string()
- .add("enabled", enabled)
- .add("changeSid", changeSid)
- .add("virtualMachineId", virtualMachineId)
- .add("joinDomainEnabled", joinDomainEnabled)
- .add("useOrgSettings", useOrgSettings)
- .add("domainName", domainName)
- .add("domainUserName", domainUserName)
- .add("domainUserPassword", domainUserPassword)
- .add("adminPasswordEnabled", adminPasswordEnabled)
- .add("adminPasswordAuto", adminPasswordAuto)
- .add("adminPassword", adminPassword)
- .add("resetPasswordRequired", resetPasswordRequired)
- .add("customizationScript", customizationScript)
- .add("computerName", computerName)
- .add("links", links)
- .add("href", href)
- .add("type", type);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
deleted file mode 100644
index af4d335..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/LeaseSettingsSection.java
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.section;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-@XmlRootElement(name = "LeaseSettingsSection")
-@XmlType(name = "LeaseSettingsSectionType")
-public class LeaseSettingsSection extends SectionType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder<?> toBuilder() {
- return builder().fromLeaseSettingsSection(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends SectionType.Builder<B> {
- private Set<Link> links = Sets.newLinkedHashSet();
- private Integer deploymentLeaseInSeconds;
- private Integer storageLeaseInSeconds;
- private Date deploymentLeaseExpiration;
- private Date storageLeaseExpiration;
- private URI href;
- private String type;
-
- /**
- * @see LeaseSettingsSection#getLinks()
- */
- public B links(Set<Link> links) {
- this.links = checkNotNull(links, "links");
- return self();
- }
-
- /**
- * @see LeaseSettingsSection#getDeploymentLeaseInSeconds()
- */
- public B deploymentLeaseInSeconds(Integer deploymentLeaseInSeconds) {
- this.deploymentLeaseInSeconds = deploymentLeaseInSeconds;
- return self();
- }
-
- /**
- * @see LeaseSettingsSection#getStorageLeaseInSeconds()
- */
- public B storageLeaseInSeconds(Integer storageLeaseInSeconds) {
- this.storageLeaseInSeconds = storageLeaseInSeconds;
- return self();
- }
-
- /**
- * @see LeaseSettingsSection#getDeploymentLeaseExpiration()
- */
- public B deploymentLeaseExpiration(Date deploymentLeaseExpiration) {
- this.deploymentLeaseExpiration = deploymentLeaseExpiration;
- return self();
- }
-
- /**
- * @see LeaseSettingsSection#getStorageLeaseExpiration()
- */
- public B storageLeaseExpiration(Date storageLeaseExpiration) {
- this.storageLeaseExpiration = storageLeaseExpiration;
- return self();
- }
-
- /**
- * @see LeaseSettingsSection#getHref()
- */
- public B href(URI href) {
- this.href = href;
- return self();
- }
-
- /**
- * @see LeaseSettingsSection#getType()
- */
- public B type(String type) {
- this.type = type;
- return self();
- }
-
- @Override
- public LeaseSettingsSection build() {
- return new LeaseSettingsSection(this);
- }
-
- public B fromLeaseSettingsSection(LeaseSettingsSection in) {
- return fromSectionType(in)
- .links(in.getLinks())
- .deploymentLeaseInSeconds(in.getDeploymentLeaseInSeconds())
- .storageLeaseInSeconds(in.getStorageLeaseInSeconds())
- .deploymentLeaseExpiration(in.getDeploymentLeaseExpiration())
- .storageLeaseExpiration(in.getStorageLeaseExpiration())
- .href(in.getHref())
- .type(in.getType());
- }
- }
-
- @XmlElement(name = "Link")
- private Set<Link> links;
- @XmlElement(name = "DeploymentLeaseInSeconds")
- private Integer deploymentLeaseInSeconds;
- @XmlElement(name = "StorageLeaseInSeconds")
- private Integer storageLeaseInSeconds;
- @XmlElement(name = "DeploymentLeaseExpiration")
- @XmlSchemaType(name = "dateTime")
- private Date deploymentLeaseExpiration;
- @XmlElement(name = "StorageLeaseExpiration")
- @XmlSchemaType(name = "dateTime")
- private Date storageLeaseExpiration;
- @XmlAttribute
- @XmlSchemaType(name = "anyURI")
- private URI href;
- @XmlAttribute
- private String type;
-
- private LeaseSettingsSection(Builder<?> builder) {
- super(builder);
- this.links = ImmutableSet.copyOf(builder.links);
- this.deploymentLeaseInSeconds = builder.deploymentLeaseInSeconds;
- this.storageLeaseInSeconds = builder.storageLeaseInSeconds;
- this.deploymentLeaseExpiration = builder.deploymentLeaseExpiration;
- this.storageLeaseExpiration = builder.storageLeaseExpiration;
- this.href = builder.href;
- this.type = builder.type;
- }
-
- private LeaseSettingsSection() {
- // For JAXB
- }
-
- /**
- * Gets the value of the links property.
- */
- public Set<Link> getLinks() {
- return Collections.unmodifiableSet(links);
- }
-
- /**
- * Gets the value of the deploymentLeaseInSeconds property.
- */
- public Integer getDeploymentLeaseInSeconds() {
- return deploymentLeaseInSeconds;
- }
-
- /**
- * Gets the value of the storageLeaseInSeconds property.
- */
- public Integer getStorageLeaseInSeconds() {
- return storageLeaseInSeconds;
- }
-
- /**
- * Gets the value of the deploymentLeaseExpiration property.
- */
- public Date getDeploymentLeaseExpiration() {
- return deploymentLeaseExpiration;
- }
-
- /**
- * Gets the value of the storageLeaseExpiration property.
- */
- public Date getStorageLeaseExpiration() {
- return storageLeaseExpiration;
- }
-
- /**
- * Gets the value of the href property.
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * Gets the value of the type property.
- */
- public String getType() {
- return type;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- LeaseSettingsSection that = LeaseSettingsSection.class.cast(o);
- return super.equals(that) &&
- equal(this.links, that.links) &&
- equal(this.deploymentLeaseInSeconds, that.deploymentLeaseInSeconds) &&
- equal(this.storageLeaseInSeconds, that.storageLeaseInSeconds) &&
- equal(this.deploymentLeaseExpiration, that.deploymentLeaseExpiration) &&
- equal(this.storageLeaseExpiration, that.storageLeaseExpiration) &&
- equal(this.href, that.href) &&
- equal(this.type, that.type);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(),
- links,
- deploymentLeaseInSeconds,
- storageLeaseInSeconds,
- deploymentLeaseExpiration,
- storageLeaseExpiration,
- href,
- type);
- }
-
- @Override
- public Objects.ToStringHelper string() {
- return super.string()
- .add("links", links)
- .add("deploymentLeaseInSeconds", deploymentLeaseInSeconds)
- .add("storageLeaseInSeconds", storageLeaseInSeconds)
- .add("deploymentLeaseExpiration", deploymentLeaseExpiration)
- .add("storageLeaseExpiration", storageLeaseExpiration)
- .add("href", href)
- .add("type", type);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
deleted file mode 100644
index 2dbce4e..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConfigSection.java
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.section;
-
-import static com.google.common.base.Objects.equal;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Collections;
-import java.util.Set;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-import org.jclouds.vcloud.director.v1_5.domain.network.VAppNetworkConfiguration;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-@XmlRootElement(name = "NetworkConfigSection")
-@XmlType(name = "NetworkConfigSectionType")
-public class NetworkConfigSection extends SectionType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder<?> toBuilder() {
- return builder().fromNetworkConfigSection(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends SectionType.Builder<B> {
-
- private Set<Link> links = Sets.newLinkedHashSet();
- private Set<VAppNetworkConfiguration> networkConfigs = Sets.newLinkedHashSet();
- private URI href;
- private String type;
-
- /**
- * @see NetworkConfigSection#getLinks()
- */
- public B links(Set<Link> links) {
- this.links = checkNotNull(links, "links");
- return self();
- }
-
- /**
- * @see NetworkConfigSection#getNetworkConfigs()
- */
- public B networkConfigs(Set<VAppNetworkConfiguration> networkConfigs) {
- this.networkConfigs = checkNotNull(networkConfigs, "networkConfigs");
- return self();
- }
-
- /**
- * @see NetworkConfigSection#getHref()
- */
- public B href(URI href) {
- this.href = href;
- return self();
- }
-
- /**
- * @see NetworkConfigSection#getType()
- */
- public B type(String type) {
- this.type = type;
- return self();
- }
-
-
- @Override
- public NetworkConfigSection build() {
- return new NetworkConfigSection(this);
- }
-
- public B fromNetworkConfigSection(NetworkConfigSection in) {
- return fromSectionType(in)
- .links(in.getLinks())
- .networkConfigs(in.getNetworkConfigs())
- .href(in.getHref())
- .type(in.getType());
- }
- }
-
- @XmlElement(name = "Link")
- protected Set<Link> links = Sets.newLinkedHashSet();
- @XmlElement(name = "NetworkConfig")
- protected Set<VAppNetworkConfiguration> networkConfigs = Sets.newLinkedHashSet();
- @XmlAttribute
- @XmlSchemaType(name = "anyURI")
- protected URI href;
- @XmlAttribute
- protected String type;
-
- public NetworkConfigSection(Builder<?> builder) {
- super(builder);
- this.links = ImmutableSet.copyOf(builder.links);
- this.networkConfigs = ImmutableSet.copyOf(builder.networkConfigs);
- this.href = builder.href;
- this.type = builder.type;
- }
-
- protected NetworkConfigSection() {
- // For JAXB
- }
-
- /**
- * Gets the value of the link property.
- */
- public Set<Link> getLinks() {
- return Collections.unmodifiableSet(this.links);
- }
-
- /**
- * Gets the value of the networkConfig property.
- */
- public Set<VAppNetworkConfiguration> getNetworkConfigs() {
- return Collections.unmodifiableSet(this.networkConfigs);
- }
-
- /**
- * Gets the value of the href property.
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * Gets the value of the type property.
- */
- public String getType() {
- return type;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- NetworkConfigSection that = NetworkConfigSection.class.cast(o);
- return super.equals(that) && equal(links, that.links) && equal(networkConfigs, that.networkConfigs) && equal(href, that.href) && equal(type, that.type);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), links, networkConfigs, href, type);
- }
-
- @Override
- public Objects.ToStringHelper string() {
- return super.string().add("links", links).add("networkConfigs", networkConfigs).add("href", href).add("type", type);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/775b89fd/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
----------------------------------------------------------------------
diff --git a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java b/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
deleted file mode 100644
index 0ef7e78..0000000
--- a/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/section/NetworkConnectionSection.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.vcloud.director.v1_5.domain.section;
-
-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.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlSchemaType;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jclouds.dmtf.ovf.SectionType;
-import org.jclouds.vcloud.director.v1_5.domain.Link;
-import org.jclouds.vcloud.director.v1_5.domain.network.NetworkConnection;
-
-import com.google.common.base.Objects;
-import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Sets;
-
-/**
- * Represents a list of network cards existing in a VM.
- */
-@XmlRootElement(name = "NetworkConnectionSection")
-@XmlType(name = "NetworkConnectionSectionType")
-public class NetworkConnectionSection extends SectionType {
-
- public static Builder<?> builder() {
- return new ConcreteBuilder();
- }
-
- public Builder<?> toBuilder() {
- return builder().fromNetworkConnectionSection(this);
- }
-
- private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
- }
-
- public static class Builder<B extends Builder<B>> extends SectionType.Builder<B> {
-
- private Integer primaryNetworkConnectionIndex;
- private Set<NetworkConnection> networkConnections = Sets.newLinkedHashSet();
- private Set<Link> links = Sets.newLinkedHashSet();
- private URI href;
- private String type;
-
- /**
- * @see NetworkConnectionSection#getPrimaryNetworkConnectionIndex()
- */
- public B primaryNetworkConnectionIndex(Integer primaryNetworkConnectionIndex) {
- this.primaryNetworkConnectionIndex = primaryNetworkConnectionIndex;
- return self();
- }
-
- /**
- * @see NetworkConnectionSection#getNetworkConnections()
- */
- public B networkConnections(Set<NetworkConnection> networkConnections) {
- this.networkConnections = checkNotNull(networkConnections, "networkConnections");
- return self();
- }
-
- /**
- * @see NetworkConnectionSection#getNetworkConnections()
- */
- public B networkConnection(NetworkConnection networkConnection) {
- this.networkConnections.add(checkNotNull(networkConnection, "networkConnection"));
- return self();
- }
-
- /**
- * @see NetworkConnectionSection#getLinks()
- */
- public B links(Set<Link> links) {
- this.links = checkNotNull(links, "links");
- return self();
- }
-
- /**
- * @see NetworkConnectionSection#getLinks()
- */
- public B link(Link link) {
- this.links.add(checkNotNull(link, "link"));
- return self();
- }
-
- /**
- * @see NetworkConnectionSection#getHref()
- */
- public B href(URI href) {
- this.href = href;
- return self();
- }
-
- /**
- * @see NetworkConnectionSection#getType()
- */
- public B type(String type) {
- this.type = type;
- return self();
- }
-
- @Override
- public NetworkConnectionSection build() {
- return new NetworkConnectionSection(this);
- }
-
- public B fromNetworkConnectionSection(NetworkConnectionSection in) {
- return fromSectionType(in)
- .primaryNetworkConnectionIndex(in.getPrimaryNetworkConnectionIndex())
- .networkConnections(Sets.newLinkedHashSet(in.getNetworkConnections()))
- .links(Sets.newLinkedHashSet(in.getLinks()))
- .href(in.getHref())
- .type(in.getType());
- }
- }
-
- private NetworkConnectionSection(Builder<?> builder) {
- super(builder);
- this.primaryNetworkConnectionIndex = builder.primaryNetworkConnectionIndex;
- this.networkConnections = builder.networkConnections != null ? ImmutableSet.copyOf(builder.networkConnections) : Sets.<NetworkConnection>newLinkedHashSet();
- this.links = builder.links != null ? ImmutableSet.copyOf(builder.links) : Sets.<Link>newLinkedHashSet();
- this.href = builder.href;
- this.type = builder.type;
- }
-
- private NetworkConnectionSection() {
- // For JAXB
- }
-
- @XmlElement(name = "PrimaryNetworkConnectionIndex")
- protected Integer primaryNetworkConnectionIndex;
- @XmlElement(name = "NetworkConnection")
- protected Set<NetworkConnection> networkConnections = Sets.newLinkedHashSet();
- @XmlElement(name = "Link")
- protected Set<Link> links = Sets.newLinkedHashSet();
- @XmlAttribute
- @XmlSchemaType(name = "anyURI")
- protected URI href;
- @XmlAttribute
- protected String type;
-
- /**
- * Gets the value of the primaryNetworkConnectionIndex property.
- *
- * @return possible object is {@link Integer }
- */
- public Integer getPrimaryNetworkConnectionIndex() {
- return primaryNetworkConnectionIndex;
- }
-
- /**
- * Gets the value of the networkConnection property.
- */
- public Set<NetworkConnection> getNetworkConnections() {
- return ImmutableSet.copyOf(networkConnections);
- }
-
- /**
- * Gets the value of the link property.
- */
- public Set<Link> getLinks() {
- return ImmutableSet.copyOf(links);
- }
-
- /**
- * @return the value of the href property.
- */
- public URI getHref() {
- return href;
- }
-
- /**
- * Gets the value of the type property.
- *
- * @return possible object is {@link String }
- */
- public String getType() {
- return type;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
- NetworkConnectionSection that = NetworkConnectionSection.class.cast(o);
- return super.equals(that) &&
- equal(primaryNetworkConnectionIndex, that.primaryNetworkConnectionIndex) &&
- equal(networkConnections, that.networkConnections) &&
- equal(links, that.links) &&
- equal(href, that.href) &&
- equal(type, that.type);
- }
-
- @Override
- public int hashCode() {
- return Objects.hashCode(super.hashCode(), primaryNetworkConnectionIndex, networkConnections, links, href, type);
- }
-
- @Override
- public Objects.ToStringHelper string() {
- return super.string().add("primaryNetworkConnectionIndex", primaryNetworkConnectionIndex).add("networkConnection", networkConnections).add("links", links).add("href", href).add("type", type);
- }
-}