From 7f83356108e33b8cbd7f68124129da6b1e2abdb6 Mon Sep 17 00:00:00 2001 From: danikov Date: Tue, 21 Feb 2012 16:05:01 +0000 Subject: [PATCH] make params class concrete --- ...ava => InstantiateVAppTemplateParams.java} | 83 +++++++++++++++---- 1 file changed, 65 insertions(+), 18 deletions(-) rename labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/{InstantiateVAppTemplateParamsType.java => InstantiateVAppTemplateParams.java} (65%) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParamsType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java similarity index 65% rename from labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParamsType.java rename to labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java index 9849c47f60..ce7e905f34 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParamsType.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/InstantiateVAppTemplateParams.java @@ -57,52 +57,99 @@ import com.google.common.base.Objects; @XmlType(name = "InstantiateVAppTemplateParams", propOrder = { "allEULAsAccepted" }) -public class InstantiateVAppTemplateParamsType> - extends InstantiateVAppParamsType - -{ - public static > Builder builder() { - return new Builder(); +public class InstantiateVAppTemplateParams + extends InstantiateVAppParamsType { + + @SuppressWarnings("unchecked") + public static Builder builder() { + return new Builder(); } - public Builder toBuilder() { - return new Builder().fromInstantiateVAppTemplateParams(this); + public Builder toBuilder() { + return new Builder().fromInstantiateVAppTemplateParams(this); } - public static class Builder> extends InstantiateVAppParamsType.Builder { + public static class Builder extends InstantiateVAppParamsType.Builder { private Boolean allEULAsAccepted; /** * @see InstantiateVAppTemplateParamsType#getAllEULAsAccepted() */ - public Builder allEULAsAccepted(Boolean allEULAsAccepted) { + public Builder allEULAsAccepted(Boolean allEULAsAccepted) { this.allEULAsAccepted = allEULAsAccepted; return this; } - - public InstantiateVAppTemplateParamsType build() { - InstantiateVAppTemplateParamsType instantiateVAppTemplateParams = new InstantiateVAppTemplateParamsType(); + public InstantiateVAppTemplateParams build() { + InstantiateVAppTemplateParams instantiateVAppTemplateParams = new InstantiateVAppTemplateParams(); instantiateVAppTemplateParams.setAllEULAsAccepted(allEULAsAccepted); return instantiateVAppTemplateParams; } + + /** + * @see ParamsType#getDescription() + */ + public Builder description(String description) { + super.description(description); + return this; + } + + /** + * @see ParamsType#getName() + */ + public Builder name(String name) { + super.name(name); + return this; + } + + /** + * @see VAppCreationParamsType#getVAppParent() + */ + public Builder vAppParent(Reference vAppParent) { + super.vAppParent(vAppParent); + return this; + } + + /** + * @see VAppCreationParamsType#getInstantiationParams() + */ + public Builder instantiationParams(InstantiationParams instantiationParams) { + super.instantiationParams(instantiationParams); + return this; + } + + /** + * @see VAppCreationParamsType#getDeploy() + */ + public Builder deploy(Boolean deploy) { + super.deploy(deploy); + return this; + } + + /** + * @see VAppCreationParamsType#getPowerOn() + */ + public Builder powerOn(Boolean powerOn) { + super.powerOn(powerOn); + return this; + } /** * {@inheritDoc} */ - @SuppressWarnings("unchecked") @Override - public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType in) { + public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType in) { return Builder.class.cast(super.fromInstantiateVAppParamsType(in)); } - public Builder fromInstantiateVAppTemplateParams(InstantiateVAppTemplateParamsType in) { + + public Builder fromInstantiateVAppTemplateParams(InstantiateVAppTemplateParams in) { return fromInstantiateVAppParamsType(in) .allEULAsAccepted(in.isAllEULAsAccepted()); } } - private InstantiateVAppTemplateParamsType() { + private InstantiateVAppTemplateParams() { // For JAXB and builder use } @@ -147,7 +194,7 @@ public class InstantiateVAppTemplateParamsType that = InstantiateVAppTemplateParamsType.class.cast(o); + InstantiateVAppTemplateParams that = InstantiateVAppTemplateParams.class.cast(o); return equal(allEULAsAccepted, that.allEULAsAccepted); }