mirror of https://github.com/apache/jclouds.git
Reorganized domain objects in sub-packages for easier assimilation
This commit is contained in:
parent
5a3d2a11d6
commit
585cfae860
|
@ -36,6 +36,14 @@ import org.jclouds.dmtf.ovf.NetworkSection;
|
||||||
import org.jclouds.dmtf.ovf.ProductSection;
|
import org.jclouds.dmtf.ovf.ProductSection;
|
||||||
import org.jclouds.dmtf.ovf.SectionType;
|
import org.jclouds.dmtf.ovf.SectionType;
|
||||||
import org.jclouds.dmtf.ovf.StartupSection;
|
import org.jclouds.dmtf.ovf.StartupSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.CustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
@ -52,7 +60,7 @@ import com.google.common.collect.Sets;
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlType(name = "AbstractVAppType")
|
@XmlType(name = "AbstractVAppType")
|
||||||
public abstract class AbstractVAppType extends ResourceEntityType {
|
public abstract class AbstractVAppType extends ResourceEntity {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -66,7 +74,7 @@ public abstract class AbstractVAppType extends ResourceEntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceEntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends ResourceEntity.Builder<B> {
|
||||||
|
|
||||||
private Boolean deployed;
|
private Boolean deployed;
|
||||||
private Reference vAppParent;
|
private Reference vAppParent;
|
||||||
|
|
|
@ -21,6 +21,7 @@ package org.jclouds.vcloud.director.v1_5.domain;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Admin representation of the container for meta data (key-value pair) associated to different
|
* Admin representation of the container for meta data (key-value pair) associated to different
|
||||||
* entities in the system.
|
* entities in the system.
|
||||||
|
@ -39,7 +40,7 @@ import javax.xml.bind.annotation.XmlType;
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "AdminCatalog")
|
@XmlRootElement(name = "AdminCatalog")
|
||||||
@XmlType(name = "AdminCatalogType")
|
@XmlType(name = "AdminCatalogType")
|
||||||
public class AdminCatalog extends CatalogType {
|
public class AdminCatalog extends Catalog {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -53,7 +54,7 @@ public class AdminCatalog extends CatalogType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends CatalogType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Catalog.Builder<B> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AdminCatalog build() {
|
public AdminCatalog build() {
|
||||||
|
|
|
@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,21 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain;
|
||||||
|
|
||||||
|
import static com.google.common.base.Objects.equal;
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
import com.google.common.base.Objects;
|
||||||
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Container for references to {@link VAppTemplate} and {@link Media} objects.
|
* Container for references to {@link VAppTemplate} and {@link Media} objects.
|
||||||
|
@ -30,13 +41,12 @@ import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||||
* <complexType name="CatalogType" />
|
* <complexType name="CatalogType" />
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author grkvlt@apache.org
|
* @author danikov
|
||||||
*/
|
*/
|
||||||
@XmlSeeAlso({ AdminCatalog.class })
|
@XmlSeeAlso({ AdminCatalog.class })
|
||||||
@XmlRootElement(name = "Catalog")
|
@XmlRootElement(name = "Catalog")
|
||||||
public class Catalog extends CatalogType {
|
@XmlType(name = "CatalogType")
|
||||||
|
public class Catalog extends Entity {
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG;
|
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -44,30 +54,131 @@ public class Catalog extends CatalogType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<?> toBuilder() {
|
public Builder<?> toBuilder() {
|
||||||
return builder().fromCatalog(this);
|
return builder().fromCatalogType(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends CatalogType.Builder<B> {
|
public static class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
|
private Owner owner;
|
||||||
|
private Set<Reference> catalogItems = Sets.newLinkedHashSet();
|
||||||
|
private Boolean isPublished;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see CatalogType#getOwner()
|
||||||
|
*/
|
||||||
|
public B owner(Owner owner) {
|
||||||
|
this.owner = owner;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see CatalogItems#getCatalogItems()
|
||||||
|
*/
|
||||||
|
public B items(Iterable<Reference> catalogItems) {
|
||||||
|
this.catalogItems = Sets.newLinkedHashSet(checkNotNull(catalogItems, "catalogItems"));
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see CatalogItems#getCatalogItems()
|
||||||
|
*/
|
||||||
|
public B item(Reference catalogItem) {
|
||||||
|
this.catalogItems.add(checkNotNull(catalogItem, "catalogItem"));
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see CatalogType#isPublished()
|
||||||
|
*/
|
||||||
|
public B isPublished(Boolean isPublished) {
|
||||||
|
this.isPublished = isPublished;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see CatalogType#isPublished()
|
||||||
|
*/
|
||||||
|
public B published() {
|
||||||
|
this.isPublished = Boolean.TRUE;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Catalog build() {
|
public Catalog build() {
|
||||||
return new Catalog(this);
|
return new Catalog(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromCatalog(Catalog in) {
|
public B fromCatalogType(Catalog in) {
|
||||||
return fromCatalogType(in);
|
return fromEntityType(in).owner(in.getOwner()).items(in.getCatalogItems()).isPublished(in.isPublished());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Catalog(Builder<?> builder) {
|
protected Catalog(Builder<?> builder) {
|
||||||
super(builder);
|
super(builder);
|
||||||
|
this.owner = builder.owner;
|
||||||
|
this.catalogItems = builder.catalogItems == null || builder.catalogItems.isEmpty() ? null : ImmutableSet.copyOf(builder.catalogItems);
|
||||||
|
this.isPublished = builder.isPublished;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
protected Catalog() {
|
||||||
private Catalog() {
|
// For JAXB
|
||||||
// for JAXB
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@XmlElement(name = "Owner")
|
||||||
|
private Owner owner;
|
||||||
|
@XmlElementWrapper(name = "CatalogItems")
|
||||||
|
@XmlElement(name = "CatalogItem")
|
||||||
|
private Set<Reference> catalogItems;
|
||||||
|
@XmlElement(name = "IsPublished")
|
||||||
|
private Boolean isPublished;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the owner property.
|
||||||
|
*/
|
||||||
|
public Owner getOwner() {
|
||||||
|
return owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the catalogItems property.
|
||||||
|
*/
|
||||||
|
public Set<Reference> getCatalogItems() {
|
||||||
|
return catalogItems == null ? ImmutableSet.<Reference>of() : ImmutableSet.copyOf(catalogItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the value of the isPublished property.
|
||||||
|
*/
|
||||||
|
public Boolean isPublished() {
|
||||||
|
return isPublished;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
Catalog that = Catalog.class.cast(o);
|
||||||
|
return super.equals(that) &&
|
||||||
|
equal(this.owner, that.owner) &&
|
||||||
|
equal(this.getCatalogItems(), that.getCatalogItems()) &&
|
||||||
|
equal(this.isPublished, that.isPublished);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hashCode(super.hashCode(), owner, getCatalogItems(), catalogItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ToStringHelper string() {
|
||||||
|
return super.string().add("owner", owner)
|
||||||
|
.add("catalogItems", getCatalogItems())
|
||||||
|
.add("isPublished", isPublished);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ import com.google.common.collect.Sets;
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "CatalogItem")
|
@XmlRootElement(name = "CatalogItem")
|
||||||
public class CatalogItem extends EntityType {
|
public class CatalogItem extends Entity {
|
||||||
|
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG_ITEM;
|
public static final String MEDIA_TYPE = VCloudDirectorMediaType.CATALOG_ITEM;
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ public class CatalogItem extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
private Reference entity;
|
private Reference entity;
|
||||||
private Set<Property> properties = Sets.newLinkedHashSet();
|
private Set<Property> properties = Sets.newLinkedHashSet();
|
||||||
|
|
|
@ -1,180 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. jclouds licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
|
||||||
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Container for references to VappTemplate and Media objects.
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* <complexType name="CatalogType" />
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author danikov
|
|
||||||
*/
|
|
||||||
@XmlRootElement(name = "Catalog")
|
|
||||||
public class CatalogType extends EntityType {
|
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
|
||||||
return new ConcreteBuilder();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Builder<?> toBuilder() {
|
|
||||||
return builder().fromCatalogType(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
|
||||||
|
|
||||||
private Owner owner;
|
|
||||||
private Set<Reference> catalogItems = Sets.newLinkedHashSet();
|
|
||||||
private Boolean isPublished;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CatalogType#getOwner()
|
|
||||||
*/
|
|
||||||
public B owner(Owner owner) {
|
|
||||||
this.owner = owner;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CatalogItems#getCatalogItems()
|
|
||||||
*/
|
|
||||||
public B items(Iterable<Reference> catalogItems) {
|
|
||||||
this.catalogItems = Sets.newLinkedHashSet(checkNotNull(catalogItems, "catalogItems"));
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CatalogItems#getCatalogItems()
|
|
||||||
*/
|
|
||||||
public B item(Reference catalogItem) {
|
|
||||||
this.catalogItems.add(checkNotNull(catalogItem, "catalogItem"));
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CatalogType#isPublished()
|
|
||||||
*/
|
|
||||||
public B isPublished(Boolean isPublished) {
|
|
||||||
this.isPublished = isPublished;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see CatalogType#isPublished()
|
|
||||||
*/
|
|
||||||
public B published() {
|
|
||||||
this.isPublished = Boolean.TRUE;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public CatalogType build() {
|
|
||||||
return new CatalogType(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public B fromCatalogType(CatalogType in) {
|
|
||||||
return fromEntityType(in).owner(in.getOwner()).items(in.getCatalogItems()).isPublished(in.isPublished());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected CatalogType(Builder<?> builder) {
|
|
||||||
super(builder);
|
|
||||||
this.owner = builder.owner;
|
|
||||||
this.catalogItems = builder.catalogItems == null || builder.catalogItems.isEmpty() ? null : ImmutableSet.copyOf(builder.catalogItems);
|
|
||||||
this.isPublished = builder.isPublished;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected CatalogType() {
|
|
||||||
// For JAXB
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlElement(name = "Owner")
|
|
||||||
private Owner owner;
|
|
||||||
@XmlElementWrapper(name = "CatalogItems")
|
|
||||||
@XmlElement(name = "CatalogItem")
|
|
||||||
private Set<Reference> catalogItems;
|
|
||||||
@XmlElement(name = "IsPublished")
|
|
||||||
private Boolean isPublished;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value of the owner property.
|
|
||||||
*/
|
|
||||||
public Owner getOwner() {
|
|
||||||
return owner;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value of the catalogItems property.
|
|
||||||
*/
|
|
||||||
public Set<Reference> getCatalogItems() {
|
|
||||||
return catalogItems == null ? ImmutableSet.<Reference>of() : ImmutableSet.copyOf(catalogItems);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the value of the isPublished property.
|
|
||||||
*/
|
|
||||||
public Boolean isPublished() {
|
|
||||||
return isPublished;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o)
|
|
||||||
return true;
|
|
||||||
if (o == null || getClass() != o.getClass())
|
|
||||||
return false;
|
|
||||||
CatalogType that = CatalogType.class.cast(o);
|
|
||||||
return super.equals(that) &&
|
|
||||||
equal(this.owner, that.owner) &&
|
|
||||||
equal(this.getCatalogItems(), that.getCatalogItems()) &&
|
|
||||||
equal(this.isPublished, that.isPublished);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hashCode(super.hashCode(), owner, getCatalogItems(), catalogItems);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ToStringHelper string() {
|
|
||||||
return super.string().add("owner", owner)
|
|
||||||
.add("catalogItems", getCatalogItems())
|
|
||||||
.add("isPublished", isPublished);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
/**
|
/*
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* contributor license agreements. See the NOTICE file
|
* contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
* distributed with this work for additional information
|
||||||
|
@ -18,16 +18,37 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain;
|
||||||
|
|
||||||
|
import static com.google.common.base.Objects.equal;
|
||||||
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import com.google.common.base.Objects;
|
||||||
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An entity.
|
* Basic entity type in the vCloud object model.
|
||||||
|
*
|
||||||
|
* Includes the entity name and an optional id, description, and set of running {@link Task}s.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <xs:complexType name="EntityType" />
|
||||||
|
* </pre>
|
||||||
*
|
*
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
* @author Adam Lowe
|
* @author Adam Lowe
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Entity")
|
@XmlRootElement(name = "Entity")
|
||||||
public class Entity extends EntityType {
|
@XmlType(name = "EntityType")
|
||||||
|
public class Entity extends Resource {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -35,29 +56,162 @@ public class Entity extends EntityType {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder<?> toBuilder() {
|
public Builder<?> toBuilder() {
|
||||||
return builder().fromEntity(this);
|
return builder().fromEntityType(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
private List<Task> tasks = Lists.newArrayList();
|
||||||
|
private String name;
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see EntityType#getName()
|
||||||
|
*/
|
||||||
|
public B name(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see EntityType#getDescription()
|
||||||
|
*/
|
||||||
|
public B description(String description) {
|
||||||
|
this.description = description;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see EntityType#getId()
|
||||||
|
*/
|
||||||
|
public B id(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see EntityType#getTasks()
|
||||||
|
*/
|
||||||
|
public B tasks(Iterable<Task> tasks) {
|
||||||
|
this.tasks = Lists.newArrayList(checkNotNull(tasks, "tasks"));
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see EntityType#getTasks()
|
||||||
|
*/
|
||||||
|
public B task(Task task) {
|
||||||
|
this.tasks.add(checkNotNull(task, "task"));
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Entity build() {
|
public Entity build() {
|
||||||
return new Entity(this);
|
return new Entity(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromEntity(Entity in) {
|
public B fromEntityType(Entity in) {
|
||||||
return fromEntityType(in);
|
return fromResource(in)
|
||||||
|
.description(in.getDescription())
|
||||||
|
.tasks(in.getTasks())
|
||||||
|
.id(in.getId()).name(in.getName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Entity(Builder<?> builder) {
|
@XmlElement(name = "Description")
|
||||||
|
private String description;
|
||||||
|
@XmlElementWrapper(name = "Tasks")
|
||||||
|
@XmlElement(name = "Task")
|
||||||
|
private List<Task> tasks;
|
||||||
|
@XmlAttribute
|
||||||
|
private String id;
|
||||||
|
@XmlAttribute(required = true)
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
protected Entity(Builder<?> builder) {
|
||||||
super(builder);
|
super(builder);
|
||||||
|
this.description = builder.description;
|
||||||
|
this.tasks = builder.tasks == null || builder.tasks.isEmpty() ? null : ImmutableList.copyOf(builder.tasks);
|
||||||
|
this.id = builder.id;
|
||||||
|
this.name = builder.name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Entity() {
|
protected Entity() {
|
||||||
// For JAXB
|
// For JAXB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Optional description.
|
||||||
|
*/
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A list of queued, running, or recently completed tasks associated with this entity.
|
||||||
|
*/
|
||||||
|
public List<Task> getTasks() {
|
||||||
|
return tasks == null ? ImmutableList.<Task>of() : ImmutableList.copyOf(tasks);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The resource identifier, expressed in URN format.
|
||||||
|
*
|
||||||
|
* The value of this attribute uniquely identifies the resource, persists for the life of the
|
||||||
|
* resource, and is never reused.
|
||||||
|
*/
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the name of the the entity.
|
||||||
|
*/
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return true;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
Entity that = Entity.class.cast(o);
|
||||||
|
return super.equals(that) &&
|
||||||
|
equal(this.id, that.id) && equal(this.description, that.description) &&
|
||||||
|
equal(this.tasks, that.tasks) && equal(this.name, that.name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean clone(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return false;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
Entity that = Entity.class.cast(o);
|
||||||
|
return super.clone(that);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hashCode(super.hashCode(), description, tasks, id, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ToStringHelper string() {
|
||||||
|
return super.string().add("description", description).add("tasks", tasks).add("id", id).add("name", name);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,215 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. jclouds licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlElementWrapper;
|
|
||||||
import javax.xml.bind.annotation.XmlType;
|
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Basic entity type in the vCloud object model.
|
|
||||||
*
|
|
||||||
* Includes the entity name and an optional id, description, and set of running {@link Task}s.
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* <xs:complexType name="EntityType" />
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author grkvlt@apache.org
|
|
||||||
* @author Adam Lowe
|
|
||||||
*/
|
|
||||||
@XmlType(name = "EntityType")
|
|
||||||
public class EntityType extends ResourceType {
|
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
|
||||||
return new ConcreteBuilder();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Builder<?> toBuilder() {
|
|
||||||
return builder().fromEntityType(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
|
||||||
|
|
||||||
private String description;
|
|
||||||
private List<Task> tasks = Lists.newArrayList();
|
|
||||||
private String name;
|
|
||||||
private String id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see EntityType#getName()
|
|
||||||
*/
|
|
||||||
public B name(String name) {
|
|
||||||
this.name = name;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see EntityType#getDescription()
|
|
||||||
*/
|
|
||||||
public B description(String description) {
|
|
||||||
this.description = description;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see EntityType#getId()
|
|
||||||
*/
|
|
||||||
public B id(String id) {
|
|
||||||
this.id = id;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see EntityType#getTasks()
|
|
||||||
*/
|
|
||||||
public B tasks(Iterable<Task> tasks) {
|
|
||||||
this.tasks = Lists.newArrayList(checkNotNull(tasks, "tasks"));
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see EntityType#getTasks()
|
|
||||||
*/
|
|
||||||
public B task(Task task) {
|
|
||||||
this.tasks.add(checkNotNull(task, "task"));
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EntityType build() {
|
|
||||||
return new EntityType(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public B fromEntityType(EntityType in) {
|
|
||||||
return fromResourceType(in)
|
|
||||||
.description(in.getDescription())
|
|
||||||
.tasks(in.getTasks())
|
|
||||||
.id(in.getId()).name(in.getName());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlElement(name = "Description")
|
|
||||||
private String description;
|
|
||||||
@XmlElementWrapper(name = "Tasks")
|
|
||||||
@XmlElement(name = "Task")
|
|
||||||
private List<Task> tasks;
|
|
||||||
@XmlAttribute
|
|
||||||
private String id;
|
|
||||||
@XmlAttribute(required = true)
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
protected EntityType(Builder<?> builder) {
|
|
||||||
super(builder);
|
|
||||||
this.description = builder.description;
|
|
||||||
this.tasks = builder.tasks == null || builder.tasks.isEmpty() ? null : ImmutableList.copyOf(builder.tasks);
|
|
||||||
this.id = builder.id;
|
|
||||||
this.name = builder.name;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected EntityType() {
|
|
||||||
// For JAXB
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Optional description.
|
|
||||||
*/
|
|
||||||
public String getDescription() {
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDescription(String description) {
|
|
||||||
this.description = description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A list of queued, running, or recently completed tasks associated with this entity.
|
|
||||||
*/
|
|
||||||
public List<Task> getTasks() {
|
|
||||||
return tasks == null ? ImmutableList.<Task>of() : ImmutableList.copyOf(tasks);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The resource identifier, expressed in URN format.
|
|
||||||
*
|
|
||||||
* The value of this attribute uniquely identifies the resource, persists for the life of the
|
|
||||||
* resource, and is never reused.
|
|
||||||
*/
|
|
||||||
public String getId() {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains the name of the the entity.
|
|
||||||
*/
|
|
||||||
public String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setName(String name) {
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o)
|
|
||||||
return true;
|
|
||||||
if (o == null || getClass() != o.getClass())
|
|
||||||
return false;
|
|
||||||
EntityType that = EntityType.class.cast(o);
|
|
||||||
return super.equals(that) &&
|
|
||||||
equal(this.id, that.id) && equal(this.description, that.description) &&
|
|
||||||
equal(this.tasks, that.tasks) && equal(this.name, that.name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean clone(Object o) {
|
|
||||||
if (this == o)
|
|
||||||
return false;
|
|
||||||
if (o == null || getClass() != o.getClass())
|
|
||||||
return false;
|
|
||||||
EntityType that = EntityType.class.cast(o);
|
|
||||||
return super.clone(that);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hashCode(super.hashCode(), description, tasks, id, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ToStringHelper string() {
|
|
||||||
return super.string().add("description", description).add("tasks", tasks).add("id", id).add("name", name);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -53,7 +53,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@XmlType(name = "File")
|
@XmlType(name = "File")
|
||||||
public class File extends EntityType {
|
public class File extends Entity {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -67,7 +67,7 @@ public class File extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
private Long size;
|
private Long size;
|
||||||
private Long bytesTransferred;
|
private Long bytesTransferred;
|
||||||
|
|
|
@ -56,7 +56,7 @@ import com.google.common.collect.Sets;
|
||||||
"usersList",
|
"usersList",
|
||||||
"role"
|
"role"
|
||||||
})
|
})
|
||||||
public class Group extends EntityType {
|
public class Group extends Entity {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -70,7 +70,7 @@ public class Group extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
private String nameInSource;
|
private String nameInSource;
|
||||||
private Set<Reference> users = Sets.newLinkedHashSet();
|
private Set<Reference> users = Sets.newLinkedHashSet();
|
||||||
|
|
|
@ -46,7 +46,7 @@ import com.google.common.collect.Maps;
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Media")
|
@XmlRootElement(name = "Media")
|
||||||
public class Media extends ResourceEntityType {
|
public class Media extends ResourceEntity {
|
||||||
|
|
||||||
@XmlType
|
@XmlType
|
||||||
@XmlEnum(String.class)
|
@XmlEnum(String.class)
|
||||||
|
@ -93,7 +93,7 @@ public class Media extends ResourceEntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceEntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends ResourceEntity.Builder<B> {
|
||||||
|
|
||||||
private Owner owner;
|
private Owner owner;
|
||||||
private ImageType imageType;
|
private ImageType imageType;
|
||||||
|
|
|
@ -44,7 +44,7 @@ import com.google.common.collect.Sets;
|
||||||
* @author danikov
|
* @author danikov
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Metadata")
|
@XmlRootElement(name = "Metadata")
|
||||||
public class Metadata extends ResourceType {
|
public class Metadata extends Resource {
|
||||||
|
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA;
|
public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ public class Metadata extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Set<MetadataEntry> metadataEntries = Sets.newLinkedHashSet();
|
private Set<MetadataEntry> metadataEntries = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ public class Metadata extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromMetadata(Metadata in) {
|
public B fromMetadata(Metadata in) {
|
||||||
return fromResourceType(in).entries(in.getMetadataEntries());
|
return fromResource(in).entries(in.getMetadataEntries());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ import com.google.common.collect.Sets;
|
||||||
* @author danikov
|
* @author danikov
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "MetadataEntry")
|
@XmlRootElement(name = "MetadataEntry")
|
||||||
public class MetadataEntry extends ResourceType {
|
public class MetadataEntry extends Resource {
|
||||||
|
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA_ENTRY;
|
public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA_ENTRY;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ public class MetadataEntry extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
private String key;
|
private String key;
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public class MetadataEntry extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromMetadataEntry(MetadataEntry in) {
|
public B fromMetadataEntry(MetadataEntry in) {
|
||||||
return fromResourceType(in).entry(key, value);
|
return fromResource(in).entry(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ import com.google.common.collect.Sets;
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "MetadataValue")
|
@XmlRootElement(name = "MetadataValue")
|
||||||
public class MetadataValue extends ResourceType {
|
public class MetadataValue extends Resource {
|
||||||
|
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA_ENTRY;
|
public static final String MEDIA_TYPE = VCloudDirectorMediaType.METADATA_ENTRY;
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ public class MetadataValue extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
private String value;
|
private String value;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -112,7 +112,7 @@ public class MetadataValue extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromMetadataValue(MetadataValue in) {
|
public B fromMetadataValue(MetadataValue in) {
|
||||||
return fromResourceType(in).value(value);
|
return fromResource(in).value(value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Owner")
|
@XmlRootElement(name = "Owner")
|
||||||
@XmlType(name = "OwnerType")
|
@XmlType(name = "OwnerType")
|
||||||
public class Owner extends ResourceType {
|
public class Owner extends Resource {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -52,7 +52,7 @@ public class Owner extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Reference user;
|
private Reference user;
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ public class Owner extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOwner(Owner in) {
|
public B fromOwner(Owner in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.user(in.getUser());
|
.user(in.getUser());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ import com.google.common.collect.Sets;
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "ProductSectionList")
|
@XmlRootElement(name = "ProductSectionList")
|
||||||
@XmlType(name = "ProductSectionListType")
|
@XmlType(name = "ProductSectionListType")
|
||||||
public class ProductSectionList extends ResourceType implements Set<ProductSection> {
|
public class ProductSectionList extends Resource implements Set<ProductSection> {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -70,7 +70,7 @@ public class ProductSectionList extends ResourceType implements Set<ProductSecti
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Set<ProductSection> productSections = Sets.newLinkedHashSet();
|
private Set<ProductSection> productSections = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ public class ProductSectionList extends ResourceType implements Set<ProductSecti
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromProductSectionList(ProductSectionList in) {
|
public B fromProductSectionList(ProductSectionList in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.productSections(Sets.newLinkedHashSet(in));
|
.productSections(Sets.newLinkedHashSet(in));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.dmtf.RasdItem;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
@ -44,7 +46,7 @@ import com.google.common.collect.Sets;
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "RasdItemsList")
|
@XmlRootElement(name = "RasdItemsList")
|
||||||
@XmlType(name = "RasdItemsList")
|
@XmlType(name = "RasdItemsList")
|
||||||
public class RasdItemsList extends ResourceType implements Set<RasdItem> {
|
public class RasdItemsList extends Resource implements Set<RasdItem> {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -58,7 +60,7 @@ public class RasdItemsList extends ResourceType implements Set<RasdItem> {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Set<RasdItem> items = Sets.newLinkedHashSet();
|
private Set<RasdItem> items = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
|
@ -85,7 +87,7 @@ public class RasdItemsList extends ResourceType implements Set<RasdItem> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromRasdItemsList(RasdItemsList in) {
|
public B fromRasdItemsList(RasdItemsList in) {
|
||||||
return fromResourceType(in).items(in.getItems());
|
return fromResource(in).items(in.getItems());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class Reference {
|
||||||
return href(in.getHref()).id(in.getId()).name(in.getName()).type(in.getType());
|
return href(in.getHref()).id(in.getId()).name(in.getName()).type(in.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromEntity(EntityType in) {
|
public B fromEntity(Entity in) {
|
||||||
return href(in.getHref()).id(in.getId()).name(in.getName()).type(in.getType());
|
return href(in.getHref()).id(in.getId()).name(in.getName()).type(in.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/**
|
/*
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
* contributor license agreements. See the NOTICE file
|
* contributor license agreements. See the NOTICE file
|
||||||
* distributed with this work for additional information
|
* distributed with this work for additional information
|
||||||
|
@ -18,21 +18,49 @@
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
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.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.XmlRootElement;
|
||||||
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.logging.Logger;
|
||||||
|
|
||||||
|
import com.google.common.base.Objects;
|
||||||
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A resource.
|
* The base type for all objects in the vCloud model.
|
||||||
*
|
*
|
||||||
* @author grkvlt@apache.org
|
* Has an optional list of links and href and type attributes.
|
||||||
|
*
|
||||||
|
* <pre>
|
||||||
|
* <xs:complexType name="ResourceType" />
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author Adrian Cole
|
||||||
|
*
|
||||||
|
* @since 0.9
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Resource")
|
@XmlRootElement(name = "Resource")
|
||||||
public class Resource extends ResourceType {
|
@XmlType(name = "ResourceType")
|
||||||
|
public class Resource {
|
||||||
|
|
||||||
|
@javax.annotation.Resource
|
||||||
|
protected static Logger logger = Logger.NULL;
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Builder<?> toBuilder() {
|
public Builder<?> toBuilder() {
|
||||||
return builder().fromResource(this);
|
return builder().fromResource(this);
|
||||||
}
|
}
|
||||||
|
@ -40,26 +68,112 @@ public class Resource extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> {
|
||||||
|
private URI href;
|
||||||
|
private String type;
|
||||||
|
private Set<Link> links;
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
protected B self() {
|
||||||
|
return (B) this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ResourceType#getHref()
|
||||||
|
*/
|
||||||
|
public B href(URI href) {
|
||||||
|
this.href = href;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ResourceType#getType()
|
||||||
|
*/
|
||||||
|
public B type(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ResourceType#getLinks()
|
||||||
|
*/
|
||||||
|
public B links(Set<Link> links) {
|
||||||
|
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see ResourceType#getLinks()
|
||||||
|
*/
|
||||||
|
public B link(Link link) {
|
||||||
|
if (links == null)
|
||||||
|
links = Sets.newLinkedHashSet();
|
||||||
|
this.links.add(checkNotNull(link, "link"));
|
||||||
|
return self();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Resource build() {
|
public Resource build() {
|
||||||
return new Resource(this);
|
return new Resource(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected B fromResource(Resource in) {
|
protected B fromResource(Resource in) {
|
||||||
return fromResourceType(in);
|
return href(in.getHref()).type(in.getType()).links(Sets.newLinkedHashSet(in.getLinks()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@XmlAttribute
|
||||||
|
private URI href;
|
||||||
|
@XmlAttribute
|
||||||
|
private String type;
|
||||||
|
@XmlElement(name = "Link")
|
||||||
|
private Set<Link> links = Sets.newLinkedHashSet();
|
||||||
|
|
||||||
protected Resource(Builder<?> builder) {
|
protected Resource(Builder<?> builder) {
|
||||||
super(builder);
|
this.href = builder.href;
|
||||||
|
this.type = builder.type;
|
||||||
|
this.links = builder.links == null ? Collections.<Link>emptySet() : builder.links;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Resource() {
|
protected Resource() {
|
||||||
// For JAXB
|
// For JAXB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the URI to the entity.
|
||||||
|
*
|
||||||
|
* An object reference, expressed in URL format. Because this URL includes the object identifier
|
||||||
|
* portion of the id attribute value, it uniquely identifies the object, persists for the life of
|
||||||
|
* the object, and is never reused. The value of the href attribute is a reference to a view of
|
||||||
|
* the object, and can be used to access a representation of the object that is valid in a
|
||||||
|
* particular context. Although URLs have a well-known syntax and a well-understood
|
||||||
|
* interpretation, a client should treat each href as an opaque string. The rules that govern how
|
||||||
|
* the server constructs href strings might change in future releases.
|
||||||
|
*
|
||||||
|
* @return an opaque reference and should never be parsed
|
||||||
|
*/
|
||||||
|
public URI getHref() {
|
||||||
|
return href;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the type of the the entity.
|
||||||
|
*
|
||||||
|
* The object type, specified as a MIME content type, of the object that the link references.
|
||||||
|
* This attribute is present only for links to objects. It is not present for links to actions.
|
||||||
|
*
|
||||||
|
* @return type definition, type, expressed as an HTTP Content-Type
|
||||||
|
*/
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set of optional links to an entity or operation associated with this object.
|
||||||
|
*/
|
||||||
|
public Set<Link> getLinks() {
|
||||||
|
return links == null ? ImmutableSet.<Link>of() : Collections.unmodifiableSet(links);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
if (this == o)
|
if (this == o)
|
||||||
|
@ -67,6 +181,29 @@ public class Resource extends ResourceType {
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
Resource that = Resource.class.cast(o);
|
Resource that = Resource.class.cast(o);
|
||||||
return super.equals(that);
|
return equal(this.href, that.href) && equal(this.links, that.links) && equal(this.type, that.type);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean clone(Object o) {
|
||||||
|
if (this == o)
|
||||||
|
return false;
|
||||||
|
if (o == null || getClass() != o.getClass())
|
||||||
|
return false;
|
||||||
|
Resource that = Resource.class.cast(o);
|
||||||
|
return equal(this.type, that.type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hashCode(href, links, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return string().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ToStringHelper string() {
|
||||||
|
return Objects.toStringHelper("").add("href", href).add("links", links).add("type", type);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -49,7 +49,7 @@ import com.google.common.collect.Iterables;
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlType(name = "ResourceEntityType")
|
@XmlType(name = "ResourceEntityType")
|
||||||
public abstract class ResourceEntityType extends EntityType {
|
public abstract class ResourceEntity extends Entity {
|
||||||
|
|
||||||
@XmlType(name = "ResourceEntityTypeStatus")
|
@XmlType(name = "ResourceEntityTypeStatus")
|
||||||
@XmlEnum(Integer.class)
|
@XmlEnum(Integer.class)
|
||||||
|
@ -138,7 +138,7 @@ public abstract class ResourceEntityType extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
private Set<File> files;
|
private Set<File> files;
|
||||||
private Status status;
|
private Status status;
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ public abstract class ResourceEntityType extends EntityType {
|
||||||
return self();
|
return self();
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromResourceEntityType(ResourceEntityType in) {
|
public B fromResourceEntityType(ResourceEntity in) {
|
||||||
return fromEntityType(in).files(in.getFiles()).status(in.getStatus());
|
return fromEntityType(in).files(in.getFiles()).status(in.getStatus());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -177,13 +177,13 @@ public abstract class ResourceEntityType extends EntityType {
|
||||||
@XmlAttribute
|
@XmlAttribute
|
||||||
private Status status;
|
private Status status;
|
||||||
|
|
||||||
public ResourceEntityType(Builder<?> builder) {
|
public ResourceEntity(Builder<?> builder) {
|
||||||
super(builder);
|
super(builder);
|
||||||
this.files = builder.files;
|
this.files = builder.files;
|
||||||
this.status = builder.status;
|
this.status = builder.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ResourceEntityType() {
|
protected ResourceEntity() {
|
||||||
// for JAXB
|
// for JAXB
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ public abstract class ResourceEntityType extends EntityType {
|
||||||
return true;
|
return true;
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
ResourceEntityType that = ResourceEntityType.class.cast(o);
|
ResourceEntity that = ResourceEntity.class.cast(o);
|
||||||
return super.equals(that) && equal(this.files, that.files) && equal(this.status, that.status);
|
return super.equals(that) && equal(this.files, that.files) && equal(this.status, that.status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ public abstract class ResourceEntityType extends EntityType {
|
||||||
return false;
|
return false;
|
||||||
if (o == null || getClass() != o.getClass())
|
if (o == null || getClass() != o.getClass())
|
||||||
return false;
|
return false;
|
||||||
ResourceEntityType that = ResourceEntityType.class.cast(o);
|
ResourceEntity that = ResourceEntity.class.cast(o);
|
||||||
return super.clone(that) && equal(this.files, that.files);
|
return super.clone(that) && equal(this.files, that.files);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,207 +0,0 @@
|
||||||
/*
|
|
||||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
|
||||||
* contributor license agreements. See the NOTICE file
|
|
||||||
* distributed with this work for additional information
|
|
||||||
* regarding copyright ownership. jclouds licenses this file
|
|
||||||
* to you under the Apache License, Version 2.0 (the
|
|
||||||
* "License"); you may not use this file except in compliance
|
|
||||||
* with the License. You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing,
|
|
||||||
* software distributed under the License is distributed on an
|
|
||||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
* KIND, either express or implied. See the License for the
|
|
||||||
* specific language governing permissions and limitations
|
|
||||||
* under the License.
|
|
||||||
*/
|
|
||||||
package org.jclouds.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.Collections;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlAttribute;
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
|
||||||
import javax.xml.bind.annotation.XmlType;
|
|
||||||
|
|
||||||
import org.jclouds.logging.Logger;
|
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
|
||||||
import com.google.common.collect.Sets;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The base type for all objects in the vCloud model.
|
|
||||||
*
|
|
||||||
* Has an optional list of links and href and type attributes.
|
|
||||||
*
|
|
||||||
* <pre>
|
|
||||||
* <xs:complexType name="ResourceType" />
|
|
||||||
* </pre>
|
|
||||||
*
|
|
||||||
* @author Adrian Cole
|
|
||||||
*
|
|
||||||
* @since 0.9
|
|
||||||
*/
|
|
||||||
@XmlType(name = "ResourceType")
|
|
||||||
public class ResourceType {
|
|
||||||
|
|
||||||
@javax.annotation.Resource
|
|
||||||
protected static Logger logger = Logger.NULL;
|
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
|
||||||
return new ConcreteBuilder();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder<?> toBuilder() {
|
|
||||||
return builder().fromResourceType(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> {
|
|
||||||
private URI href;
|
|
||||||
private String type;
|
|
||||||
private Set<Link> links;
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected B self() {
|
|
||||||
return (B) this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ResourceType#getHref()
|
|
||||||
*/
|
|
||||||
public B href(URI href) {
|
|
||||||
this.href = href;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ResourceType#getType()
|
|
||||||
*/
|
|
||||||
public B type(String type) {
|
|
||||||
this.type = type;
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ResourceType#getLinks()
|
|
||||||
*/
|
|
||||||
public B links(Set<Link> links) {
|
|
||||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ResourceType#getLinks()
|
|
||||||
*/
|
|
||||||
public B link(Link link) {
|
|
||||||
if (links == null)
|
|
||||||
links = Sets.newLinkedHashSet();
|
|
||||||
this.links.add(checkNotNull(link, "link"));
|
|
||||||
return self();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ResourceType build() {
|
|
||||||
return new ResourceType(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected B fromResourceType(ResourceType in) {
|
|
||||||
return href(in.getHref()).type(in.getType()).links(Sets.newLinkedHashSet(in.getLinks()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@XmlAttribute
|
|
||||||
private URI href;
|
|
||||||
@XmlAttribute
|
|
||||||
private String type;
|
|
||||||
@XmlElement(name = "Link")
|
|
||||||
private Set<Link> links = Sets.newLinkedHashSet();
|
|
||||||
|
|
||||||
protected ResourceType(Builder<?> builder) {
|
|
||||||
this.href = builder.href;
|
|
||||||
this.type = builder.type;
|
|
||||||
this.links = builder.links == null ? Collections.<Link>emptySet() : builder.links;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ResourceType() {
|
|
||||||
// For JAXB
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains the URI to the entity.
|
|
||||||
*
|
|
||||||
* An object reference, expressed in URL format. Because this URL includes the object identifier
|
|
||||||
* portion of the id attribute value, it uniquely identifies the object, persists for the life of
|
|
||||||
* the object, and is never reused. The value of the href attribute is a reference to a view of
|
|
||||||
* the object, and can be used to access a representation of the object that is valid in a
|
|
||||||
* particular context. Although URLs have a well-known syntax and a well-understood
|
|
||||||
* interpretation, a client should treat each href as an opaque string. The rules that govern how
|
|
||||||
* the server constructs href strings might change in future releases.
|
|
||||||
*
|
|
||||||
* @return an opaque reference and should never be parsed
|
|
||||||
*/
|
|
||||||
public URI getHref() {
|
|
||||||
return href;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Contains the type of the the entity.
|
|
||||||
*
|
|
||||||
* The object type, specified as a MIME content type, of the object that the link references.
|
|
||||||
* This attribute is present only for links to objects. It is not present for links to actions.
|
|
||||||
*
|
|
||||||
* @return type definition, type, expressed as an HTTP Content-Type
|
|
||||||
*/
|
|
||||||
public String getType() {
|
|
||||||
return type;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set of optional links to an entity or operation associated with this object.
|
|
||||||
*/
|
|
||||||
public Set<Link> getLinks() {
|
|
||||||
return links == null ? ImmutableSet.<Link>of() : Collections.unmodifiableSet(links);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object o) {
|
|
||||||
if (this == o)
|
|
||||||
return true;
|
|
||||||
if (o == null || getClass() != o.getClass())
|
|
||||||
return false;
|
|
||||||
ResourceType that = ResourceType.class.cast(o);
|
|
||||||
return equal(this.href, that.href) && equal(this.links, that.links) && equal(this.type, that.type);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean clone(Object o) {
|
|
||||||
if (this == o)
|
|
||||||
return false;
|
|
||||||
if (o == null || getClass() != o.getClass())
|
|
||||||
return false;
|
|
||||||
ResourceType that = ResourceType.class.cast(o);
|
|
||||||
return equal(this.type, that.type);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hashCode(href, links, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return string().toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected ToStringHelper string() {
|
|
||||||
return Objects.toStringHelper("").add("href", href).add("links", links).add("type", type);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -25,14 +25,8 @@ import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultReferences;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* Container for ReferenceType elements that reference RoleType objects.
|
* Container for ReferenceType elements that reference RoleType objects.
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* <p>Java class for RoleReferences complex type.
|
|
||||||
*
|
|
||||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
|
||||||
*
|
|
||||||
* <pre>
|
* <pre>
|
||||||
* <complexType name="RoleReferences">
|
* <complexType name="RoleReferences">
|
||||||
* <complexContent>
|
* <complexContent>
|
||||||
|
@ -45,8 +39,6 @@ import org.jclouds.vcloud.director.v1_5.domain.query.QueryResultReferences;
|
||||||
* </complexContent>
|
* </complexContent>
|
||||||
* </complexType>
|
* </complexType>
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "RoleReferences")
|
@XmlRootElement(name = "RoleReferences")
|
||||||
public class RoleReferences extends QueryResultReferences {
|
public class RoleReferences extends QueryResultReferences {
|
||||||
|
|
|
@ -53,7 +53,7 @@ import com.google.common.collect.Maps;
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Task")
|
@XmlRootElement(name = "Task")
|
||||||
public class Task extends EntityType {
|
public class Task extends Entity {
|
||||||
|
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.TASK;
|
public static final String MEDIA_TYPE = VCloudDirectorMediaType.TASK;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ public class Task extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
private Error error;
|
private Error error;
|
||||||
private Reference org;
|
private Reference org;
|
||||||
|
|
|
@ -42,7 +42,7 @@ import com.google.common.collect.Sets;
|
||||||
* @author Adrian Cole
|
* @author Adrian Cole
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "TasksList")
|
@XmlRootElement(name = "TasksList")
|
||||||
public class TasksList extends ResourceType implements Set<Task> {
|
public class TasksList extends Resource implements Set<Task> {
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class TasksList extends ResourceType implements Set<Task> {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
private String name;
|
private String name;
|
||||||
private Set<Task> tasks;
|
private Set<Task> tasks;
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ public class TasksList extends ResourceType implements Set<Task> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromTasksList(TasksList in) {
|
public B fromTasksList(TasksList in) {
|
||||||
return fromResourceType(in).tasks(in);
|
return fromResource(in).tasks(in);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ import com.google.common.collect.Lists;
|
||||||
"password",
|
"password",
|
||||||
"groups"
|
"groups"
|
||||||
})
|
})
|
||||||
public class User extends EntityType {
|
public class User extends Entity {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -105,7 +105,7 @@ public class User extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
private String fullName;
|
private String fullName;
|
||||||
private String emailAddress;
|
private String emailAddress;
|
||||||
|
|
|
@ -37,6 +37,14 @@ import org.jclouds.dmtf.ovf.NetworkSection;
|
||||||
import org.jclouds.dmtf.ovf.ProductSection;
|
import org.jclouds.dmtf.ovf.ProductSection;
|
||||||
import org.jclouds.dmtf.ovf.SectionType;
|
import org.jclouds.dmtf.ovf.SectionType;
|
||||||
import org.jclouds.dmtf.ovf.StartupSection;
|
import org.jclouds.dmtf.ovf.StartupSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.CustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
@ -50,7 +58,7 @@ import com.google.common.collect.Sets;
|
||||||
* </pre>
|
* </pre>
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "VAppTemplate")
|
@XmlRootElement(name = "VAppTemplate")
|
||||||
public class VAppTemplate extends ResourceEntityType {
|
public class VAppTemplate extends ResourceEntity {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -64,7 +72,7 @@ public class VAppTemplate extends ResourceEntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceEntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends ResourceEntity.Builder<B> {
|
||||||
private Owner owner;
|
private Owner owner;
|
||||||
private Set<VAppTemplate> children = Sets.newLinkedHashSet();
|
private Set<VAppTemplate> children = Sets.newLinkedHashSet();
|
||||||
private Set<SectionType> sections = Sets.newLinkedHashSet();
|
private Set<SectionType> sections = Sets.newLinkedHashSet();
|
||||||
|
|
|
@ -30,6 +30,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
@ -45,7 +46,7 @@ import com.google.common.collect.Sets;
|
||||||
@XmlRootElement(name = "Vdc")
|
@XmlRootElement(name = "Vdc")
|
||||||
@XmlType(name = "VdcType")
|
@XmlType(name = "VdcType")
|
||||||
@XmlSeeAlso({ AdminVdc.class })
|
@XmlSeeAlso({ AdminVdc.class })
|
||||||
public class Vdc extends EntityType {
|
public class Vdc extends Entity {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -59,7 +60,7 @@ public class Vdc extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
private String allocationModel;
|
private String allocationModel;
|
||||||
private CapacityWithUsage storageCapacity;
|
private CapacityWithUsage storageCapacity;
|
||||||
private ComputeCapacity computeCapacity;
|
private ComputeCapacity computeCapacity;
|
||||||
|
|
|
@ -39,7 +39,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlType(name = "VmPendingQuestion")
|
@XmlType(name = "VmPendingQuestion")
|
||||||
public class VmPendingQuestion extends ResourceType {
|
public class VmPendingQuestion extends Resource {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -53,7 +53,7 @@ public class VmPendingQuestion extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private String question;
|
private String question;
|
||||||
private String questionId;
|
private String questionId;
|
||||||
|
@ -90,7 +90,7 @@ public class VmPendingQuestion extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromVmPendingQuestion(VmPendingQuestion in) {
|
public B fromVmPendingQuestion(VmPendingQuestion in) {
|
||||||
return fromResourceType(in).question(in.getQuestion()).questionId(in.getQuestionId()).choices(in.getChoices());
|
return fromResource(in).question(in.getQuestion()).questionId(in.getQuestionId()).choices(in.getChoices());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.dmtf;
|
||||||
|
|
||||||
import static org.jclouds.dmtf.DMTFConstants.OVF_NS;
|
import static org.jclouds.dmtf.DMTFConstants.OVF_NS;
|
||||||
|
|
|
@ -16,10 +16,11 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.dmtf;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
import static org.jclouds.dmtf.DMTFConstants.OVF_NS;
|
||||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
|
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
@ -31,6 +32,7 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlSchemaType;
|
import javax.xml.bind.annotation.XmlSchemaType;
|
||||||
|
|
||||||
import org.jclouds.dmtf.cim.ResourceAllocationSettingData;
|
import org.jclouds.dmtf.cim.ResourceAllocationSettingData;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Link;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
@ -38,13 +40,11 @@ import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ResourceAllocationSettingData class represents settings specifically
|
* A vCloud specific {@link ResourceAllocationSettingData} extension.
|
||||||
* related to an allocated resource that are outside the scope of the CIM class
|
|
||||||
* typically used to represent the resource itself.
|
|
||||||
*
|
*
|
||||||
* @author grkvlt@apache.org
|
* @author grkvlt@apache.org
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Item", namespace = VCLOUD_1_5_NS)
|
@XmlRootElement(name = "Item", namespace = OVF_NS)
|
||||||
public class RasdItem extends ResourceAllocationSettingData {
|
public class RasdItem extends ResourceAllocationSettingData {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.dmtf;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -28,6 +28,8 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
import org.jclouds.dmtf.ovf.internal.BaseVirtualSystem;
|
import org.jclouds.dmtf.ovf.internal.BaseVirtualSystem;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
@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.dmtf;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
/**
|
/**
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -30,6 +30,10 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Entity;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Entity.Builder;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.org.OrgNetwork;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
@ -38,7 +42,7 @@ import com.google.common.collect.ImmutableSet;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
|
|
||||||
@XmlSeeAlso({ OrgNetwork.class, ExternalNetwork.class })
|
@XmlSeeAlso({ OrgNetwork.class, ExternalNetwork.class })
|
||||||
public abstract class Network extends EntityType {
|
public abstract class Network extends Entity {
|
||||||
|
|
||||||
@XmlType
|
@XmlType
|
||||||
@XmlEnum(String.class)
|
@XmlEnum(String.class)
|
||||||
|
@ -75,7 +79,7 @@ public abstract class Network extends EntityType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Builder<T extends Builder<T>> extends EntityType.Builder<T> {
|
public abstract static class Builder<T extends Builder<T>> extends Entity.Builder<T> {
|
||||||
protected NetworkConfiguration networkConfiguration;
|
protected NetworkConfiguration networkConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -25,7 +25,8 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
import org.jclouds.vcloud.director.v1_5.domain.Network.FenceMode;
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.network.Network.FenceMode;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.network;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
|
@ -37,7 +40,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "NetworkConfiguration")
|
@XmlRootElement(name = "NetworkConfiguration")
|
||||||
@XmlType(name = "VAppNetworkConfiguration")
|
@XmlType(name = "VAppNetworkConfiguration")
|
||||||
public class VAppNetworkConfiguration extends ResourceType {
|
public class VAppNetworkConfiguration extends Resource {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -51,7 +54,7 @@ public class VAppNetworkConfiguration extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private String description;
|
private String description;
|
||||||
private NetworkConfiguration configuration;
|
private NetworkConfiguration configuration;
|
||||||
|
@ -96,7 +99,7 @@ public class VAppNetworkConfiguration extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromVAppNetworkConfiguration(VAppNetworkConfiguration in) {
|
public B fromVAppNetworkConfiguration(VAppNetworkConfiguration in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.description(in.getDescription())
|
.description(in.getDescription())
|
||||||
.configuration(in.getConfiguration())
|
.configuration(in.getConfiguration())
|
||||||
.isDeployed(in.isDeployed())
|
.isDeployed(in.isDeployed())
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
@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.network;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -28,6 +28,8 @@ import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlEnum;
|
||||||
import javax.xml.bind.annotation.XmlEnumValue;
|
import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||||
|
|
||||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Entity;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Entity.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
@ -42,7 +44,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
*/
|
*/
|
||||||
@XmlRootElement(name = "Org")
|
@XmlRootElement(name = "Org")
|
||||||
@XmlSeeAlso({ AdminOrg.class })
|
@XmlSeeAlso({ AdminOrg.class })
|
||||||
public class Org extends EntityType {
|
public class Org extends Entity {
|
||||||
|
|
||||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.ORG;
|
public static final String MEDIA_TYPE = VCloudDirectorMediaType.ORG;
|
||||||
|
|
||||||
|
@ -58,7 +60,7 @@ public class Org extends EntityType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends EntityType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Entity.Builder<B> {
|
||||||
|
|
||||||
private String fullName;
|
private String fullName;
|
||||||
private Boolean isEnabled;
|
private Boolean isEnabled;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -27,6 +27,10 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.network.SmtpServerSettings;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
@ -63,7 +67,7 @@ import com.google.common.collect.ImmutableList;
|
||||||
"alertEmailTo",
|
"alertEmailTo",
|
||||||
"smtpServerSettings"
|
"smtpServerSettings"
|
||||||
})
|
})
|
||||||
public class OrgEmailSettings extends ResourceType {
|
public class OrgEmailSettings extends Resource {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -77,7 +81,7 @@ public class OrgEmailSettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private boolean isDefaultSmtpServer;
|
private boolean isDefaultSmtpServer;
|
||||||
private boolean isDefaultOrgEmail;
|
private boolean isDefaultOrgEmail;
|
||||||
|
@ -157,7 +161,7 @@ public class OrgEmailSettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgEmailSettings(OrgEmailSettings in) {
|
public B fromOrgEmailSettings(OrgEmailSettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.isDefaultSmtpServer(in.isDefaultSmtpServer())
|
.isDefaultSmtpServer(in.isDefaultSmtpServer())
|
||||||
.isDefaultOrgEmail(in.isDefaultOrgEmail())
|
.isDefaultOrgEmail(in.isDefaultOrgEmail())
|
||||||
.fromEmailAddress(in.getFromEmailAddress())
|
.fromEmailAddress(in.getFromEmailAddress())
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
|
@ -55,7 +58,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
"useServerBootSequence",
|
"useServerBootSequence",
|
||||||
"delayAfterPowerOnSeconds"
|
"delayAfterPowerOnSeconds"
|
||||||
})
|
})
|
||||||
public class OrgGeneralSettings extends ResourceType {
|
public class OrgGeneralSettings extends Resource {
|
||||||
|
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
|
@ -69,7 +72,7 @@ public class OrgGeneralSettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Boolean canPublishCatalogs;
|
private Boolean canPublishCatalogs;
|
||||||
private Integer deployedVMQuota;
|
private Integer deployedVMQuota;
|
||||||
|
@ -123,7 +126,7 @@ public class OrgGeneralSettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgGeneralSettings(OrgGeneralSettings in) {
|
public B fromOrgGeneralSettings(OrgGeneralSettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.canPublishCatalogs(in.canPublishCatalogs())
|
.canPublishCatalogs(in.canPublishCatalogs())
|
||||||
.deployedVMQuota(in.getDeployedVMQuota())
|
.deployedVMQuota(in.getDeployedVMQuota())
|
||||||
.storedVmQuota(in.getStoredVmQuota())
|
.storedVmQuota(in.getStoredVmQuota())
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -30,6 +30,9 @@ import javax.xml.bind.annotation.XmlEnumValue;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
@ -60,7 +63,7 @@ import com.google.common.collect.Maps;
|
||||||
"customUsersOu",
|
"customUsersOu",
|
||||||
"customOrgLdapSettings"
|
"customOrgLdapSettings"
|
||||||
})
|
})
|
||||||
public class OrgLdapSettings extends ResourceType {
|
public class OrgLdapSettings extends Resource {
|
||||||
|
|
||||||
@XmlType
|
@XmlType
|
||||||
@XmlEnum(String.class)
|
@XmlEnum(String.class)
|
||||||
|
@ -108,7 +111,7 @@ public class OrgLdapSettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private LdapMode ldapMode;
|
private LdapMode ldapMode;
|
||||||
private String customUsersOu;
|
private String customUsersOu;
|
||||||
|
@ -152,7 +155,7 @@ public class OrgLdapSettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgLdapSettings(OrgLdapSettings in) {
|
public B fromOrgLdapSettings(OrgLdapSettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.ldapMode(in.getLdapMode())
|
.ldapMode(in.getLdapMode())
|
||||||
.customUsersOu(in.getCustomUsersOu())
|
.customUsersOu(in.getCustomUsersOu())
|
||||||
.customOrgLdapSettings(in.getCustomOrgLdapSettings());
|
.customOrgLdapSettings(in.getCustomOrgLdapSettings());
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
|
@ -51,7 +54,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
"deploymentLeaseSeconds",
|
"deploymentLeaseSeconds",
|
||||||
"storageLeaseSeconds"
|
"storageLeaseSeconds"
|
||||||
})
|
})
|
||||||
public class OrgLeaseSettings extends ResourceType {
|
public class OrgLeaseSettings extends Resource {
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
}
|
}
|
||||||
|
@ -64,7 +67,7 @@ public class OrgLeaseSettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Boolean deleteOnStorageLeaseExpiration;
|
private Boolean deleteOnStorageLeaseExpiration;
|
||||||
private Integer deploymentLeaseSeconds;
|
private Integer deploymentLeaseSeconds;
|
||||||
|
@ -100,7 +103,7 @@ public class OrgLeaseSettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgLeaseSettings(OrgLeaseSettings in) {
|
public B fromOrgLeaseSettings(OrgLeaseSettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.deleteOnStorageLeaseExpiration(in.deleteOnStorageLeaseExpiration())
|
.deleteOnStorageLeaseExpiration(in.deleteOnStorageLeaseExpiration())
|
||||||
.deploymentLeaseSeconds(in.getDeploymentLeaseSeconds())
|
.deploymentLeaseSeconds(in.getDeploymentLeaseSeconds())
|
||||||
.storageLeaseSeconds(in.getStorageLeaseSeconds());
|
.storageLeaseSeconds(in.getStorageLeaseSeconds());
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
|
@ -16,13 +16,18 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.network.IpAddresses;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.network.Network;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.network.Network.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
|
@ -40,7 +43,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
"invalidLoginsBeforeLockout",
|
"invalidLoginsBeforeLockout",
|
||||||
"accountLockoutIntervalMinutes"
|
"accountLockoutIntervalMinutes"
|
||||||
})
|
})
|
||||||
public class OrgPasswordPolicySettings extends ResourceType {
|
public class OrgPasswordPolicySettings extends Resource {
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
}
|
}
|
||||||
|
@ -53,7 +56,7 @@ public class OrgPasswordPolicySettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private boolean accountLockoutEnabled;
|
private boolean accountLockoutEnabled;
|
||||||
private int invalidLoginsBeforeLockout;
|
private int invalidLoginsBeforeLockout;
|
||||||
|
@ -89,7 +92,7 @@ public class OrgPasswordPolicySettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgPasswordPolicySettings(OrgPasswordPolicySettings in) {
|
public B fromOrgPasswordPolicySettings(OrgPasswordPolicySettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.accountLockoutEnabled(in.isAccountLockoutEnabled())
|
.accountLockoutEnabled(in.isAccountLockoutEnabled())
|
||||||
.invalidLoginsBeforeLockout(in.getInvalidLoginsBeforeLockout())
|
.invalidLoginsBeforeLockout(in.getInvalidLoginsBeforeLockout())
|
||||||
.accountLockoutIntervalMinutes(in.getAccountLockoutIntervalMinutes());
|
.accountLockoutIntervalMinutes(in.getAccountLockoutIntervalMinutes());
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +62,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
"emailSettings",
|
"emailSettings",
|
||||||
"passwordPolicy"
|
"passwordPolicy"
|
||||||
})
|
})
|
||||||
public class OrgSettings extends ResourceType {
|
public class OrgSettings extends Resource {
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
}
|
}
|
||||||
|
@ -72,7 +75,7 @@ public class OrgSettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private OrgGeneralSettings generalSettings;
|
private OrgGeneralSettings generalSettings;
|
||||||
private OrgLeaseSettings vAppLeaseSettings;
|
private OrgLeaseSettings vAppLeaseSettings;
|
||||||
|
@ -135,7 +138,7 @@ public class OrgSettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgSettings(OrgSettings in) {
|
public B fromOrgSettings(OrgSettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.generalSettings(in.getGeneralSettings())
|
.generalSettings(in.getGeneralSettings())
|
||||||
.vAppLeaseSettings(in.getVAppLeaseSettings())
|
.vAppLeaseSettings(in.getVAppLeaseSettings())
|
||||||
.vAppTemplateLeaseSettings(in.getVAppTemplateLeaseSettings())
|
.vAppTemplateLeaseSettings(in.getVAppTemplateLeaseSettings())
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Resource.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
||||||
|
@ -49,7 +52,7 @@ import com.google.common.base.Objects.ToStringHelper;
|
||||||
"deleteOnStorageLeaseExpiration",
|
"deleteOnStorageLeaseExpiration",
|
||||||
"storageLeaseSeconds"
|
"storageLeaseSeconds"
|
||||||
})
|
})
|
||||||
public class OrgVAppTemplateLeaseSettings extends ResourceType {
|
public class OrgVAppTemplateLeaseSettings extends Resource {
|
||||||
public static Builder<?> builder() {
|
public static Builder<?> builder() {
|
||||||
return new ConcreteBuilder();
|
return new ConcreteBuilder();
|
||||||
}
|
}
|
||||||
|
@ -62,7 +65,7 @@ public class OrgVAppTemplateLeaseSettings extends ResourceType {
|
||||||
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
private static class ConcreteBuilder extends Builder<ConcreteBuilder> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static abstract class Builder<B extends Builder<B>> extends ResourceType.Builder<B> {
|
public static abstract class Builder<B extends Builder<B>> extends Resource.Builder<B> {
|
||||||
|
|
||||||
private Boolean deleteOnStorageLeaseExpiration;
|
private Boolean deleteOnStorageLeaseExpiration;
|
||||||
private Integer storageLeaseSeconds;
|
private Integer storageLeaseSeconds;
|
||||||
|
@ -90,7 +93,7 @@ public class OrgVAppTemplateLeaseSettings extends ResourceType {
|
||||||
}
|
}
|
||||||
|
|
||||||
public B fromOrgVAppTemplateLeaseSettings(OrgVAppTemplateLeaseSettings in) {
|
public B fromOrgVAppTemplateLeaseSettings(OrgVAppTemplateLeaseSettings in) {
|
||||||
return fromResourceType(in)
|
return fromResource(in)
|
||||||
.deleteOnStorageLeaseExpiration(in.deleteOnStorageLeaseExpiration())
|
.deleteOnStorageLeaseExpiration(in.deleteOnStorageLeaseExpiration())
|
||||||
.storageLeaseSeconds(in.getStorageLeaseSeconds());
|
.storageLeaseSeconds(in.getStorageLeaseSeconds());
|
||||||
}
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
@XmlSchema(namespace = VCLOUD_1_5_NS,
|
||||||
|
elementFormDefault = XmlNsForm.QUALIFIED,
|
||||||
|
xmlns = {
|
||||||
|
@XmlNs(prefix = "", namespaceURI = VCLOUD_1_5_NS)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@XmlAccessorType(XmlAccessType.FIELD)
|
||||||
|
package org.jclouds.vcloud.director.v1_5.domain.org;
|
||||||
|
|
||||||
|
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_1_5_NS;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAccessType;
|
||||||
|
import javax.xml.bind.annotation.XmlAccessorType;
|
||||||
|
import javax.xml.bind.annotation.XmlNs;
|
||||||
|
import javax.xml.bind.annotation.XmlNsForm;
|
||||||
|
import javax.xml.bind.annotation.XmlSchema;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -37,6 +37,15 @@ import org.jclouds.dmtf.ovf.NetworkSection;
|
||||||
import org.jclouds.dmtf.ovf.ProductSection;
|
import org.jclouds.dmtf.ovf.ProductSection;
|
||||||
import org.jclouds.dmtf.ovf.SectionType;
|
import org.jclouds.dmtf.ovf.SectionType;
|
||||||
import org.jclouds.dmtf.ovf.StartupSection;
|
import org.jclouds.dmtf.ovf.StartupSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.CustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -25,6 +25,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.params.ParamsType.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.params.ParamsType.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -28,6 +28,8 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.params.VAppCreationParams.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -30,6 +30,8 @@ import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.AccessSetting;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ import javax.xml.bind.annotation.XmlAttribute;
|
||||||
import javax.xml.bind.annotation.XmlElement;
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.params.VAppCreationParams.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -28,6 +28,8 @@ import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.params.VAppCreationParams.Builder;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -35,6 +35,14 @@ import org.jclouds.dmtf.ovf.NetworkSection;
|
||||||
import org.jclouds.dmtf.ovf.ProductSection;
|
import org.jclouds.dmtf.ovf.ProductSection;
|
||||||
import org.jclouds.dmtf.ovf.SectionType;
|
import org.jclouds.dmtf.ovf.SectionType;
|
||||||
import org.jclouds.dmtf.ovf.StartupSection;
|
import org.jclouds.dmtf.ovf.StartupSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.CustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.GuestCustomizationSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.LeaseSettingsSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConfigSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.NetworkConnectionSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.OperatingSystemSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.RuntimeInfoSection;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.section.VirtualHardwareSection;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* specific language governing permissions and limitations
|
* specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Vm;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
import com.google.common.base.Objects.ToStringHelper;
|
import com.google.common.base.Objects.ToStringHelper;
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.jclouds.vcloud.director.v1_5.domain;
|
package org.jclouds.vcloud.director.v1_5.domain.params;
|
||||||
|
|
||||||
import static com.google.common.base.Objects.equal;
|
import static com.google.common.base.Objects.equal;
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
@ -26,6 +26,8 @@ import javax.xml.bind.annotation.XmlElement;
|
||||||
import javax.xml.bind.annotation.XmlRootElement;
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
import javax.xml.bind.annotation.XmlType;
|
import javax.xml.bind.annotation.XmlType;
|
||||||
|
|
||||||
|
import org.jclouds.vcloud.director.v1_5.domain.Reference;
|
||||||
|
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.Objects;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue