mirror of https://github.com/apache/jclouds.git
Adding VAppClient and all associated domain objects
This commit is contained in:
parent
525506930f
commit
7cfce5dd44
labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5
VCloudDirectorAsyncClient.javaVCloudDirectorClient.javaVCloudDirectorConstants.javaVCloudDirectorException.javaVCloudDirectorMediaType.javaVCloudDirectorPropertiesBuilder.javaVCloudDirectorRuntimeException.java
config
domain
AbstractVAppType.javaAccessSetting.javaAccessSettings.javaCloneVAppParams.javaComposeVAppParams.javaControlAccessParams.javaCustomizationSection.javaDeployVAppParams.javaEntityType.javaError.javaGuestCustomizationSection.javaInstantiateOvfParams.javaInstantiateVAppParams.javaInstantiateVAppParamsType.javaInstantiateVAppTemplateParams.javaInstantiationParams.javaLeaseSettingsSection.javaLink.javaMedia.javaMediaInsertOrEjectParams.javaMetadata.javaMetadataEntry.javaMetadataValue.javaNetworkConfigSection.javaNetworkConnectionSection.javaNetworkType.javaOrg.javaOrgNetwork.javaOrgPasswordPolicySettings.javaParamsType.javaRasdItemsList.javaRecomposeVAppParams.javaReferenceType.javaResourceEntities.javaResourceEntityType.javaResourceType.javaRuntimeInfoSection.javaScreenTicket.javaTask.javaTasksList.javaUndeployVAppParams.javaVApp.javaVAppChildren.javaVAppCreationParams.javaVAppCreationParamsType.javaVAppNetwork.javaVAppNetworkConfiguration.javaVAppTemplate.javaVMWareTools.javaVm.javaVmPendingQuestion.javaVmQuestionAnswer.javaVmQuestionAnswerChoice.java
cim
AutomaticRecoveryAction.javaAutomaticShutdownAction.javaAutomaticStartupAction.javaCIMResourceAllocationSettingDataType.javaCimAnySimpleType.javaCimAnySimpleTypeAdapter.javaCimBoolean.javaCimReference.javaCimString.javaCimUnsignedInt.javaCimUnsignedLong.javaCimUnsignedShort.javaConsumerVisibility.javaMappingBehavior.javaResourceAllocationCaption.javaResourceAllocationCaptionType.javaResourceAllocationChangeableType.javaResourceAllocationChangeableTypeType.javaResourceType.javaVirtualSystemCaption.javaVirtualSystemCaptionType.javaVirtualSystemChangeableType.javaVirtualSystemChangeableTypeType.java
ovf
|
@ -41,6 +41,7 @@ import org.jclouds.vcloud.director.v1_5.features.QueryAsyncClient;
|
|||
import org.jclouds.vcloud.director.v1_5.features.TaskAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UploadAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UserAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppTemplateAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VdcAsyncClient;
|
||||
|
||||
|
@ -108,15 +109,20 @@ public interface VCloudDirectorAsyncClient {
|
|||
@Delegate
|
||||
UploadAsyncClient getUploadClient();
|
||||
|
||||
/**
|
||||
* @return asynchronous access to {@link VApp} features
|
||||
*/
|
||||
@Delegate
|
||||
VAppAsyncClient getVAppClient();
|
||||
|
||||
/**
|
||||
* @return asynchronous access to {@link org.jclouds.vcloud.director.v1_5.domain.VAppTemplate} features
|
||||
* @return asynchronous access to {@link VAppTemplate} features
|
||||
*/
|
||||
@Delegate
|
||||
VAppTemplateAsyncClient getVAppTemplateClient();
|
||||
|
||||
/**
|
||||
* @return asynchronous access to {@link Catalog} features
|
||||
* @return asynchronous access to {@link Catalog} admin features
|
||||
*/
|
||||
@Delegate
|
||||
AdminCatalogAsyncClient getAdminCatalogClient();
|
||||
|
|
|
@ -45,6 +45,7 @@ import org.jclouds.vcloud.director.v1_5.features.QueryClient;
|
|||
import org.jclouds.vcloud.director.v1_5.features.TaskClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UploadClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UserClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppTemplateClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VdcClient;
|
||||
|
||||
|
@ -107,19 +108,25 @@ public interface VCloudDirectorClient {
|
|||
VdcClient getVdcClient();
|
||||
|
||||
/**
|
||||
* @return synchronous access to {@link Upload} features
|
||||
* @return synchronous access to upload features
|
||||
*/
|
||||
@Delegate
|
||||
UploadClient getUploadClient();
|
||||
|
||||
/**
|
||||
* @return synchronous access to {@link org.jclouds.vcloud.director.v1_5.domain.VAppTemplate} features
|
||||
* @return synchronous access to {@link VApp} features
|
||||
*/
|
||||
@Delegate
|
||||
VAppClient getVAppClient();
|
||||
|
||||
/**
|
||||
* @return synchronous access to {@link VAppTemplate} features
|
||||
*/
|
||||
@Delegate
|
||||
VAppTemplateClient getVAppTemplateClient();
|
||||
|
||||
/**
|
||||
* @return synchronous access to {@link Catalog} features
|
||||
* @return synchronous access to {@link Catalog} admin features
|
||||
*/
|
||||
@Delegate
|
||||
AdminCatalogClient getAdminCatalogClient();
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5;
|
||||
|
||||
|
||||
/**
|
||||
* Constants used by VCloudDirector clients
|
||||
*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -24,26 +24,36 @@ import org.jclouds.vcloud.director.v1_5.domain.Task;
|
|||
/**
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
public class VCloudDirectorException extends RuntimeException {
|
||||
public class VCloudDirectorException extends VCloudDirectorRuntimeException {
|
||||
|
||||
/** The serialVersionUID. */
|
||||
private static final long serialVersionUID = -5292516858598372960L;
|
||||
|
||||
private static final String MSG_FMT = "%s: %s";
|
||||
|
||||
private final Error error;
|
||||
private final Task task;
|
||||
|
||||
public VCloudDirectorException(Error error) {
|
||||
super("ERR-801: Error: " + error.getMessage());
|
||||
super(String.format(MSG_FMT, "Error", error.getMessage()));
|
||||
this.error = error;
|
||||
this.task = null;
|
||||
}
|
||||
|
||||
public VCloudDirectorException(Task task) {
|
||||
super("ERR-802: Task error: " + task.getError().getMessage());
|
||||
super(String.format(MSG_FMT, "Task error", task.getError().getMessage()));
|
||||
this.error = task.getError();
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public Integer getMajorErrorCode() {
|
||||
return error.getMajorErrorCode();
|
||||
}
|
||||
|
||||
public Error.Code getCode() {
|
||||
return Error.Code.fromCode(error.getMajorErrorCode());
|
||||
}
|
||||
|
||||
public Error getError() {
|
||||
return error;
|
||||
}
|
||||
|
@ -55,5 +65,4 @@ public class VCloudDirectorException extends RuntimeException {
|
|||
public Task getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,6 +34,10 @@ public class VCloudDirectorMediaType {
|
|||
|
||||
public static final String ANY = "*/*";
|
||||
|
||||
public static final String ANY_IMAGE = "image/*";
|
||||
|
||||
public static final String APPLICATION_XML_1_5 = "application/*+xml;version=1.5";
|
||||
|
||||
public static final String SESSION = "application/vnd.vmware.vcloud.session+xml";
|
||||
|
||||
public static final String ERROR = "application/vnd.vmware.vcloud.error+xml";
|
||||
|
@ -74,30 +78,23 @@ public class VCloudDirectorMediaType {
|
|||
|
||||
public static final String ADMIN_USER = "application/vnd.vmware.admin.user+xml";
|
||||
|
||||
public static final String V_APP = "application/vnd.vmware.vcloud.vApp+xml";
|
||||
public static final String VAPP = "application/vnd.vmware.vcloud.vApp+xml";
|
||||
|
||||
public static final String V_APP_TEMPLATE = "application/vnd.vmware.vcloud.vAppTemplate+xml";
|
||||
public static final String VAPP_TEMPLATE = "application/vnd.vmware.vcloud.vAppTemplate+xml";
|
||||
|
||||
public static final String CAPTURE_VAPP_PARAMS =
|
||||
"application/vnd.vmware.vcloud.captureVAppParams+xml";
|
||||
public static final String CAPTURE_VAPP_PARAMS = "application/vnd.vmware.vcloud.captureVAppParams+xml";
|
||||
|
||||
public static final String CLONE_MEDIA_PARAMS =
|
||||
"application/vnd.vmware.vcloud.cloneMediaParams+xml";
|
||||
public static final String CLONE_MEDIA_PARAMS = "application/vnd.vmware.vcloud.cloneMediaParams+xml";
|
||||
|
||||
public static final String CLONE_V_APP_PARAMS =
|
||||
"application/vnd.vmware.vcloud.cloneVAppParams+xml";
|
||||
public static final String CLONE_VAPP_PARAMS = "application/vnd.vmware.vcloud.cloneVAppParams+xml";
|
||||
|
||||
public static final String CLONE_V_APP_TEMPLATE_PARAMS =
|
||||
"application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml";
|
||||
public static final String CLONE_VAPP_TEMPLATE_PARAMS = "application/vnd.vmware.vcloud.cloneVAppTemplateParams+xml";
|
||||
|
||||
public static final String COMPOSE_VAPP_PARAMS =
|
||||
"application/vnd.vmware.vcloud.composeVAppParams+xml";
|
||||
public static final String COMPOSE_VAPP_PARAMS = "application/vnd.vmware.vcloud.composeVAppParams+xml";
|
||||
|
||||
public static final String INSTANTIATE_VAPP_TEMPLATE_PARAMS =
|
||||
"application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml";
|
||||
public static final String INSTANTIATE_VAPP_TEMPLATE_PARAMS = "application/vnd.vmware.vcloud.instantiateVAppTemplateParams+xml";
|
||||
|
||||
public static final String UPLOAD_VAPP_TEMPLATE_PARAMS =
|
||||
"application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml";
|
||||
public static final String UPLOAD_VAPP_TEMPLATE_PARAMS = "application/vnd.vmware.vcloud.uploadVAppTemplateParams+xml";
|
||||
|
||||
public static final String QUERY_RESULT_RECORDS = "application/vnd.vmware.vcloud.query.records+xml";
|
||||
|
||||
|
@ -107,26 +104,38 @@ public class VCloudDirectorMediaType {
|
|||
|
||||
public static final String CONTROL_ACCESS = "application/vnd.vmware.vcloud.controlAccess+xml";
|
||||
|
||||
public static final String VAPP_TEMPLATE = "application/vnd.vmware.vcloud.vAppTemplate+xml";
|
||||
|
||||
public static final String CUSTOMIZATION_SECTION = "application/vnd.vmware.vcloud.customizationSection+xml";
|
||||
|
||||
public static final String GUEST_CUSTOMIZATION_SECTION = "application/vnd.vmware.vcloud.guestCustomizationSection+xml";
|
||||
|
||||
public static final String LEASE_SETTINGS_SECTION = "application/vnd.vmware.vcloud.leaseSettingsSection+xml";
|
||||
|
||||
public static final String NETWORK_SECTION = "application/vnd.vmware.vcloud.networkSection+xml";
|
||||
|
||||
public static final String NETWORK_CONFIG_SECTION = "application/vnd.vmware.vcloud.networkConfigSection+xml";
|
||||
|
||||
public static final String NETWORK_CONNECTION_SECTION = "application/vnd.vmware.vcloud.networkConnectionSection+xml";
|
||||
|
||||
public static final String OPERATING_SYSTEM_SECTION = "application/vnd.vmware.vcloud.operatingSystemSection+xml";
|
||||
|
||||
public static final String PRODUCT_SECTION_LIST = "application/vnd.vmware.vcloud.productSection+xml";
|
||||
|
||||
public static final String RELOCATE_TEMPLATE = "application/vnd.vmware.vcloud.relocateTemplate+xml";
|
||||
public static final String STARTUP_SECTION = "application/vnd.vmware.vcloud.startupSection+xml";
|
||||
|
||||
public static final String LEASE_SETTINGS_SECTION = "application/vnd.vmware.vcloud.leaseSettingsSection+xml";
|
||||
public static final String VIRTUAL_HARDWARE_SECTION = "application/vnd.vmware.vcloud.virtualHardwareSection+xml";
|
||||
|
||||
public static final String RELOCATE_TEMPLATE = "application/vnd.vmware.vcloud.relocateTemplate+xml";
|
||||
|
||||
public static final String ENVELOPE = "application/vnd.???";
|
||||
|
||||
public static final String VM_PENDING_ANSWER = "application/vnd.vmware.vcloud.vmPendingAnswer+xml";
|
||||
|
||||
public static final String VM_PENDING_QUESTION = "application/vnd.vmware.vcloud.vmPendingQuestion+xml";
|
||||
|
||||
public static final String OVF_RASD_ITEM = "application/vnd.vmware.vcloud.rasdItem+xml";
|
||||
|
||||
public static final String OVF_RASD_ITEMS_LIST = "application/vnd.vmware.vcloud.rasdItemsList+xml";
|
||||
|
||||
public static final String ADMIN_CATALOG = "application/vnd.vmware.admin.catalog+xml";
|
||||
|
||||
public static final String ADMIN_ORG = "application/vnd.vmware.admin.organization+xml";
|
||||
|
@ -156,6 +165,14 @@ public class VCloudDirectorMediaType {
|
|||
public static final String USER = "application/vnd.vmware.admin.user+xml";
|
||||
|
||||
public static final String ROLE = "application/vnd.vmware.admin.role+xml";
|
||||
|
||||
public static final String DEPLOY_VAPP_PARAMS = "application/vnd.vmware.vcloud.deployVAppParams+xml";
|
||||
|
||||
public static final String RECOMPOSE_VAPP_PARAMS = "application/vnd.vmware.vcloud.recomposeVAppParams+xml";
|
||||
|
||||
public static final String RELOCATE_VM_PARAMS = "application/vnd.vmware.vcloud.relocateVmParams+xml";
|
||||
|
||||
public static final String UNDEPLOY_VAPP_PARAMS = "application/vnd.vmware.vcloud.undeployVAppParams+xml";
|
||||
|
||||
public static final String ADMIN_VDC = "application/vnd.vmware.admin.vdc+xml";
|
||||
|
||||
|
@ -165,20 +182,23 @@ public class VCloudDirectorMediaType {
|
|||
* This list must be updated whenever a new media type constant is added.
|
||||
*/
|
||||
public static final List<String> ALL = ImmutableList.of(
|
||||
SESSION, ERROR, ORG_LIST, METADATA, METADATA_ENTRY,
|
||||
METADATA_VALUE, ORG, TASKS_LIST, TASK, NETWORK, ORG_NETWORK,
|
||||
CATALOG, CATALOG_ITEM, CATALOG_ITEMS, CATALOGS_LIST, PROPERTY,
|
||||
MEDIA, OWNER, VDC, ADMIN_USER, V_APP, V_APP_TEMPLATE,
|
||||
CAPTURE_VAPP_PARAMS, CLONE_V_APP_PARAMS, CLONE_V_APP_TEMPLATE_PARAMS,
|
||||
COMPOSE_VAPP_PARAMS, INSTANTIATE_VAPP_TEMPLATE_PARAMS,
|
||||
UPLOAD_VAPP_TEMPLATE_PARAMS, ADMIN_CATALOG, ADMIN_ORG,
|
||||
QUERY_RESULT_RECORDS, QUERY_RESULT_REFERENCES, QUERY_RESULT_ID_RECORDS,
|
||||
CONTROL_ACCESS, VAPP_TEMPLATE, CUSTOMIZATION_SECTION, GUEST_CUSTOMIZATION_SECTION,
|
||||
NETWORK_SECTION, NETWORK_CONFIG_SECTION, NETWORK_CONNECTION_SECTION,
|
||||
CLONE_MEDIA_PARAMS, LEASE_SETTINGS_SECTION, RELOCATE_TEMPLATE, ENVELOPE,
|
||||
PUBLISH_CATALOG_PARAMS, GROUP, ORG_VAPP_TEMPLATE_LEASE_SETTINGS,
|
||||
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
|
||||
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,
|
||||
ADMIN_ORG_NETWORK, USER, ROLE, ADMIN_VDC
|
||||
SESSION, ERROR, ORG_LIST, METADATA, METADATA_ENTRY, METADATA_VALUE,
|
||||
ORG, TASKS_LIST, TASK, NETWORK, ORG_NETWORK, CATALOG, CATALOG_ITEM,
|
||||
CATALOG_ITEMS, CATALOGS_LIST, PROPERTY, MEDIA, OWNER, VDC, ADMIN_USER,
|
||||
VAPP, VAPP_TEMPLATE, CAPTURE_VAPP_PARAMS, CLONE_MEDIA_PARAMS,
|
||||
CLONE_VAPP_PARAMS, CLONE_VAPP_TEMPLATE_PARAMS, COMPOSE_VAPP_PARAMS,
|
||||
INSTANTIATE_VAPP_TEMPLATE_PARAMS, UPLOAD_VAPP_TEMPLATE_PARAMS,
|
||||
QUERY_RESULT_RECORDS, QUERY_RESULT_REFERENCES, QUERY_RESULT_ID_RECORDS,
|
||||
CONTROL_ACCESS, CUSTOMIZATION_SECTION, GUEST_CUSTOMIZATION_SECTION,
|
||||
LEASE_SETTINGS_SECTION, NETWORK_SECTION, NETWORK_CONFIG_SECTION,
|
||||
NETWORK_CONNECTION_SECTION, OPERATING_SYSTEM_SECTION,
|
||||
PRODUCT_SECTION_LIST, STARTUP_SECTION, VIRTUAL_HARDWARE_SECTION,
|
||||
RELOCATE_TEMPLATE, ENVELOPE, VM_PENDING_ANSWER, VM_PENDING_QUESTION,
|
||||
OVF_RASD_ITEM, OVF_RASD_ITEMS_LIST, ADMIN_CATALOG,
|
||||
PUBLISH_CATALOG_PARAMS, GROUP, ORG_VAPP_TEMPLATE_LEASE_SETTINGS,
|
||||
ORG_LEASE_SETTINGS, ORG_PASSWORD_POLICY_SETTINGS, ORG_LDAP_SETTINGS,
|
||||
ORG_GENERAL_SETTINGS, ORG_EMAIL_SETTINGS, ORG_SETTINGS, ADMIN_NETWORK,
|
||||
ADMIN_ORG_NETWORK, USER, ROLE, DEPLOY_VAPP_PARAMS, RECOMPOSE_VAPP_PARAMS,
|
||||
RELOCATE_VM_PARAMS, UNDEPLOY_VAPP_PARAMS, ADMIN_VDC
|
||||
);
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ public class VCloudDirectorPropertiesBuilder extends PropertiesBuilder {
|
|||
public Properties defaultProperties() {
|
||||
Properties properties = super.defaultProperties();
|
||||
|
||||
/** FIXME this should not be the default */
|
||||
properties.setProperty(PROPERTY_ENDPOINT, "https://vcloudbeta.bluelock.com/api");
|
||||
properties.setProperty(PROPERTY_SESSION_INTERVAL, Integer.toString(30 * 60));
|
||||
properties.setProperty(PROPERTY_API_VERSION, "1.5");
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
/**
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
public class VCloudDirectorRuntimeException extends RuntimeException {
|
||||
|
||||
/** The serialVersionUID. */
|
||||
private static final long serialVersionUID = -8590262859549695447L;
|
||||
|
||||
public VCloudDirectorRuntimeException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
|
@ -17,8 +17,8 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.config;
|
||||
|
||||
import static com.google.common.base.Throwables.propagate;
|
||||
import static org.jclouds.rest.config.BinderUtils.bindClientAndAsyncClient;
|
||||
import static com.google.common.base.Throwables.*;
|
||||
import static org.jclouds.rest.config.BinderUtils.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Map;
|
||||
|
@ -66,6 +66,8 @@ import org.jclouds.vcloud.director.v1_5.features.UploadAsyncClient;
|
|||
import org.jclouds.vcloud.director.v1_5.features.UploadClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UserAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.UserClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppTemplateAsyncClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VAppTemplateClient;
|
||||
import org.jclouds.vcloud.director.v1_5.features.VdcAsyncClient;
|
||||
|
@ -104,6 +106,7 @@ public class VCloudDirectorRestClientModule extends RestClientModule<VCloudDirec
|
|||
.put(MediaClient.class, MediaAsyncClient.class)
|
||||
.put(TaskClient.class, TaskAsyncClient.class)
|
||||
.put(VdcClient.class, VdcAsyncClient.class)
|
||||
.put(VAppClient.class, VAppAsyncClient.class)
|
||||
.put(VAppTemplateClient.class, VAppTemplateAsyncClient.class)
|
||||
.put(UploadClient.class, UploadAsyncClient.class)
|
||||
.put(MetadataClient.Readable.class, MetadataAsyncClient.Readable.class)
|
||||
|
@ -124,6 +127,7 @@ public class VCloudDirectorRestClientModule extends RestClientModule<VCloudDirec
|
|||
bindClientAndAsyncClient(binder(), SessionClient.class, SessionAsyncClient.class);
|
||||
bindClientAndAsyncClient(binder(), OrgClient.class, OrgAsyncClient.class);
|
||||
bindClientAndAsyncClient(binder(), TaskClient.class, TaskAsyncClient.class);
|
||||
bindClientAndAsyncClient(binder(), VAppClient.class, VAppAsyncClient.class);
|
||||
|
||||
bind(HttpRetryHandler.class).annotatedWith(ClientError.class).to(InvalidateSessionAndRetryOn401AndLogoutOnClose.class);
|
||||
|
||||
|
|
|
@ -0,0 +1,288 @@
|
|||
/*
|
||||
* 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.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a base type for VAppType and VmType.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="AbstractVAppType" >
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
public abstract class AbstractVAppType<T extends AbstractVAppType<T>> extends ResourceEntityType<T> {
|
||||
|
||||
public static abstract class Builder<T extends AbstractVAppType<T>> extends ResourceEntityType.Builder<T> {
|
||||
|
||||
protected Boolean deployed;
|
||||
protected Reference vAppParent;
|
||||
protected List<SectionType<?>> sections = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
public Builder<T> isDeployed(Boolean deployed) {
|
||||
this.deployed = deployed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
public Builder<T> deployed() {
|
||||
this.deployed = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
public Builder<T> notDeployed() {
|
||||
this.deployed = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getVAppParent()
|
||||
*/
|
||||
public Builder<T> parent(Reference vAppParent) {
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getSections()
|
||||
*/
|
||||
public Builder<T> sections(List<SectionType<?>> sections) {
|
||||
if (checkNotNull(sections, "sections").size() > 0)
|
||||
this.sections = Lists.newArrayList(sections);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getSections()
|
||||
*/
|
||||
public Builder<T> section(SectionType<?> section) {
|
||||
if (this.sections == null)
|
||||
this.sections = Lists.newArrayList();
|
||||
this.sections.add(checkNotNull(section, "section"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getFiles()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> files(FilesList files) {
|
||||
this.files = files;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getStatus()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> status(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getId()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> tasks(Set<Task> tasks) {
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> href(URI href) {
|
||||
this.href = href;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder<T> fromResourceEntityType(ResourceEntityType<T> in) {
|
||||
return Builder.class.cast(super.fromResourceEntityType(in));
|
||||
}
|
||||
|
||||
public Builder<T> fromAbstractVAppType(AbstractVAppType<T> in) {
|
||||
return fromResourceEntityType(in).parent(vAppParent).sections(sections).isDeployed(deployed);
|
||||
}
|
||||
}
|
||||
|
||||
@XmlElement(name = "VAppParent")
|
||||
protected Reference vAppParent;
|
||||
@XmlElementRef(name = "Section", namespace = VCloudDirectorConstants.VCLOUD_OVF_NS)
|
||||
protected List<SectionType<?>> sections = Lists.newArrayList();
|
||||
@XmlAttribute
|
||||
protected Boolean deployed;
|
||||
|
||||
protected AbstractVAppType() {
|
||||
// for JAXB and Builders
|
||||
}
|
||||
|
||||
public AbstractVAppType(URI href, String type, @Nullable Set<Link> links, String description, @Nullable Set<Task> tasks, String id, String name, FilesList files, Integer status, Reference vAppParent,
|
||||
@Nullable List<SectionType<?>> sections, Boolean deployed) {
|
||||
super(href, type, links, description, tasks, id, name, files, status);
|
||||
this.vAppParent = vAppParent;
|
||||
this.sections = sections;
|
||||
this.deployed = deployed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the vAppParent property.
|
||||
*/
|
||||
public Reference getVAppParent() {
|
||||
return vAppParent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specific ovf:Section with additional information for the vApp.
|
||||
*
|
||||
* Objects of the following type(s) are allowed in the list:
|
||||
* <ul>
|
||||
* <li>SectionType
|
||||
* <li>VirtualHardwareSectionType
|
||||
* <li>LeaseSettingsSectionType
|
||||
* <li>EulaSectionType
|
||||
* <li>RuntimeInfoSectionType
|
||||
* <li>AnnotationSectionType
|
||||
* <li>DeploymentOptionSectionType
|
||||
* <li>StartupSectionType
|
||||
* <li>ResourceAllocationSectionType
|
||||
* <li>NetworkConnectionSectionType
|
||||
* <li>CustomizationSectionType
|
||||
* <li>ProductSectionType
|
||||
* <li>GuestCustomizationSectionType
|
||||
* <li>OperatingSystemSectionType
|
||||
* <li>NetworkConfigSectionType
|
||||
* <li>NetworkSectionType
|
||||
* <li>DiskSectionType
|
||||
* <li>InstallSectionType
|
||||
* </ul>
|
||||
*/
|
||||
public List<SectionType<?>> getSections() {
|
||||
return this.sections;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the deployed property.
|
||||
*/
|
||||
public Boolean isDeployed() {
|
||||
return deployed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
Vm that = Vm.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(this.vAppParent, that.vAppParent) && equal(this.sections, that.sections) && equal(this.deployed, that.deployed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), vAppParent, sections, deployed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("vAppParent", vAppParent).add("sections", sections).add("deployed", deployed);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
* 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.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* Specifies who can access the resource.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="AccessSetting" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "AccessSetting")
|
||||
public class AccessSetting {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromAccessSetting(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Reference subject;
|
||||
private String accessLevel;
|
||||
|
||||
/**
|
||||
* @see AccessSetting#getSubject()
|
||||
*/
|
||||
public Builder subject(Reference subject) {
|
||||
this.subject = subject;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AccessSetting#getAccessLevel()
|
||||
*/
|
||||
public Builder accessLevel(String accessLevel) {
|
||||
this.accessLevel = accessLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccessSetting build() {
|
||||
AccessSetting accessSetting = new AccessSetting(subject, accessLevel);
|
||||
return accessSetting;
|
||||
}
|
||||
|
||||
public Builder fromAccessSetting(AccessSetting in) {
|
||||
return subject(in.getSubject()).accessLevel(in.getAccessLevel());
|
||||
}
|
||||
}
|
||||
|
||||
protected AccessSetting() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public AccessSetting(Reference subject, String accessLevel) {
|
||||
this.subject = subject;
|
||||
this.accessLevel = accessLevel;
|
||||
}
|
||||
|
||||
@XmlElement(name = "Subject", required = true)
|
||||
protected Reference subject;
|
||||
@XmlElement(name = "AccessLevel", required = true)
|
||||
protected String accessLevel;
|
||||
|
||||
/**
|
||||
* Gets the value of the subject property.
|
||||
*/
|
||||
public Reference getSubject() {
|
||||
return subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the accessLevel property.
|
||||
*/
|
||||
public String getAccessLevel() {
|
||||
return accessLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
AccessSetting that = AccessSetting.class.cast(o);
|
||||
return equal(this.subject, that.subject) && equal(this.accessLevel, that.accessLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(subject, accessLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("subject", subject).add("accessLevel", accessLevel).toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* 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.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* A list of access settings for a resource.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="AccessSettings" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "AccessSettings")
|
||||
public class AccessSettings {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromAccessSettings(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private List<AccessSetting> accessSettings = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see AccessSettings#getAccessSettings()
|
||||
*/
|
||||
public Builder accessSettings(List<AccessSetting> accessSettings) {
|
||||
this.accessSettings = checkNotNull(accessSettings, "accessSettings");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AccessSettings#getAccessSettings()
|
||||
*/
|
||||
public Builder accessSetting(AccessSetting accessSetting) {
|
||||
this.accessSettings.add(checkNotNull(accessSetting, "accessSetting"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public AccessSettings build() {
|
||||
return new AccessSettings(accessSettings);
|
||||
}
|
||||
|
||||
public Builder fromAccessSettings(AccessSettings in) {
|
||||
return accessSettings(in.getAccessSettings());
|
||||
}
|
||||
}
|
||||
|
||||
protected AccessSettings() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public AccessSettings(List<AccessSetting> accessSettings) {
|
||||
this.accessSettings = accessSettings;
|
||||
}
|
||||
|
||||
@XmlElement(name = "AccessSetting", required = true)
|
||||
protected List<AccessSetting> accessSettings = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* Gets the value of the accessSetting property.
|
||||
*/
|
||||
public List<AccessSetting> getAccessSettings() {
|
||||
return accessSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
AccessSettings that = AccessSettings.class.cast(o);
|
||||
return equal(this.accessSettings, that.accessSettings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(accessSettings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("accessSettings", accessSettings).toString();
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,51 +16,106 @@
|
|||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* Represents parameters for copying a vApp and optionally deleting the source.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for CloneVAppParams complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="CloneVAppParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}InstantiateVAppParamsType">
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="CloneVAppParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "CloneVAppParams")
|
||||
public class CloneVAppParams
|
||||
extends InstantiateVAppParamsType<CloneVAppParams> {
|
||||
public class CloneVAppParams extends InstantiateVAppParamsType<CloneVAppParams> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromCloneVAppParams(this);
|
||||
}
|
||||
|
||||
public static class Builder extends InstantiateVAppParamsType.Builder<CloneVAppParams> {
|
||||
|
||||
@Override
|
||||
public CloneVAppParams build() {
|
||||
return new CloneVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone);
|
||||
return new CloneVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#getSource()
|
||||
*/
|
||||
@Override
|
||||
public Builder source(ReferenceType<?> source) {
|
||||
this.source = source;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder isSourceDelete(Boolean sourceDelete) {
|
||||
this.sourceDelete = sourceDelete;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder sourceDelete() {
|
||||
this.sourceDelete = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder notSourceDelete() {
|
||||
this.sourceDelete = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder isLinkedClone(Boolean linkedClone) {
|
||||
this.linkedClone = linkedClone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder linkedClone() {
|
||||
this.linkedClone = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder notLinkedClone() {
|
||||
this.linkedClone = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
super.description(description);
|
||||
return this;
|
||||
|
@ -69,6 +124,7 @@ public class CloneVAppParams
|
|||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
|
@ -77,56 +133,72 @@ public class CloneVAppParams
|
|||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder vAppParent(Reference vAppParent) {
|
||||
super.vAppParent(vAppParent);
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder instantiationParams(InstantiationParams instantiationParams) {
|
||||
super.instantiationParams(instantiationParams);
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy(Boolean deploy) {
|
||||
super.deploy(deploy);
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
super.powerOn(powerOn);
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#getSource()
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
public Builder source(Reference source) {
|
||||
super.source(source);
|
||||
@Override
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
public Builder isSourceDelete(Boolean isSourceDelete) {
|
||||
super.isSourceDelete(isSourceDelete);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
public Builder linkedClone(Boolean linkedClone) {
|
||||
super.linkedClone(linkedClone);
|
||||
@Override
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -140,12 +212,12 @@ public class CloneVAppParams
|
|||
}
|
||||
}
|
||||
|
||||
private CloneVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
|
||||
protected CloneVAppParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public CloneVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, ReferenceType<?> source, Boolean sourceDelete, Boolean linkedClone) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
|
||||
}
|
||||
|
||||
private CloneVAppParams() {
|
||||
// For JAXB
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -19,57 +19,32 @@
|
|||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* Represents vApp composition parameters.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for ComposeVAppParams complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ComposeVAppParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}VAppCreationParamsType">
|
||||
* <sequence>
|
||||
* <element name="SourcedItem" type="{http://www.vmware.com/vcloud/v1.5}SourcedCompositionItemParamType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element ref="{http://www.vmware.com/vcloud/v1.5}AllEULAsAccepted" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="linkedClone" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="ComposeVAppParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "ComposeVAppParams", propOrder = {
|
||||
"sourcedItems",
|
||||
"allEULAsAccepted"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
// RecomposeVAppParamsType.class
|
||||
})
|
||||
public class ComposeVAppParams
|
||||
extends VAppCreationParamsType<ComposeVAppParams>
|
||||
@XmlType(name = "ComposeVAppParams")
|
||||
public class ComposeVAppParams extends VAppCreationParamsType<ComposeVAppParams> {
|
||||
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -80,15 +55,23 @@ public class ComposeVAppParams
|
|||
|
||||
public static class Builder extends VAppCreationParamsType.Builder<ComposeVAppParams> {
|
||||
|
||||
private Set<SourcedCompositionItemParam> sourcedItems = Sets.newLinkedHashSet();
|
||||
private List<SourcedCompositionItemParam> sourcedItemList = Lists.newArrayList();
|
||||
private Boolean allEULAsAccepted;
|
||||
private Boolean linkedClone;
|
||||
|
||||
/**
|
||||
* @see ComposeVAppParams#getSourcedItems()
|
||||
*/
|
||||
public Builder sourcedItems(Set<SourcedCompositionItemParam> sourcedItems) {
|
||||
this.sourcedItems = checkNotNull(sourcedItems, "sourcedItems");
|
||||
public Builder sourcedItemList(List<SourcedCompositionItemParam> sourcedItemList) {
|
||||
this.sourcedItemList = Lists.newArrayList(checkNotNull(sourcedItemList, "sourcedItemList"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ComposeVAppParams#getSourcedItem()
|
||||
*/
|
||||
public Builder sourcedItem(SourcedCompositionItemParam sourcedItem) {
|
||||
this.sourcedItemList.add(checkNotNull(sourcedItem, "sourcedItem"));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -101,19 +84,107 @@ public class ComposeVAppParams
|
|||
}
|
||||
|
||||
/**
|
||||
* @see ComposeVAppParams#isLinkedClone() ()
|
||||
* @see ComposeVAppParams#isLinkedClone()
|
||||
*/
|
||||
public Builder linkedClone(Boolean linkedClone) {
|
||||
this.linkedClone = linkedClone;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ComposeVAppParams build() {
|
||||
return new ComposeVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn,
|
||||
sourcedItems, allEULAsAccepted, linkedClone);
|
||||
return new ComposeVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, sourcedItemList, allEULAsAccepted, linkedClone);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder vAppParent(Reference vAppParent) {
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder instantiationParams(InstantiationParams instantiationParams) {
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy(Boolean deploy) {
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromVAppCreationParamsType(VAppCreationParamsType<ComposeVAppParams> in) {
|
||||
|
@ -121,28 +192,24 @@ public class ComposeVAppParams
|
|||
}
|
||||
|
||||
public Builder fromComposeVAppParams(ComposeVAppParams in) {
|
||||
return fromVAppCreationParamsType(in)
|
||||
.sourcedItems(in.getSourcedItems())
|
||||
.allEULAsAccepted(in.isAllEULAsAccepted())
|
||||
.linkedClone(in.isLinkedClone());
|
||||
return fromVAppCreationParamsType(in).sourcedItemList(in.getSourcedItemList()).allEULAsAccepted(in.isAllEULAsAccepted()).linkedClone(in.isLinkedClone());
|
||||
}
|
||||
}
|
||||
|
||||
public ComposeVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, Set<SourcedCompositionItemParam> sourcedItems, Boolean allEULAsAccepted, Boolean linkedClone) {
|
||||
public ComposeVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn,
|
||||
List<SourcedCompositionItemParam> sourcedItems, Boolean allEULAsAccepted, Boolean linkedClone) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn);
|
||||
this.sourcedItems = ImmutableSet.copyOf(sourcedItems);
|
||||
this.sourcedItemList = ImmutableList.copyOf(sourcedItemList);
|
||||
this.allEULAsAccepted = allEULAsAccepted;
|
||||
this.linkedClone = linkedClone;
|
||||
}
|
||||
|
||||
private ComposeVAppParams() {
|
||||
protected ComposeVAppParams() {
|
||||
// for JAXB
|
||||
}
|
||||
|
||||
|
||||
@XmlElement(name = "SourcedItem")
|
||||
protected Set<SourcedCompositionItemParam> sourcedItems = Sets.newLinkedHashSet();
|
||||
protected List<SourcedCompositionItemParam> sourcedItemList = Lists.newArrayList();
|
||||
@XmlElement(name = "AllEULAsAccepted")
|
||||
protected Boolean allEULAsAccepted;
|
||||
@XmlAttribute
|
||||
|
@ -151,19 +218,15 @@ public class ComposeVAppParams
|
|||
/**
|
||||
* Gets the value of the sourcedItem property.
|
||||
*/
|
||||
public Set<SourcedCompositionItemParam> getSourcedItems() {
|
||||
return Collections.unmodifiableSet(this.sourcedItems);
|
||||
public List<SourcedCompositionItemParam> getSourcedItemList() {
|
||||
return ImmutableList.copyOf(this.sourcedItemList);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to confirm acceptance of all EULAs in a
|
||||
* vApp template. Instantiation fails if this
|
||||
* element is missing, empty, or set to false
|
||||
* and one or more EulaSection elements are
|
||||
* present.
|
||||
* Used to confirm acceptance of all EULAs in a vApp template.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
* Instantiation fails if this element is missing, empty, or set to
|
||||
* false and one or more EulaSection elements are present.
|
||||
*/
|
||||
public Boolean isAllEULAsAccepted() {
|
||||
return allEULAsAccepted;
|
||||
|
@ -171,9 +234,6 @@ public class ComposeVAppParams
|
|||
|
||||
/**
|
||||
* Gets the value of the linkedClone property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isLinkedClone() {
|
||||
return linkedClone;
|
||||
|
@ -186,24 +246,18 @@ public class ComposeVAppParams
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
ComposeVAppParams that = ComposeVAppParams.class.cast(o);
|
||||
return equal(sourcedItems, that.sourcedItems) &&
|
||||
equal(allEULAsAccepted, that.allEULAsAccepted) &&
|
||||
equal(linkedClone, that.linkedClone);
|
||||
return super.equals(that) &&
|
||||
equal(this.sourcedItemList, that.sourcedItemList) && equal(this.allEULAsAccepted, that.allEULAsAccepted) && equal(this.linkedClone, that.linkedClone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(sourcedItems,
|
||||
allEULAsAccepted,
|
||||
linkedClone);
|
||||
return Objects.hashCode(super.hashCode(), sourcedItemList, allEULAsAccepted, linkedClone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("sourcedItem", sourcedItems)
|
||||
.add("allEULAsAccepted", allEULAsAccepted)
|
||||
.add("linkedClone", linkedClone).toString();
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("sourcedItemList", sourcedItemList).add("allEULAsAccepted", allEULAsAccepted).add("linkedClone", linkedClone);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,166 @@
|
|||
/*
|
||||
* 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.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* Used to control access to resources.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ControlAccessParams" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "ControlAccessParams")
|
||||
public class ControlAccessParams {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromControlAccessParams(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Boolean sharedToEveryone = Boolean.FALSE;
|
||||
private String everyoneAccessLevel;
|
||||
private AccessSettings accessSettings;
|
||||
|
||||
/**
|
||||
* @see ControlAccessParams#getIsSharedToEveryone()
|
||||
*/
|
||||
public Builder isSharedToEveryone(Boolean sharedToEveryone) {
|
||||
this.sharedToEveryone = sharedToEveryone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ControlAccessParams#getIsSharedToEveryone()
|
||||
*/
|
||||
public Builder sharedToEveryone() {
|
||||
this.sharedToEveryone = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ControlAccessParams#getIsSharedToEveryone()
|
||||
*/
|
||||
public Builder notSharedToEveryone() {
|
||||
this.sharedToEveryone = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ControlAccessParams#getEveryoneAccessLevel()
|
||||
*/
|
||||
public Builder everyoneAccessLevel(String everyoneAccessLevel) {
|
||||
this.everyoneAccessLevel = everyoneAccessLevel;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ControlAccessParams#getAccessSettings()
|
||||
*/
|
||||
public Builder accessSettings(AccessSettings accessSettings) {
|
||||
this.accessSettings = accessSettings;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ControlAccessParams build() {
|
||||
ControlAccessParams controlAccessParams = new ControlAccessParams(sharedToEveryone, everyoneAccessLevel, accessSettings);
|
||||
return controlAccessParams;
|
||||
}
|
||||
|
||||
public Builder fromControlAccessParams(ControlAccessParams in) {
|
||||
return isSharedToEveryone(in.isSharedToEveryone()).everyoneAccessLevel(in.getEveryoneAccessLevel()).accessSettings(in.getAccessSettings());
|
||||
}
|
||||
}
|
||||
|
||||
protected ControlAccessParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public ControlAccessParams(Boolean sharedToEveryone, String everyoneAccessLevel, AccessSettings accessSettings) {
|
||||
this.sharedToEveryone = sharedToEveryone;
|
||||
this.everyoneAccessLevel = everyoneAccessLevel;
|
||||
this.accessSettings = accessSettings;
|
||||
}
|
||||
|
||||
@XmlElement(name = "IsSharedToEveryone", required = true)
|
||||
protected Boolean sharedToEveryone;
|
||||
@XmlElement(name = "EveryoneAccessLevel")
|
||||
protected String everyoneAccessLevel;
|
||||
@XmlElement(name = "AccessSettings")
|
||||
protected AccessSettings accessSettings;
|
||||
|
||||
/**
|
||||
* If true, this means that the resource is shared with everyone in the organization.
|
||||
*
|
||||
* Defaults to false. Sharing settings must be manipulated through the organization.
|
||||
*/
|
||||
public Boolean isSharedToEveryone() {
|
||||
return sharedToEveryone;
|
||||
}
|
||||
|
||||
/**
|
||||
* If {@link #isSharedToEveryone()} is true, this element must be present and determines the access level.
|
||||
*/
|
||||
public String getEveryoneAccessLevel() {
|
||||
return everyoneAccessLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* The access settings to be applied if {@link #isSharedToEveryone()} is false.
|
||||
*
|
||||
* Required on create and modify if {@link #isSharedToEveryone()} is false.
|
||||
*/
|
||||
public AccessSettings getAccessSettings() {
|
||||
return accessSettings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
ControlAccessParams that = ControlAccessParams.class.cast(o);
|
||||
return equal(this.sharedToEveryone, that.sharedToEveryone) && equal(this.everyoneAccessLevel, that.everyoneAccessLevel) && equal(this.accessSettings, that.accessSettings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(sharedToEveryone, everyoneAccessLevel, accessSettings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("sharedToEveryone", sharedToEveryone).add("everyoneAccessLevel", everyoneAccessLevel).add("accessSettings", accessSettings).toString();
|
||||
}
|
||||
}
|
|
@ -123,7 +123,7 @@ public class CustomizationSection extends SectionType<CustomizationSection> {
|
|||
}
|
||||
|
||||
public Builder fromCustomizationSection(CustomizationSection in) {
|
||||
return fromSection(in)
|
||||
return fromSectionType(in)
|
||||
.customizeOnInstantiate(in.isCustomizeOnInstantiate())
|
||||
.links(in.getLinks())
|
||||
.href(in.getHref())
|
||||
|
@ -134,8 +134,8 @@ public class CustomizationSection extends SectionType<CustomizationSection> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<CustomizationSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<CustomizationSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,197 @@
|
|||
/**
|
||||
* 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.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Represents vApp/VM deployment parameters.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="DeployVAppParams" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "DeployVAppParams")
|
||||
public class DeployVAppParams {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromDeployVAppParams(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Boolean powerOn = Boolean.TRUE;
|
||||
private Integer deploymentLeaseSeconds;
|
||||
private Boolean forceCustomization = Boolean.FALSE;
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#isPowerOn()
|
||||
*/
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#isPowerOn()
|
||||
*/
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#isPowerOn()
|
||||
*/
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#getDeploymentLeaseSeconds()
|
||||
*/
|
||||
public Builder deploymentLeaseSeconds(Integer deploymentLeaseSeconds) {
|
||||
this.deploymentLeaseSeconds = deploymentLeaseSeconds;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#isForceCustomization()
|
||||
*/
|
||||
public Builder forceCustomization(Boolean forceCustomization) {
|
||||
this.forceCustomization = forceCustomization;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#isForceCustomization()
|
||||
*/
|
||||
public Builder forceCustomization() {
|
||||
this.forceCustomization = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see DeployVAppParams#isForceCustomization()
|
||||
*/
|
||||
public Builder notForceCustomization() {
|
||||
this.forceCustomization = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DeployVAppParams build() {
|
||||
DeployVAppParams deployVAppParams = new DeployVAppParams(powerOn, deploymentLeaseSeconds, forceCustomization);
|
||||
return deployVAppParams;
|
||||
}
|
||||
|
||||
|
||||
public Builder fromDeployVAppParams(DeployVAppParams in) {
|
||||
return powerOn(in.isPowerOn())
|
||||
.deploymentLeaseSeconds(in.getDeploymentLeaseSeconds())
|
||||
.forceCustomization(in.isForceCustomization());
|
||||
}
|
||||
}
|
||||
|
||||
protected DeployVAppParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public DeployVAppParams(Boolean powerOn, Integer deploymentLeaseSeconds, Boolean forceCustomization) {
|
||||
this.powerOn = powerOn;
|
||||
this.deploymentLeaseSeconds = deploymentLeaseSeconds;
|
||||
this.forceCustomization = forceCustomization;
|
||||
}
|
||||
|
||||
@XmlAttribute
|
||||
protected Boolean powerOn;
|
||||
@XmlAttribute
|
||||
protected Integer deploymentLeaseSeconds;
|
||||
@XmlAttribute
|
||||
protected Boolean forceCustomization;
|
||||
|
||||
/**
|
||||
* Used to specify whether to power on vapp on deployment, if not set default value is true.
|
||||
*/
|
||||
public Boolean isPowerOn() {
|
||||
return powerOn;
|
||||
}
|
||||
|
||||
public void setPowerOn(Boolean value) {
|
||||
this.powerOn = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Lease in seconds for deployment.
|
||||
*/
|
||||
public Integer getDeploymentLeaseSeconds() {
|
||||
return deploymentLeaseSeconds;
|
||||
}
|
||||
|
||||
public void setDeploymentLeaseSeconds(Integer value) {
|
||||
this.deploymentLeaseSeconds = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to specify whether to force customization on deployment, if not set default value is false.
|
||||
*/
|
||||
public Boolean isForceCustomization() {
|
||||
return forceCustomization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
DeployVAppParams that = DeployVAppParams.class.cast(o);
|
||||
return equal(powerOn, that.powerOn) &&
|
||||
equal(deploymentLeaseSeconds, that.deploymentLeaseSeconds) &&
|
||||
equal(forceCustomization, that.forceCustomization);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(powerOn,
|
||||
deploymentLeaseSeconds,
|
||||
forceCustomization);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("powerOn", powerOn)
|
||||
.add("deploymentLeaseSeconds", deploymentLeaseSeconds)
|
||||
.add("forceCustomization", forceCustomization).toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -30,6 +30,7 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AbstractVAppType.Builder;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
@ -38,11 +39,11 @@ import com.google.common.collect.Sets;
|
|||
|
||||
/**
|
||||
* Basic entity type in the vCloud object model.
|
||||
* <p/>
|
||||
*
|
||||
* Includes a name, an optional description, and an optional list of links
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <xs:complexType name="EntityType">
|
||||
* <xs:complexType name="EntityType" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
|
@ -167,25 +168,27 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
return Builder.class.cast(super.links(links));
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> link(Link link) {
|
||||
return Builder.class.cast(super.link(link));
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> fromResourceType(ResourceType<T> in) {
|
||||
return Builder.class.cast(super.fromResourceType(in));
|
||||
|
@ -228,6 +231,10 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
/**
|
||||
* A list of queued, running, or recently completed tasks associated with this entity.
|
||||
*/
|
||||
|
@ -252,6 +259,10 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
|
@ -276,11 +287,11 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(description, tasks, id, name);
|
||||
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,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -18,21 +18,27 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType;
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorRuntimeException;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
/**
|
||||
* The standard error message type used in the vCloud REST API.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <xs:complexType name="ErrorType">
|
||||
* <xs:complexType name="ErrorType" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
|
@ -40,6 +46,47 @@ import com.google.common.base.Objects;
|
|||
@XmlRootElement(name = "Error")
|
||||
public class Error {
|
||||
|
||||
public static enum Code {
|
||||
|
||||
OK(200),
|
||||
CREATED(201),
|
||||
ACCEPTED(202),
|
||||
NO_CONTENT(204),
|
||||
SEE_OTHER(303),
|
||||
BAD_REQUEST(400),
|
||||
UNAUTHORIZED(401),
|
||||
FORBIDDEN(403), // NOTE also means 'not found' for entities
|
||||
NOT_FOUND(404),
|
||||
NOT_ALLOWED(405),
|
||||
INTERNAL_ERROR(500),
|
||||
NOT_IMPLEMENTED(501),
|
||||
UNAVAILABLE(503);
|
||||
|
||||
private Integer majorErrorCode;
|
||||
|
||||
private Code(Integer majorErrorCode) {
|
||||
this.majorErrorCode = majorErrorCode;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return majorErrorCode;
|
||||
}
|
||||
|
||||
public static Code fromCode(final int majorErrorCode) {
|
||||
Optional<Code> found = Iterables.tryFind(Arrays.asList(values()), new Predicate<Code>() {
|
||||
@Override
|
||||
public boolean apply(Code code) {
|
||||
return code.getCode().equals(majorErrorCode);
|
||||
}
|
||||
});
|
||||
if (found.isPresent()) {
|
||||
return found.get();
|
||||
} else {
|
||||
throw new VCloudDirectorRuntimeException(String.format("Illegal major error code '%d'", majorErrorCode));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static final String MEDIA_TYPE = VCloudDirectorMediaType.ERROR;
|
||||
|
||||
public static Builder builder() {
|
||||
|
|
|
@ -271,7 +271,7 @@ public class GuestCustomizationSection extends SectionType<GuestCustomizationSec
|
|||
}
|
||||
|
||||
public Builder fromGuestCustomizationSection(GuestCustomizationSection in) {
|
||||
return fromSection(in)
|
||||
return fromSectionType(in)
|
||||
.enabled(in.isEnabled())
|
||||
.changeSid(in.isChangeSid())
|
||||
.virtualMachineId(in.getVirtualMachineId())
|
||||
|
@ -295,8 +295,8 @@ public class GuestCustomizationSection extends SectionType<GuestCustomizationSec
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<GuestCustomizationSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<GuestCustomizationSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,246 @@
|
|||
/*
|
||||
* 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.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
||||
/**
|
||||
* Represents vApp instantiation from OVF parameters
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="InstantiateOvfParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "InstantiateOvfParams")
|
||||
public class InstantiateOvfParams extends VAppCreationParamsType<InstantiateOvfParams> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromInstantiateOvfParams(this);
|
||||
}
|
||||
|
||||
public static class Builder extends VAppCreationParamsType.Builder<InstantiateOvfParams> {
|
||||
|
||||
private Boolean allEULAsAccepted;
|
||||
private String transferFormat;
|
||||
|
||||
/**
|
||||
* @see InstantiateOvfParams#isAllEULAsAccepted()
|
||||
*/
|
||||
public Builder isAllEULAsAccepted(Boolean allEULAsAccepted) {
|
||||
this.allEULAsAccepted = allEULAsAccepted;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateOvfParams#isAllEULAsAccepted()
|
||||
*/
|
||||
public Builder allEULAsAccepted() {
|
||||
this.allEULAsAccepted = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateOvfParams#isAllEULAsAccepted()
|
||||
*/
|
||||
public Builder allEULAsNotAccepted() {
|
||||
this.allEULAsAccepted = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateOvfParams#getTransferFormat()
|
||||
*/
|
||||
public Builder transferFormat(String transferFormat) {
|
||||
this.transferFormat = transferFormat;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstantiateOvfParams build() {
|
||||
InstantiateOvfParams instantiateOvfParams = new InstantiateOvfParams(description, name, vAppParent, instantiationParams, deploy, powerOn, allEULAsAccepted, transferFormat);
|
||||
return instantiateOvfParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder vAppParent(Reference vAppParent) {
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder instantiationParams(InstantiationParams instantiationParams) {
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy(Boolean deploy) {
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromVAppCreationParamsType(VAppCreationParamsType<InstantiateOvfParams> in) {
|
||||
return Builder.class.cast(super.fromVAppCreationParamsType(in));
|
||||
}
|
||||
|
||||
public Builder fromInstantiateOvfParams(InstantiateOvfParams in) {
|
||||
return fromVAppCreationParamsType(in).isAllEULAsAccepted(in.isAllEULAsAccepted()).transferFormat(in.getTransferFormat());
|
||||
}
|
||||
}
|
||||
|
||||
protected InstantiateOvfParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public InstantiateOvfParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn, Boolean allEULAsAccepted,
|
||||
String transferFormat) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn);
|
||||
this.allEULAsAccepted = allEULAsAccepted;
|
||||
this.transferFormat = transferFormat;
|
||||
}
|
||||
|
||||
@XmlElement(name = "AllEULAsAccepted")
|
||||
protected Boolean allEULAsAccepted;
|
||||
@XmlAttribute
|
||||
protected String transferFormat;
|
||||
|
||||
/**
|
||||
* Gets the value of the allEULAsAccepted property.
|
||||
*/
|
||||
public Boolean isAllEULAsAccepted() {
|
||||
return allEULAsAccepted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the transferFormat property.
|
||||
*/
|
||||
public String getTransferFormat() {
|
||||
return transferFormat;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
InstantiateOvfParams that = InstantiateOvfParams.class.cast(o);
|
||||
return super.equals(that) && equal(this.allEULAsAccepted, that.allEULAsAccepted) && equal(this.transferFormat, that.transferFormat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), allEULAsAccepted, transferFormat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("allEULAsAccepted", allEULAsAccepted).add("transferFormat", transferFormat);
|
||||
}
|
||||
}
|
|
@ -20,13 +20,13 @@
|
|||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parameters for Instantiating a vApp
|
||||
*
|
||||
* @author danikov
|
||||
*/
|
||||
public class InstantiateVAppParams
|
||||
extends InstantiateVAppParamsType<InstantiateVAppParams> {
|
||||
public class InstantiateVAppParams extends InstantiateVAppParamsType<InstantiateVAppParams> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
|
@ -38,40 +38,81 @@ public class InstantiateVAppParams
|
|||
return new Builder();
|
||||
}
|
||||
|
||||
public static class Builder
|
||||
extends InstantiateVAppParamsType.Builder<InstantiateVAppParams> {
|
||||
public static class Builder extends InstantiateVAppParamsType.Builder<InstantiateVAppParams> {
|
||||
|
||||
@Override
|
||||
public InstantiateVAppParams build() {
|
||||
return new InstantiateVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone);
|
||||
return new InstantiateVAppParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParams#getSource()
|
||||
* @see InstantiateVAppParamsType#getSource()
|
||||
*/
|
||||
public Builder source(Reference source) {
|
||||
super.source(source);
|
||||
@Override
|
||||
public Builder source(ReferenceType<?> source) {
|
||||
this.source = source;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParams#isSourceDelete()
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
public Builder isSourceDelete(Boolean isSourceDelete) {
|
||||
super.isSourceDelete(isSourceDelete);
|
||||
@Override
|
||||
public Builder isSourceDelete(Boolean sourceDelete) {
|
||||
this.sourceDelete = sourceDelete;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParams#isLinkedClone()
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
public Builder linkedClone(Boolean linkedClone) {
|
||||
super.linkedClone(linkedClone);
|
||||
@Override
|
||||
public Builder sourceDelete() {
|
||||
this.sourceDelete = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder notSourceDelete() {
|
||||
this.sourceDelete = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder isLinkedClone(Boolean linkedClone) {
|
||||
this.linkedClone = linkedClone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder linkedClone() {
|
||||
this.linkedClone = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder notLinkedClone() {
|
||||
this.linkedClone = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
super.description(description);
|
||||
return this;
|
||||
|
@ -80,40 +121,81 @@ public class InstantiateVAppParams
|
|||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
* @see VAppCreationParams#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder vAppParent(Reference vAppParent) {
|
||||
super.vAppParent(vAppParent);
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
* @see VAppCreationParams#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder instantiationParams(InstantiationParams instantiationParams) {
|
||||
super.instantiationParams(instantiationParams);
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
* @see VAppCreationParams#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy(Boolean deploy) {
|
||||
super.deploy(deploy);
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
* @see VAppCreationParams#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParams#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParams#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
super.powerOn(powerOn);
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParams#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParams#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -121,8 +203,7 @@ public class InstantiateVAppParams
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromInstantiateVAppParamsType(
|
||||
InstantiateVAppParamsType<InstantiateVAppParams> in) {
|
||||
public Builder fromInstantiateVAppParamsType(InstantiateVAppParamsType<InstantiateVAppParams> in) {
|
||||
return Builder.class.cast(super.fromVAppCreationParamsType(in));
|
||||
}
|
||||
|
||||
|
@ -131,8 +212,8 @@ public class InstantiateVAppParams
|
|||
}
|
||||
}
|
||||
|
||||
private InstantiateVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
|
||||
public InstantiateVAppParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, ReferenceType<?> source, Boolean sourceDelete, Boolean linkedClone) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
|
||||
}
|
||||
|
||||
|
@ -149,5 +230,4 @@ public class InstantiateVAppParams
|
|||
InstantiateVAppParams that = InstantiateVAppParams.class.cast(o);
|
||||
return super.equals(that);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,54 +16,29 @@
|
|||
* 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.Objects.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
|
||||
/**
|
||||
* Represents vApp instantiation parameters.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for InstantiateVAppParams complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="InstantiateVAppParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}VAppCreationParamsType">
|
||||
* <sequence>
|
||||
* <element name="Source" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType"/>
|
||||
* <element name="IsSourceDelete" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="linkedClone" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="InstantiateVAppParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "InstantiateVAppParams", propOrder = {
|
||||
"source",
|
||||
"isSourceDelete"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
// InstantiateVAppTemplateParamsType.class,
|
||||
// CloneVAppParamsType.class
|
||||
})
|
||||
public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
||||
extends VAppCreationParamsType<T>
|
||||
@XmlType(name = "InstantiateVAppParams")
|
||||
public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>> extends VAppCreationParamsType<T> {
|
||||
|
||||
{
|
||||
public static <T extends InstantiateVAppParamsType<T>> Builder<T> builder() {
|
||||
return new Builder<T>();
|
||||
}
|
||||
|
@ -74,14 +49,14 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
|||
|
||||
public static class Builder<T extends InstantiateVAppParamsType<T>> extends VAppCreationParamsType.Builder<T> {
|
||||
|
||||
protected Reference source;
|
||||
protected Boolean isSourceDelete;
|
||||
protected ReferenceType<?> source;
|
||||
protected Boolean sourceDelete;
|
||||
protected Boolean linkedClone;
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#getSource()
|
||||
*/
|
||||
public Builder<T> source(Reference source) {
|
||||
public Builder<T> source(ReferenceType<?> source) {
|
||||
this.source = source;
|
||||
return this;
|
||||
}
|
||||
|
@ -89,26 +64,60 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
|||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
public Builder<T> isSourceDelete(Boolean isSourceDelete) {
|
||||
this.isSourceDelete = isSourceDelete;
|
||||
public Builder<T> isSourceDelete(Boolean sourceDelete) {
|
||||
this.sourceDelete = sourceDelete;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
public Builder<T> sourceDelete() {
|
||||
this.sourceDelete = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
public Builder<T> notSourceDelete() {
|
||||
this.sourceDelete = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
public Builder<T> linkedClone(Boolean linkedClone) {
|
||||
public Builder<T> isLinkedClone(Boolean linkedClone) {
|
||||
this.linkedClone = linkedClone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
public Builder<T> linkedClone() {
|
||||
this.linkedClone = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
public Builder<T> notLinkedClone() {
|
||||
this.linkedClone = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstantiateVAppParamsType<T> build() {
|
||||
return new InstantiateVAppParamsType<T>(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone);
|
||||
return new InstantiateVAppParamsType<T>(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> description(String description) {
|
||||
super.description(description);
|
||||
return this;
|
||||
|
@ -117,6 +126,7 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
|||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
|
@ -125,39 +135,75 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
|||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> vAppParent(Reference vAppParent) {
|
||||
super.vAppParent(vAppParent);
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> instantiationParams(InstantiationParams instantiationParams) {
|
||||
super.instantiationParams(instantiationParams);
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> deploy(Boolean deploy) {
|
||||
super.deploy(deploy);
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> powerOn(Boolean powerOn) {
|
||||
super.powerOn(powerOn);
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder<T> fromVAppCreationParamsType(VAppCreationParamsType<T> in) {
|
||||
return Builder.class.cast(super.fromVAppCreationParamsType(in));
|
||||
|
@ -167,55 +213,45 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
|||
return fromVAppCreationParamsType(in)
|
||||
.source(in.getSource())
|
||||
.isSourceDelete(in.isSourceDelete())
|
||||
.linkedClone(in.isLinkedClone());
|
||||
.isLinkedClone(in.isLinkedClone());
|
||||
}
|
||||
}
|
||||
|
||||
protected InstantiateVAppParamsType() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
protected InstantiateVAppParamsType(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone) {
|
||||
public InstantiateVAppParamsType(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, ReferenceType<?> source, Boolean sourceDelete, Boolean linkedClone) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn);
|
||||
this.source = source;
|
||||
isSourceDelete = sourceDelete;
|
||||
this.sourceDelete = sourceDelete;
|
||||
this.linkedClone = linkedClone;
|
||||
}
|
||||
|
||||
protected InstantiateVAppParamsType() {
|
||||
// for JAXB
|
||||
}
|
||||
|
||||
|
||||
@XmlElement(name = "Source", required = true)
|
||||
private Reference source;
|
||||
protected ReferenceType<?> source;
|
||||
@XmlElement(name = "IsSourceDelete")
|
||||
private Boolean isSourceDelete;
|
||||
protected Boolean sourceDelete;
|
||||
@XmlAttribute
|
||||
private Boolean linkedClone;
|
||||
protected Boolean linkedClone;
|
||||
|
||||
/**
|
||||
* Gets the value of the source property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Reference }
|
||||
*/
|
||||
public Reference getSource() {
|
||||
public ReferenceType<?> getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the isSourceDelete property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isSourceDelete() {
|
||||
return isSourceDelete;
|
||||
return sourceDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the linkedClone property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isLinkedClone() {
|
||||
return linkedClone;
|
||||
|
@ -228,24 +264,22 @@ public class InstantiateVAppParamsType<T extends InstantiateVAppParamsType<T>>
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
InstantiateVAppParamsType<?> that = InstantiateVAppParamsType.class.cast(o);
|
||||
return equal(source, that.source) &&
|
||||
equal(isSourceDelete, that.isSourceDelete) &&
|
||||
equal(linkedClone, that.linkedClone);
|
||||
return super.equals(that) &&
|
||||
equal(this.source, that.source) &&
|
||||
equal(this.sourceDelete, that.sourceDelete) &&
|
||||
equal(this.linkedClone, that.linkedClone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(source,
|
||||
isSourceDelete,
|
||||
linkedClone);
|
||||
return Objects.hashCode(super.hashCode(), source, sourceDelete, linkedClone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
public ToStringHelper string() {
|
||||
return super.string()
|
||||
.add("source", source)
|
||||
.add("isSourceDelete", isSourceDelete)
|
||||
.add("linkedClone", linkedClone).toString();
|
||||
.add("isSourceDelete", sourceDelete)
|
||||
.add("linkedClone", linkedClone);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,49 +16,34 @@
|
|||
* 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.Objects.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.InstantiateVAppParamsType.Builder;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
||||
/**
|
||||
* Represents vApp template instantiation parameters.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for InstantiateVAppTemplateParams complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="InstantiateVAppTemplateParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}InstantiateVAppParamsType">
|
||||
* <sequence>
|
||||
* <element ref="{http://www.vmware.com/vcloud/v1.5}AllEULAsAccepted" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="InstantiateVAppTemplateParams" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlType(name = "InstantiateVAppTemplateParams", propOrder = {
|
||||
"allEULAsAccepted"
|
||||
})
|
||||
public class InstantiateVAppTemplateParams
|
||||
extends InstantiateVAppParamsType<InstantiateVAppTemplateParams> {
|
||||
@XmlType(name = "InstantiateVAppTemplateParams")
|
||||
public class InstantiateVAppTemplateParams extends InstantiateVAppParamsType<InstantiateVAppTemplateParams> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromInstantiateVAppTemplateParams(this);
|
||||
}
|
||||
|
@ -75,13 +60,78 @@ public class InstantiateVAppTemplateParams
|
|||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InstantiateVAppTemplateParams build() {
|
||||
return new InstantiateVAppTemplateParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, isSourceDelete, linkedClone, allEULAsAccepted);
|
||||
return new InstantiateVAppTemplateParams(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone, allEULAsAccepted);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#getSource()
|
||||
*/
|
||||
@Override
|
||||
public Builder source(ReferenceType<?> source) {
|
||||
this.source = source;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder isSourceDelete(Boolean sourceDelete) {
|
||||
this.sourceDelete = sourceDelete;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder sourceDelete() {
|
||||
this.sourceDelete = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isSourceDelete()
|
||||
*/
|
||||
@Override
|
||||
public Builder notSourceDelete() {
|
||||
this.sourceDelete = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder isLinkedClone(Boolean linkedClone) {
|
||||
this.linkedClone = linkedClone;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder linkedClone() {
|
||||
this.linkedClone = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see InstantiateVAppParamsType#isLinkedClone()
|
||||
*/
|
||||
@Override
|
||||
public Builder notLinkedClone() {
|
||||
this.linkedClone = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
super.description(description);
|
||||
return this;
|
||||
|
@ -90,6 +140,7 @@ public class InstantiateVAppTemplateParams
|
|||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
super.name(name);
|
||||
return this;
|
||||
|
@ -98,32 +149,72 @@ public class InstantiateVAppTemplateParams
|
|||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder vAppParent(Reference vAppParent) {
|
||||
super.vAppParent(vAppParent);
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder instantiationParams(InstantiationParams instantiationParams) {
|
||||
super.instantiationParams(instantiationParams);
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy(Boolean deploy) {
|
||||
super.deploy(deploy);
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
super.powerOn(powerOn);
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -136,18 +227,17 @@ public class InstantiateVAppTemplateParams
|
|||
}
|
||||
|
||||
public Builder fromInstantiateVAppTemplateParams(InstantiateVAppTemplateParams in) {
|
||||
return fromInstantiateVAppParamsType(in)
|
||||
.allEULAsAccepted(in.isAllEULAsAccepted());
|
||||
return fromInstantiateVAppParamsType(in).allEULAsAccepted(in.isAllEULAsAccepted());
|
||||
}
|
||||
}
|
||||
|
||||
public InstantiateVAppTemplateParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams,
|
||||
Boolean deploy, Boolean powerOn, Reference source, Boolean sourceDelete, Boolean linkedClone, Boolean allEULAsAccepted) {
|
||||
Boolean deploy, Boolean powerOn, ReferenceType<?> source, Boolean sourceDelete, Boolean linkedClone, Boolean allEULAsAccepted) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn, source, sourceDelete, linkedClone);
|
||||
this.allEULAsAccepted = allEULAsAccepted;
|
||||
}
|
||||
|
||||
private InstantiateVAppTemplateParams() {
|
||||
protected InstantiateVAppTemplateParams() {
|
||||
// for JAXB
|
||||
}
|
||||
|
||||
|
@ -161,9 +251,6 @@ public class InstantiateVAppTemplateParams
|
|||
* element is missing, empty, or set to false
|
||||
* and one or more EulaSection elements are
|
||||
* present.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isAllEULAsAccepted() {
|
||||
return allEULAsAccepted;
|
||||
|
@ -176,18 +263,16 @@ public class InstantiateVAppTemplateParams
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
InstantiateVAppTemplateParams that = InstantiateVAppTemplateParams.class.cast(o);
|
||||
return equal(allEULAsAccepted, that.allEULAsAccepted);
|
||||
return super.equals(that) && equal(this.allEULAsAccepted, that.allEULAsAccepted);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(allEULAsAccepted);
|
||||
return Objects.hashCode(super.hashCode(), allEULAsAccepted);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("allEULAsAccepted", allEULAsAccepted).toString();
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("allEULAsAccepted", allEULAsAccepted);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,11 +16,10 @@
|
|||
* 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 static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
|
@ -28,42 +27,23 @@ import java.util.Set;
|
|||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.DeploymentOptionSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.DiskSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.ProductSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
* Represents a list of ovf:Section to configure for instantiating a VApp.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for InstantiationParams complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="InstantiationParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
|
||||
* <sequence>
|
||||
* <element ref="{http://schemas.dmtf.org/ovf/envelope/1}Section" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="InstantiationParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "InstantiationParams", propOrder = {
|
||||
"section"
|
||||
})
|
||||
@XmlType(name = "InstantiationParams")
|
||||
public class InstantiationParams {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -73,7 +53,7 @@ public class InstantiationParams {
|
|||
}
|
||||
|
||||
public static class Builder {
|
||||
private Set<? extends SectionType<?>> sections = Sets.newLinkedHashSet();
|
||||
private Set<? extends SectionType<?>> sections = Sets.newLinkedHashSet();
|
||||
|
||||
/**
|
||||
* @see InstantiationParams#getSections()
|
||||
|
@ -83,13 +63,11 @@ public class InstantiationParams {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public InstantiationParams build() {
|
||||
InstantiationParams instantiationParams = new InstantiationParams(sections);
|
||||
return instantiationParams;
|
||||
}
|
||||
|
||||
|
||||
public Builder fromInstantiationParams(InstantiationParams in) {
|
||||
return sections(in.getSections());
|
||||
}
|
||||
|
@ -103,34 +81,33 @@ public class InstantiationParams {
|
|||
this.sections = sections;
|
||||
}
|
||||
|
||||
|
||||
@XmlElementRef
|
||||
protected Set<? extends SectionType<?>> sections = Sets.newLinkedHashSet();
|
||||
|
||||
/**
|
||||
* An ovf:Section to configure for instantiation.
|
||||
* <p/>
|
||||
* Gets the value of the section property.
|
||||
* <p/>
|
||||
* An {@code ovf:Section} to configure for instantiation.
|
||||
*
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link SectionType }
|
||||
* {@link VirtualHardwareSection }
|
||||
* {@link LeaseSettingsSection }
|
||||
* {@link EulaSection }
|
||||
* {@link RuntimeInfoSection }
|
||||
* {@link AnnotationSection }
|
||||
* {@link DeploymentOptionSection }
|
||||
* {@link StartupSection }
|
||||
* {@link ResourceAllocationSection }
|
||||
* {@link NetworkConnectionSection }
|
||||
* {@link CustomizationSection }
|
||||
* {@link ProductSection }
|
||||
* {@link GuestCustomizationSection }
|
||||
* {@link org.jclouds.ovf.OperatingSystemSection }
|
||||
* {@link NetworkConfigSection }
|
||||
* {@link NetworkSection }
|
||||
* {@link DiskSection }
|
||||
* {@link InstallSection }
|
||||
* <ul>
|
||||
* <li>{@link SectionType}
|
||||
* <li>{@link VirtualHardwareSection}
|
||||
* <li>{@link LeaseSettingsSection}
|
||||
* <li>{@link EulaSection}
|
||||
* <li>{@link RuntimeInfoSection}
|
||||
* <li>{@link AnnotationSection}
|
||||
* <li>{@link DeploymentOptionSection}
|
||||
* <li>{@link StartupSection}
|
||||
* <li>{@link ResourceAllocationSection}
|
||||
* <li>{@link NetworkConnectionSection}
|
||||
* <li>{@link CustomizationSection}
|
||||
* <li>{@link ProductSection}
|
||||
* <li>{@link GuestCustomizationSection}
|
||||
* <li>{@link OperatingSystemSection}
|
||||
* <li>{@link NetworkConfigSection}
|
||||
* <li>{@link NetworkSection}
|
||||
* <li>{@link DiskSection}
|
||||
* <li>{@link InstallSection}
|
||||
* </ul>
|
||||
*/
|
||||
public Set<? extends SectionType<?>> getSections() {
|
||||
return Collections.unmodifiableSet(this.sections);
|
||||
|
@ -153,8 +130,6 @@ public class InstantiationParams {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("sections", sections).toString();
|
||||
return Objects.toStringHelper("").add("sections", sections).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ public class LeaseSettingsSection extends SectionType<LeaseSettingsSection> {
|
|||
}
|
||||
|
||||
public Builder fromLeaseSettingsSection(LeaseSettingsSection in) {
|
||||
return fromSection(in)
|
||||
return fromSectionType(in)
|
||||
.links(in.getLinks())
|
||||
.deploymentLeaseInSeconds(in.getDeploymentLeaseInSeconds())
|
||||
.storageLeaseInSeconds(in.getStorageLeaseInSeconds())
|
||||
|
@ -173,8 +173,8 @@ public class LeaseSettingsSection extends SectionType<LeaseSettingsSection> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<LeaseSettingsSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<LeaseSettingsSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -45,31 +45,80 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
public class Link extends ReferenceType<Link> {
|
||||
|
||||
public static final class Rel {
|
||||
public static final String UP = "up";
|
||||
public static final String DOWN = "down";
|
||||
public static final String EDIT = "edit";
|
||||
public static final String ADD = "add";
|
||||
public static final String DELETE = "delete";
|
||||
public static final String REMOVE = "remove";
|
||||
public static final String CATALOG_ITEM = "catalogItem";
|
||||
public static final String TASK_CANCEL = "task:cancel";
|
||||
public static final String ALTERNATE = "alternate";
|
||||
public static final String NEXT_PAGE = "nextPage";
|
||||
public static final String PREVIOUS_PAGE = "previousPage";
|
||||
public static final String LAST_PAGE = "lastPage";
|
||||
public static final String FIRST_PAGE = "firstPage";
|
||||
public static final String CATALOG_ITEM = "catalogItem";
|
||||
public static final String COLLABORATION_ABORT = "collaboration:abort";
|
||||
public static final String COLLABORATION_FAIL = "collaboration:fail";
|
||||
public static final String COLLABORATION_RESUME = "collaboration:resume";
|
||||
public static final String CONSOLIDATE = "consolidate";
|
||||
public static final String CONTROL_ACCESS = "controlAccess";
|
||||
public static final String COPY = "copy";
|
||||
public static final String DEPLOY = "deploy";
|
||||
public static final String DISABLE = "disable";
|
||||
public static final String DISCARD_STATE = "discardState";
|
||||
public static final String DOWN = "down";
|
||||
public static final String DOWNLOAD_ALTERNATE = "download:alternate";
|
||||
public static final String DOWNLOAD_DEFAULT = "download:default";
|
||||
public static final String EDIT = "edit";
|
||||
public static final String ENABLE = "enable";
|
||||
public static final String FIRST_PAGE = "firstPage";
|
||||
public static final String INSTALL_VMWARE_TOOLS = "installVmwareTools";
|
||||
public static final String LAST_PAGE = "lastPage";
|
||||
public static final String EJECT_MEDIA = "media:ejectMedia";
|
||||
public static final String INSERT_MEDIA = "media:insertMedia";
|
||||
public static final String MOVE = "move";
|
||||
public static final String NEXT_PAGE = "nextPage";
|
||||
public static final String OVA = "ova";
|
||||
public static final String OVF = "ovf";
|
||||
public static final String POWER_OFF = "power:powerOff";
|
||||
public static final String POWER_ON = "power:powerOn";
|
||||
public static final String REBOOT = "power:reboot";
|
||||
public static final String RESET = "power:reset";
|
||||
public static final String SHUTDOWN = "power:shutdown";
|
||||
public static final String SUSPEND = "power:suspend";
|
||||
public static final String PREVIOUS_PAGE = "previousPage";
|
||||
public static final String PUBLISH = "publish";
|
||||
public static final String RECOMPOSE = "recompose";
|
||||
public static final String RECONNECT = "reconnect";
|
||||
public static final String REGISTER = "register";
|
||||
public static final String REJECT = "reject";
|
||||
public static final String RELOCATE = "relocate";
|
||||
public static final String REMOVE = "remove";
|
||||
public static final String REPAIR = "repair";
|
||||
public static final String SCREEN_ACQUIRE_TICKET = "screen:acquireTicket";
|
||||
public static final String SCREEN_THUMBNAIL = "screen:thumbnail";
|
||||
public static final String TASK_CANCEL = "task:cancel";
|
||||
public static final String BLOCKING_TASK = "blockingTask";
|
||||
public static final String TASK_OWNER = "taskOwner";
|
||||
public static final String TASK_PARAMS = "taskParams";
|
||||
public static final String TASK_REQUEST = "taskRequest";
|
||||
public static final String UNDEPLOY = "undeploy";
|
||||
public static final String UNLOCK = "unlock";
|
||||
public static final String UNREGISTER = "unregister";
|
||||
public static final String UP = "up";
|
||||
public static final String UPDATE_PROGRESS = "updateProgress";
|
||||
public static final String UPGRADE = "upgrade";
|
||||
public static final String UPLOAD_ALTERNATE = "upload:alternate";
|
||||
public static final String UPLOAD_DEFAULT = "upload:default";
|
||||
|
||||
/**
|
||||
* All acceptable {@link Link#getRel()} values.
|
||||
* <p/>
|
||||
*
|
||||
* This list must be updated whenever a new relationship is added.
|
||||
*/
|
||||
public static final List<String> ALL = Arrays.asList(
|
||||
UP, DOWN, EDIT, ADD, DELETE, REMOVE, CATALOG_ITEM, TASK_CANCEL,
|
||||
ALTERNATE, NEXT_PAGE, PREVIOUS_PAGE, LAST_PAGE, FIRST_PAGE,
|
||||
CONTROL_ACCESS, UPLOAD_DEFAULT
|
||||
ADD, ALTERNATE, CATALOG_ITEM, COLLABORATION_ABORT,
|
||||
COLLABORATION_FAIL, COLLABORATION_RESUME, CONSOLIDATE,
|
||||
CONTROL_ACCESS, COPY, DEPLOY, DISABLE, DISCARD_STATE, DOWN,
|
||||
DOWNLOAD_ALTERNATE, DOWNLOAD_DEFAULT, EDIT, ENABLE, FIRST_PAGE,
|
||||
INSTALL_VMWARE_TOOLS, LAST_PAGE, EJECT_MEDIA, INSERT_MEDIA, MOVE,
|
||||
NEXT_PAGE, OVA, OVF, POWER_OFF, POWER_ON, REBOOT, RESET, SHUTDOWN,
|
||||
SUSPEND, PREVIOUS_PAGE, PUBLISH, RECOMPOSE, RECONNECT, REGISTER,
|
||||
REJECT, RELOCATE, REMOVE, REPAIR, SCREEN_ACQUIRE_TICKET,
|
||||
SCREEN_THUMBNAIL, TASK_CANCEL, BLOCKING_TASK, TASK_OWNER,
|
||||
TASK_PARAMS, TASK_REQUEST, UNDEPLOY, UNLOCK, UNREGISTER, UP,
|
||||
UPDATE_PROGRESS, UPGRADE, UPLOAD_ALTERNATE, UPLOAD_DEFAULT
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -198,7 +247,7 @@ public class Link extends ReferenceType<Link> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(rel);
|
||||
return Objects.hashCode(super.hashCode(), rel);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -258,7 +258,7 @@ public class Media extends ResourceEntityType<Media> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(owner, imageType, size);
|
||||
return Objects.hashCode(super.hashCode(), owner, imageType, size);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* 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.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* Represents parameters for inserting/ejecting media to VM.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="MediaInsertOrEjectParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "MediaInsertOrEjectParams")
|
||||
public class MediaInsertOrEjectParams {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromMediaInsertOrEjectParams(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private Reference media;
|
||||
|
||||
/**
|
||||
* @see MediaInsertOrEjectParams#getMedia()
|
||||
*/
|
||||
public Builder media(Reference media) {
|
||||
this.media = media;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MediaInsertOrEjectParams build() {
|
||||
MediaInsertOrEjectParams mediaInsertOrEjectParams = new MediaInsertOrEjectParams(media);
|
||||
return mediaInsertOrEjectParams;
|
||||
}
|
||||
|
||||
public Builder fromMediaInsertOrEjectParams(MediaInsertOrEjectParams in) {
|
||||
return media(in.getMedia());
|
||||
}
|
||||
}
|
||||
|
||||
protected MediaInsertOrEjectParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public MediaInsertOrEjectParams(Reference media) {
|
||||
this.media = media;
|
||||
}
|
||||
|
||||
@XmlElement(name = "Media", required = true)
|
||||
protected Reference media;
|
||||
|
||||
/**
|
||||
* Gets the value of the media property.
|
||||
*/
|
||||
public Reference getMedia() {
|
||||
return media;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
MediaInsertOrEjectParams that = MediaInsertOrEjectParams.class.cast(o);
|
||||
return equal(media, that.media);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(media);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("media", media).toString();
|
||||
}
|
||||
}
|
|
@ -161,7 +161,7 @@ public class Metadata extends ResourceType<Metadata> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(metadataEntries);
|
||||
return Objects.hashCode(super.hashCode(), metadataEntries);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -181,7 +181,7 @@ public class MetadataEntry extends ResourceType<MetadataEntry> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(key, value);
|
||||
return Objects.hashCode(super.hashCode(), key, value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -153,7 +153,7 @@ public class MetadataValue extends ResourceType<MetadataValue> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(value);
|
||||
return Objects.hashCode(super.hashCode(), value);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
|
@ -30,7 +30,6 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
|
@ -39,42 +38,21 @@ import com.google.common.base.Objects;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
* Represents the network config section of a vApp.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for NetworkConfigSection complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="NetworkConfigSection">
|
||||
* <complexContent>
|
||||
* <extension base="{http://schemas.dmtf.org/ovf/envelope/1}Section_Type">
|
||||
* <sequence>
|
||||
* <element name="Link" type="{http://www.vmware.com/vcloud/v1.5}LinkType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="NetworkConfig" type="{http://www.vmware.com/vcloud/v1.5}VAppNetworkConfigurationType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="NetworkConfigSection" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlRootElement(name = "NetworkConfigSection")
|
||||
@XmlType(propOrder = {
|
||||
"links",
|
||||
"networkConfigs"
|
||||
})
|
||||
public class NetworkConfigSection extends SectionType<NetworkConfigSection> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromNetworkConfigSection(this);
|
||||
}
|
||||
|
@ -119,12 +97,13 @@ public class NetworkConfigSection extends SectionType<NetworkConfigSection> {
|
|||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NetworkConfigSection build() {
|
||||
return new NetworkConfigSection(info, required, links, networkConfigs, href, type);
|
||||
}
|
||||
|
||||
public Builder fromNetworkConfigSection(NetworkConfigSection in) {
|
||||
return fromSection(in)
|
||||
return fromSectionType(in)
|
||||
.links(in.getLinks())
|
||||
.networkConfigs(in.getNetworkConfigs())
|
||||
.href(in.getHref())
|
||||
|
@ -135,8 +114,8 @@ public class NetworkConfigSection extends SectionType<NetworkConfigSection> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<NetworkConfigSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<NetworkConfigSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -176,7 +155,7 @@ public class NetworkConfigSection extends SectionType<NetworkConfigSection> {
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
private NetworkConfigSection() {
|
||||
protected NetworkConfigSection() {
|
||||
// For JAXB
|
||||
}
|
||||
|
||||
|
@ -203,9 +182,6 @@ public class NetworkConfigSection extends SectionType<NetworkConfigSection> {
|
|||
|
||||
/**
|
||||
* Gets the value of the type property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getType() {
|
||||
return type;
|
||||
|
@ -218,29 +194,17 @@ public class NetworkConfigSection extends SectionType<NetworkConfigSection> {
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
NetworkConfigSection that = NetworkConfigSection.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(links, that.links) &&
|
||||
equal(networkConfigs, that.networkConfigs) &&
|
||||
equal(href, that.href) &&
|
||||
equal(type, that.type);
|
||||
return super.equals(that) && equal(links, that.links) && equal(networkConfigs, that.networkConfigs) && equal(href, that.href) && equal(type, that.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(),
|
||||
links,
|
||||
networkConfigs,
|
||||
href,
|
||||
type);
|
||||
return Objects.hashCode(super.hashCode(), links, networkConfigs, href, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Objects.ToStringHelper string() {
|
||||
return super.string()
|
||||
.add("links", links)
|
||||
.add("networkConfigs", networkConfigs)
|
||||
.add("href", href)
|
||||
.add("type", type);
|
||||
return super.string().add("links", links).add("networkConfigs", networkConfigs).add("href", href).add("type", type);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,7 +16,6 @@
|
|||
* 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;
|
||||
|
@ -39,39 +38,14 @@ import com.google.common.base.Objects;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
* Represents a list of network cards existing in a VM.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for NetworkConnectionSection complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="NetworkConnectionSection">
|
||||
* <complexContent>
|
||||
* <extension base="{http://schemas.dmtf.org/ovf/envelope/1}Section_Type">
|
||||
* <sequence>
|
||||
* <element name="PrimaryNetworkConnectionIndex" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
|
||||
* <element name="NetworkConnection" type="{http://www.vmware.com/vcloud/v1.5}NetworkConnectionType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="Link" type="{http://www.vmware.com/vcloud/v1.5}LinkType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="NetworkConnectionSection" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlRootElement(name = "NetworkConnectionSection")
|
||||
@XmlType(propOrder = {
|
||||
"primaryNetworkConnectionIndex",
|
||||
"networkConnections",
|
||||
"links"
|
||||
})
|
||||
public class NetworkConnectionSection extends SectionType<NetworkConnectionSection> {
|
||||
|
||||
public static Builder builder() {
|
||||
|
@ -130,27 +104,22 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public NetworkConnectionSection build() {
|
||||
return new NetworkConnectionSection(info, required, primaryNetworkConnectionIndex, networkConnections, links, href, type);
|
||||
|
||||
}
|
||||
|
||||
public Builder fromNetworkConnectionSection(NetworkConnectionSection in) {
|
||||
return fromSection(in)
|
||||
.primaryNetworkConnectionIndex(in.getPrimaryNetworkConnectionIndex())
|
||||
.networkConnections(in.getNetworkConnections())
|
||||
.links(in.getLinks())
|
||||
.href(in.getHref())
|
||||
.type(in.getType());
|
||||
return fromSectionType(in).primaryNetworkConnectionIndex(in.getPrimaryNetworkConnectionIndex()).networkConnections(in.getNetworkConnections()).links(in.getLinks()).href(in.getHref()).type(
|
||||
in.getType());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<NetworkConnectionSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<NetworkConnectionSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -171,8 +140,8 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
|
||||
}
|
||||
|
||||
private NetworkConnectionSection(@Nullable String info, @Nullable Boolean required, Integer primaryNetworkConnectionIndex,
|
||||
Set<NetworkConnection> networkConnections, Set<Link> links, URI href, String type) {
|
||||
private NetworkConnectionSection(@Nullable String info, @Nullable Boolean required, Integer primaryNetworkConnectionIndex, Set<NetworkConnection> networkConnections, Set<Link> links, URI href,
|
||||
String type) {
|
||||
super(info, required);
|
||||
this.primaryNetworkConnectionIndex = primaryNetworkConnectionIndex;
|
||||
this.networkConnections = ImmutableSet.copyOf(networkConnections);
|
||||
|
@ -199,9 +168,8 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
|
||||
/**
|
||||
* Gets the value of the primaryNetworkConnectionIndex property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Integer }
|
||||
*
|
||||
* @return possible object is {@link Integer }
|
||||
*/
|
||||
public Integer getPrimaryNetworkConnectionIndex() {
|
||||
return primaryNetworkConnectionIndex;
|
||||
|
@ -210,8 +178,7 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
/**
|
||||
* Gets the value of the networkConnection property.
|
||||
* <p/>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link NetworkConnection }
|
||||
* Objects of the following type(s) are allowed in the list {@link NetworkConnection }
|
||||
*/
|
||||
public Set<NetworkConnection> getNetworkConnections() {
|
||||
return Collections.unmodifiableSet(this.networkConnections);
|
||||
|
@ -220,8 +187,7 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
/**
|
||||
* Gets the value of the link property.
|
||||
* <p/>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Link }
|
||||
* Objects of the following type(s) are allowed in the list {@link Link }
|
||||
*/
|
||||
public Set<Link> getLinks() {
|
||||
return Collections.unmodifiableSet(this.links);
|
||||
|
@ -236,9 +202,8 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
|
||||
/**
|
||||
* Gets the value of the type property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
* @return possible object is {@link String }
|
||||
*/
|
||||
public String getType() {
|
||||
return type;
|
||||
|
@ -253,30 +218,17 @@ public class NetworkConnectionSection extends SectionType<NetworkConnectionSecti
|
|||
NetworkConnectionSection that = NetworkConnectionSection.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(primaryNetworkConnectionIndex, that.primaryNetworkConnectionIndex) &&
|
||||
equal(networkConnections, that.networkConnections) &&
|
||||
equal(links, that.links) &&
|
||||
equal(href, that.href) &&
|
||||
equal(type, that.type);
|
||||
equal(networkConnections, that.networkConnections) && equal(links, that.links) &&
|
||||
equal(href, that.href) && equal(type, that.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(),
|
||||
primaryNetworkConnectionIndex,
|
||||
networkConnections,
|
||||
links,
|
||||
href,
|
||||
type);
|
||||
return Objects.hashCode(super.hashCode(), primaryNetworkConnectionIndex, networkConnections, links, href, type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Objects.ToStringHelper string() {
|
||||
return super.string()
|
||||
.add("primaryNetworkConnectionIndex", primaryNetworkConnectionIndex)
|
||||
.add("networkConnection", networkConnections)
|
||||
.add("links", links)
|
||||
.add("href", href)
|
||||
.add("type", type);
|
||||
return super.string().add("primaryNetworkConnectionIndex", primaryNetworkConnectionIndex).add("networkConnection", networkConnections).add("links", links).add("href", href).add("type", type);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ public class NetworkType<T extends NetworkType<T>> extends EntityType<T> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(networkConfiguration);
|
||||
return Objects.hashCode(super.hashCode(), networkConfiguration);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
@ -34,10 +35,10 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* iRepresents an organization.
|
||||
* <p/>
|
||||
* Represents an organization.
|
||||
*
|
||||
* Unit of multi-tenancy and a top-level container. Contain vDCs, TasksList, Catalogs and Shared Network entities.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <xs:complexType name="OrgType">
|
||||
* </pre>
|
||||
|
@ -53,6 +54,7 @@ public class Org extends EntityType<Org> {
|
|||
return new ConcreteBuilder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewBuilder<?> toNewBuilder() {
|
||||
return new ConcreteBuilder().fromOrg(this);
|
||||
}
|
||||
|
@ -172,18 +174,30 @@ public class Org extends EntityType<Org> {
|
|||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
super.tasks(tasks);
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getHref()
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
|
@ -192,7 +206,7 @@ public class Org extends EntityType<Org> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getType()
|
||||
* @see ResourceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
|
@ -201,19 +215,22 @@ public class Org extends EntityType<Org> {
|
|||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
@ -232,12 +249,12 @@ public class Org extends EntityType<Org> {
|
|||
// for JAXB
|
||||
}
|
||||
|
||||
public Org(URI href, String type, Set<Link> links, String description,
|
||||
Set<Task> tasksInProgress, String id, String name,
|
||||
public Org(URI href, String type, @Nullable Set<Link> links, String description,
|
||||
@Nullable Set<Task> tasks, String id, String name,
|
||||
String fullName, Boolean enabled) {
|
||||
super(href, type, links, description, tasksInProgress, id, name);
|
||||
super(href, type, links, description, tasks, id, name);
|
||||
this.fullName = fullName;
|
||||
isEnabled = enabled;
|
||||
this.isEnabled = enabled;
|
||||
}
|
||||
|
||||
@XmlElement(name = "FullName", required = true)
|
||||
|
@ -253,7 +270,7 @@ public class Org extends EntityType<Org> {
|
|||
}
|
||||
|
||||
/**
|
||||
* Full name of the organization.
|
||||
* Is the organization enabled.
|
||||
*/
|
||||
public Boolean isEnabled() {
|
||||
return isEnabled;
|
||||
|
@ -271,7 +288,7 @@ public class Org extends EntityType<Org> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(fullName, isEnabled);
|
||||
return Objects.hashCode(super.hashCode(), fullName, isEnabled);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,6 +72,7 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
/**
|
||||
* @see NetworkType#getConfiguration()
|
||||
*/
|
||||
@Override
|
||||
public Builder configuration(NetworkConfiguration networkConfiguration) {
|
||||
this.networkConfiguration = networkConfiguration;
|
||||
return this;
|
||||
|
@ -150,12 +151,12 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Builder fromEntityType(EntityType<OrgNetwork> in) {
|
||||
public Builder fromNetworkType(NetworkType<OrgNetwork> in) {
|
||||
return Builder.class.cast(super.fromEntityType(in));
|
||||
}
|
||||
|
||||
public Builder fromOrgNetwork(OrgNetwork in) {
|
||||
return fromEntityType(in).configuration(in.getConfiguration())
|
||||
return fromNetworkType(in).configuration(in.getConfiguration())
|
||||
.networkPool(in.getNetworkPool())
|
||||
.allowedExternalIpAddresses(in.getAllowedExternalIpAddresses());
|
||||
}
|
||||
|
@ -202,7 +203,7 @@ public class OrgNetwork extends NetworkType<OrgNetwork> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(networkPool, allowedExternalIpAddresses);
|
||||
return Objects.hashCode(super.hashCode(), networkPool, allowedExternalIpAddresses);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,28 +35,11 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
|
||||
|
||||
/**
|
||||
* 1.5
|
||||
*
|
||||
* <p>Java class for OrgPasswordPolicySettings complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* Java class for OrgPasswordPolicySettings complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="OrgPasswordPolicySettings">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}ResourceType">
|
||||
* <sequence>
|
||||
* <element name="AccountLockoutEnabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
|
||||
* <element name="InvalidLoginsBeforeLockout" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||
* <element name="AccountLockoutIntervalMinutes" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="OrgPasswordPolicySettings" />
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlRootElement(name = "OrgPasswordPolicySettings")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,62 +16,29 @@
|
|||
* 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.Objects.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
||||
/**
|
||||
* A basic type used to specify parameters for operations.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for Params complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="Params">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
|
||||
* <sequence>
|
||||
* <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="Params" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlType(name = "Params", propOrder = {
|
||||
"description"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
// CaptureVAppParams.class, // FIXME!
|
||||
CloneVAppTemplateParams.class,
|
||||
CloneMediaParams.class,
|
||||
UploadVAppTemplateParams.class
|
||||
//, ImportVmAsVAppTemplateParams.class,
|
||||
// ImportMediaParams.class,
|
||||
// UpdateResourcePoolSetParams.class,
|
||||
// VAppCreationParams.class
|
||||
})
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "Params")
|
||||
public class ParamsType<T extends ParamsType<T>> {
|
||||
public static <T extends ParamsType<T>> Builder<T> builder() {
|
||||
return new Builder<T>();
|
||||
}
|
||||
|
||||
public Builder<T> toBuilder() {
|
||||
return new Builder<T>().fromParamsType(this);
|
||||
}
|
||||
|
||||
public static class Builder<T extends ParamsType<T>> {
|
||||
|
||||
|
@ -94,7 +61,6 @@ public class ParamsType<T extends ParamsType<T>> {
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
public ParamsType<T> build() {
|
||||
return new ParamsType<T>(description, name);
|
||||
}
|
||||
|
@ -105,7 +71,7 @@ public class ParamsType<T extends ParamsType<T>> {
|
|||
}
|
||||
}
|
||||
|
||||
protected ParamsType(String description, String name) {
|
||||
public ParamsType(String description, String name) {
|
||||
this.description = description;
|
||||
this.name = name;
|
||||
}
|
||||
|
@ -122,9 +88,6 @@ public class ParamsType<T extends ParamsType<T>> {
|
|||
|
||||
/**
|
||||
* Gets the value of the description property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
|
@ -132,9 +95,6 @@ public class ParamsType<T extends ParamsType<T>> {
|
|||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
|
@ -147,21 +107,20 @@ public class ParamsType<T extends ParamsType<T>> {
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
ParamsType<?> that = ParamsType.class.cast(o);
|
||||
return equal(description, that.description) &&
|
||||
equal(name, that.name);
|
||||
return equal(this.description, that.description) && equal(this.name, that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(description,
|
||||
name);
|
||||
return Objects.hashCode(description, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("description", description)
|
||||
.add("name", name).toString();
|
||||
return string().toString();
|
||||
}
|
||||
|
||||
public ToStringHelper string() {
|
||||
return Objects.toStringHelper("").add("description", description).add("name", name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
* 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.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.RASD;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a list of RASD items.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="RasdItemsList" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "RasdItemsList")
|
||||
public class RasdItemsList extends ResourceType<RasdItemsList> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromRasdItemsList(this);
|
||||
}
|
||||
|
||||
public static class Builder extends ResourceType.Builder<RasdItemsList> {
|
||||
|
||||
private List<RASD> items = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see RasdItemsList#getItems()
|
||||
*/
|
||||
public Builder items(List<RASD> items) {
|
||||
this.items = checkNotNull(items, "items");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see RasdItemsList#getItems()
|
||||
*/
|
||||
public Builder item(RASD item) {
|
||||
this.items.add(checkNotNull(item, "item"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RasdItemsList build() {
|
||||
RasdItemsList rasdItemsList = new RasdItemsList(href, type, links, items);
|
||||
return rasdItemsList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
super.href(href);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
super.type(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
super.links(Sets.newLinkedHashSet(checkNotNull(links, "links")));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromResourceType(ResourceType<RasdItemsList> in) {
|
||||
return Builder.class.cast(super.fromResourceType(in));
|
||||
}
|
||||
|
||||
public Builder fromRasdItemsList(RasdItemsList in) {
|
||||
return fromResourceType(in).items(in.getItems());
|
||||
}
|
||||
}
|
||||
|
||||
protected RasdItemsList() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public RasdItemsList(URI href, String type, Set<Link> links, List<RASD> items) {
|
||||
super(href, type, links);
|
||||
this.items = items;
|
||||
}
|
||||
|
||||
@XmlElement(name = "Item")
|
||||
protected List<RASD> items = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* A RASD item content.
|
||||
*/
|
||||
public List<RASD> getItems() {
|
||||
return items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
RasdItemsList that = RasdItemsList.class.cast(o);
|
||||
return super.equals(that) && equal(this.items, that.items);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), items);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("items", items);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
/**
|
||||
* 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 java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents vApp re-composition parameters.
|
||||
*
|
||||
*
|
||||
* <p>Java class for RecomposeVAppParams complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="RecomposeVAppParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}ComposeVAppParamsType">
|
||||
* <sequence>
|
||||
* <element name="CreateItem" type="{http://www.vmware.com/vcloud/v1.5}VmType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="DeleteItem" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "RecomposeVAppParams", propOrder = {
|
||||
"createItem",
|
||||
"deleteItem"
|
||||
})
|
||||
public class RecomposeVAppParams
|
||||
extends ComposeVAppParamsType<RecomposeVAppParams>
|
||||
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromRecomposeVAppParams(this);
|
||||
}
|
||||
|
||||
public static class Builder extends ComposeVAppParamsType.Builder<RecomposeVAppParams> {
|
||||
|
||||
private List<Vm> createItem;
|
||||
private List<Reference> deleteItem;
|
||||
|
||||
/**
|
||||
* @see RecomposeVAppParams#getCreateItem()
|
||||
*/
|
||||
public Builder createItem(List<Vm> createItem) {
|
||||
this.createItem = createItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see RecomposeVAppParams#getDeleteItem()
|
||||
*/
|
||||
public Builder deleteItem(List<Reference> deleteItem) {
|
||||
this.deleteItem = deleteItem;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public RecomposeVAppParams build() {
|
||||
RecomposeVAppParams recomposeVAppParams = new RecomposeVAppParams(createItem, deleteItem);
|
||||
return recomposeVAppParams;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Builder fromComposeVAppParamsType(ComposeVAppParamsType<RecomposeVAppParams> in) {
|
||||
return Builder.class.cast(super.fromComposeVAppParamsType(in));
|
||||
}
|
||||
public Builder fromRecomposeVAppParams(RecomposeVAppParams in) {
|
||||
return fromComposeVAppParamsType(in)
|
||||
.createItem(in.getCreateItem())
|
||||
.deleteItem(in.getDeleteItem());
|
||||
}
|
||||
}
|
||||
|
||||
private RecomposeVAppParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
private RecomposeVAppParams(List<Vm> createItem, List<Reference> deleteItem) {
|
||||
this.createItem = createItem;
|
||||
this.deleteItem = deleteItem;
|
||||
}
|
||||
|
||||
|
||||
@XmlElement(name = "CreateItem")
|
||||
protected List<Vm> createItem;
|
||||
@XmlElement(name = "DeleteItem")
|
||||
protected List<Reference> deleteItem;
|
||||
|
||||
/**
|
||||
* Gets the value of the createItem property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the createItem property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getCreateItem().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link VmType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<Vm> getCreateItem() {
|
||||
if (createItem == null) {
|
||||
createItem = new ArrayList<Vm>();
|
||||
}
|
||||
return this.createItem;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the deleteItem property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the deleteItem property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getDeleteItem().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<Reference> getDeleteItem() {
|
||||
if (deleteItem == null) {
|
||||
deleteItem = new ArrayList<Reference>();
|
||||
}
|
||||
return this.deleteItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
RecomposeVAppParams that = RecomposeVAppParams.class.cast(o);
|
||||
return equal(createItem, that.createItem) &&
|
||||
equal(deleteItem, that.deleteItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(createItem,
|
||||
deleteItem);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("createItem", createItem)
|
||||
.add("deleteItem", deleteItem).toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -31,9 +31,9 @@ import com.google.common.base.Objects.ToStringHelper;
|
|||
|
||||
/**
|
||||
* A reference to a resource.
|
||||
* <p/>
|
||||
*
|
||||
* Contains an href attribute and optional name and type attributes.
|
||||
* <p/>
|
||||
* <p>
|
||||
* <pre>
|
||||
* <xs:complexType name="ReferenceType">
|
||||
* </pre>
|
||||
|
|
|
@ -35,29 +35,16 @@ import com.google.common.collect.Sets;
|
|||
|
||||
/**
|
||||
* Represents a list of references to resource entities.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for ResourceEntities complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ResourceEntities">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
|
||||
* <sequence>
|
||||
* <element name="ResourceEntity" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="ResourceEntities" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "ResourceEntities", propOrder = {
|
||||
"resourceEntities"
|
||||
})
|
||||
@XmlType(name = "ResourceEntities")
|
||||
public class ResourceEntities {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
|
|
@ -19,29 +19,108 @@
|
|||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Objects.equal;
|
||||
import static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Arrays;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.VCloudDirectorRuntimeException;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AbstractVAppType.Builder;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Base type that represents a resource entity such as a vApp template or virtual media.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ResourceEntity" >
|
||||
* <complexType name="ResourceEntity" />
|
||||
* </pre>
|
||||
*
|
||||
* @author danikov
|
||||
* @author Adam Lowe
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extends EntityType<T> {
|
||||
|
||||
public static enum Status {
|
||||
|
||||
FAILED_CREATION(-1, "The object could not be created.", true, true, true),
|
||||
UNRESOLVED(0, "The object is unresolved.", true, true, true),
|
||||
RESOLVED(1, "The object is resolved.", true, true, true),
|
||||
DEPLOYED(2, "The object is deployed.", false, false, false),
|
||||
SUSPENDED(3, "The object is suspended.", false, true, true),
|
||||
POWERED_ON(4, "The object is powered on.", false, true, true),
|
||||
WAITING_FOR_INPUT(5, "The object is waiting for user input.", false, true, true),
|
||||
UNKNOWN(6, "The object is in an unknown state.", true, true, true),
|
||||
UNRECOGNIZED(7, "The object is in an unrecognized state.", true, true, true),
|
||||
POWERED_OFF(8, "The object is powered off.", true, true, true),
|
||||
INCONSISTENT_STATE(9, "The object is in an inconsistent state.", false, true, true),
|
||||
MIXED(10, "Children do not all have the same status.", true, true, false),
|
||||
UPLOAD_OVF_PENDING(11, "Upload initiated, OVF descriptor pending.", true, false, false),
|
||||
UPLOAD_COPYING(12, "Upload initiated, copying contents.", true, false, false),
|
||||
UPLOAD_DISK_PENDING(13, "Upload initiated , disk contents pending.", true, false, false),
|
||||
UPLOAD_QUARANTINED(14, "Upload has been quarantined.", true, false, false),
|
||||
UPLOAD_QUARANTINE_EXPIRED(15, "Upload quarantine period has expired.", true, false, false);
|
||||
|
||||
private Integer value;
|
||||
private String description;
|
||||
private boolean vAppTemplate;
|
||||
private boolean vApp;
|
||||
private boolean vm;
|
||||
|
||||
private Status(int value, String description, boolean vAppTemplate, boolean vApp, boolean vm) {
|
||||
this.value = value;
|
||||
this.description = description;
|
||||
this.vAppTemplate = vAppTemplate;
|
||||
this.vApp = vApp;
|
||||
this.vm = vm;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public boolean isVAppTemplate() {
|
||||
return vAppTemplate;
|
||||
}
|
||||
|
||||
public boolean isVApp() {
|
||||
return vApp;
|
||||
}
|
||||
|
||||
public boolean isVm() {
|
||||
return vm;
|
||||
}
|
||||
|
||||
public static Status fromValue(final int value) {
|
||||
Optional<Status> found = Iterables.tryFind(Arrays.asList(values()), new Predicate<Status>() {
|
||||
@Override
|
||||
public boolean apply(Status status) {
|
||||
return status.getValue() == value;
|
||||
}
|
||||
});
|
||||
if (found.isPresent()) {
|
||||
return found.get();
|
||||
} else {
|
||||
throw new VCloudDirectorRuntimeException(String.format("Illegal status value '%d'", value));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends ResourceEntityType<T>> extends EntityType.Builder<T> {
|
||||
protected FilesList files;
|
||||
protected Integer status;
|
||||
|
@ -99,29 +178,33 @@ public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extend
|
|||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getLinks()
|
||||
* @see EntityType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
super.links(links);
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getLinks()
|
||||
* @see EntityType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> link(Link link) {
|
||||
super.link(link);
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> fromResourceType(ResourceType<T> in) {
|
||||
return Builder.class.cast(super.fromResourceType(in));
|
||||
public Builder<T> fromEntityType(EntityType<T> in) {
|
||||
return Builder.class.cast(super.fromEntityType(in));
|
||||
}
|
||||
|
||||
public Builder<T> fromResourceEntityType(ResourceEntityType<T> in) {
|
||||
return fromResourceType(in).files(in.getFiles()).status(in.getStatus());
|
||||
return fromEntityType(in).files(in.getFiles()).status(in.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -177,7 +260,7 @@ public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extend
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(files, status);
|
||||
return Objects.hashCode(super.hashCode(), files, status);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,6 +29,7 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.AbstractVAppType.Builder;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
@ -37,7 +38,7 @@ import com.google.common.collect.Sets;
|
|||
|
||||
/**
|
||||
* The base type for all objects in the vCloud model.
|
||||
* <p/>
|
||||
*
|
||||
* Has an optional list of links and href and type attributes.
|
||||
* <p/>
|
||||
* <pre>
|
||||
|
@ -128,7 +129,8 @@ public abstract class ResourceType<T extends ResourceType<T>> {
|
|||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
public Builder<T> links(Set<Link> links) {
|
||||
this.links = Sets.newLinkedHashSet(checkNotNull(links, "links"));
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -156,11 +158,11 @@ public abstract class ResourceType<T extends ResourceType<T>> {
|
|||
@XmlElement(name = "Link")
|
||||
private Set<Link> links;
|
||||
|
||||
protected ResourceType(URI href, String type, @Nullable Set<Link> links) {
|
||||
public ResourceType(URI href, String type, @Nullable Set<Link> links) {
|
||||
this.href = href;
|
||||
this.type = type;
|
||||
// nullable so that jaxb wont persist empty collections
|
||||
this.links = links != null && links.size() == 0 ? null : links;
|
||||
this.links = links != null && links.isEmpty() ? null : links;
|
||||
}
|
||||
|
||||
protected ResourceType() {
|
||||
|
@ -169,7 +171,7 @@ public abstract class ResourceType<T extends ResourceType<T>> {
|
|||
|
||||
/**
|
||||
* Contains the URI to the entity.
|
||||
* <p/>
|
||||
*
|
||||
* 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
|
||||
|
@ -186,7 +188,7 @@ public abstract class ResourceType<T extends ResourceType<T>> {
|
|||
|
||||
/**
|
||||
* Contains the type of the the entity.
|
||||
* <p/>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
|
|
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
* 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.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* Runtime information for a specific vm
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="RuntimeInfoSection" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "RuntimeInfoSection")
|
||||
public class RuntimeInfoSection extends SectionType<RuntimeInfoSection> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromRuntimeInfoSection(this);
|
||||
}
|
||||
|
||||
public static class Builder extends SectionType.Builder<RuntimeInfoSection> {
|
||||
|
||||
private VMWareTools vmWareTools;
|
||||
private List<Object> any = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see RuntimeInfoSection#getVmWareTools()
|
||||
*/
|
||||
public Builder vmWareTools(VMWareTools vmWareTools) {
|
||||
this.vmWareTools = vmWareTools;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see RuntimeInfoSection#getAny()
|
||||
*/
|
||||
public Builder any(List<Object> any) {
|
||||
this.any = any;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RuntimeInfoSection build() {
|
||||
RuntimeInfoSection runtimeInfoSection = new RuntimeInfoSection(vmWareTools, any);
|
||||
return runtimeInfoSection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromSectionType(SectionType<RuntimeInfoSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
public Builder fromRuntimeInfoSection(RuntimeInfoSection in) {
|
||||
return fromSectionType(in)
|
||||
.vmWareTools(in.getVMWareTools())
|
||||
.any(in.getAny());
|
||||
}
|
||||
}
|
||||
|
||||
protected RuntimeInfoSection() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public RuntimeInfoSection(VMWareTools vmWareTools, List<Object> any) {
|
||||
this.vmWareTools = vmWareTools;
|
||||
this.any = any;
|
||||
}
|
||||
|
||||
|
||||
@XmlElement(name = "VMWareTools")
|
||||
protected VMWareTools vmWareTools;
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* Gets the value of the vmWareTools property.
|
||||
*/
|
||||
public VMWareTools getVMWareTools() {
|
||||
return vmWareTools;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
return this.any;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
RuntimeInfoSection that = RuntimeInfoSection.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(vmWareTools, that.vmWareTools) && equal(any, that.any);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), vmWareTools, any);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("vmWareTools", vmWareTools).add("any", any);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* The ticket for accessing the console of a VM.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ScreenTicket" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "ScreenTicket")
|
||||
public class ScreenTicket {
|
||||
|
||||
@XmlValue
|
||||
protected String value;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
}
|
|
@ -446,7 +446,7 @@ public class Task extends EntityType<Task> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(error, org, progress, status, operation, operationName,
|
||||
return Objects.hashCode(super.hashCode(), error, org, progress, status, operation, operationName,
|
||||
startTime, endTime, expiryTime);
|
||||
}
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ public class TasksList extends ResourceType<TasksList> implements Set<Task> {
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return super.hashCode() + Objects.hashCode(delegate(), name);
|
||||
return Objects.hashCode(super.hashCode(), delegate(), name);
|
||||
}
|
||||
|
||||
private Set<Task> delegate() {
|
||||
|
@ -252,4 +252,4 @@ public class TasksList extends ResourceType<TasksList> implements Set<Task> {
|
|||
return delegate().toArray(array);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents vApp/VM undeployment parameters.
|
||||
*
|
||||
*
|
||||
* <p>Java class for UndeployVAppParams complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="UndeployVAppParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}VCloudExtensibleType">
|
||||
* <sequence>
|
||||
* <element name="UndeployPowerAction" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "UndeployVAppParams", propOrder = {
|
||||
"undeployPowerAction"
|
||||
})
|
||||
public class UndeployVAppParams
|
||||
|
||||
|
||||
{
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromUndeployVAppParams(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private String undeployPowerAction;
|
||||
|
||||
/**
|
||||
* @see UndeployVAppParams#getUndeployPowerAction()
|
||||
*/
|
||||
public Builder undeployPowerAction(String undeployPowerAction) {
|
||||
this.undeployPowerAction = undeployPowerAction;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public UndeployVAppParams build() {
|
||||
UndeployVAppParams undeployVAppParams = new UndeployVAppParams();
|
||||
undeployVAppParams.setUndeployPowerAction(undeployPowerAction);
|
||||
return undeployVAppParams;
|
||||
}
|
||||
|
||||
|
||||
public Builder fromUndeployVAppParams(UndeployVAppParams in) {
|
||||
return undeployPowerAction(in.getUndeployPowerAction());
|
||||
}
|
||||
}
|
||||
|
||||
private UndeployVAppParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
|
||||
|
||||
@XmlElement(name = "UndeployPowerAction")
|
||||
protected String undeployPowerAction;
|
||||
|
||||
/**
|
||||
* Gets the value of the undeployPowerAction property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getUndeployPowerAction() {
|
||||
return undeployPowerAction;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the undeployPowerAction property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setUndeployPowerAction(String value) {
|
||||
this.undeployPowerAction = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
UndeployVAppParams that = UndeployVAppParams.class.cast(o);
|
||||
return equal(undeployPowerAction, that.undeployPowerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(undeployPowerAction);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("undeployPowerAction", undeployPowerAction).toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,5 +1,363 @@
|
|||
/*
|
||||
* 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;
|
||||
|
||||
public class VApp {
|
||||
// Placeholder for merge
|
||||
import static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a vApp.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VApp" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
public class VApp extends AbstractVAppType<VApp> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVApp(this);
|
||||
}
|
||||
|
||||
public static class Builder extends AbstractVAppType.Builder<VApp> {
|
||||
|
||||
private Owner owner;
|
||||
private Boolean inMaintenanceMode;
|
||||
private VAppChildren children;
|
||||
private Boolean ovfDescriptorUploaded;
|
||||
|
||||
/**
|
||||
* @see VApp#getOwner()
|
||||
*/
|
||||
public Builder owner(Owner owner) {
|
||||
this.owner = owner;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#isInMaintenanceMode()
|
||||
*/
|
||||
public Builder isInMaintenanceMode(Boolean inMaintenanceMode) {
|
||||
this.inMaintenanceMode = inMaintenanceMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#isInMaintenanceMode()
|
||||
*/
|
||||
public Builder inMaintenanceMode() {
|
||||
this.inMaintenanceMode = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#isInMaintenanceMode()
|
||||
*/
|
||||
public Builder notInMaintenanceMode() {
|
||||
this.inMaintenanceMode = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#getChildren()
|
||||
*/
|
||||
public Builder children(VAppChildren children) {
|
||||
this.children = children;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#isOvfDescriptorUploaded()
|
||||
*/
|
||||
public Builder isOvfDescriptorUploaded(Boolean ovfDescriptorUploaded) {
|
||||
this.ovfDescriptorUploaded = ovfDescriptorUploaded;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#isOvfDescriptorUploaded()
|
||||
*/
|
||||
public Builder ovfDescriptorUploaded() {
|
||||
this.ovfDescriptorUploaded = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VApp#isOvfDescriptorUploaded()
|
||||
*/
|
||||
public Builder ovfDescriptorNotUploaded() {
|
||||
this.ovfDescriptorUploaded = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VApp build() {
|
||||
VApp vApp = new VApp(href, type, links, description, tasks, id, name, files, status, vAppParent, sections, inMaintenanceMode,
|
||||
owner, inMaintenanceMode, children, ovfDescriptorUploaded);
|
||||
return vApp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
@Override
|
||||
public Builder isDeployed(Boolean deployed) {
|
||||
this.deployed = deployed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
@Override
|
||||
public Builder deployed() {
|
||||
this.deployed = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeployed() {
|
||||
this.deployed = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder parent(Reference vAppParent) {
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getSections()
|
||||
*/
|
||||
@Override
|
||||
public Builder sections(List<SectionType<?>> sections) {
|
||||
if (checkNotNull(sections, "sections").size() > 0)
|
||||
this.sections = Lists.newArrayList(sections);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getSections()
|
||||
*/
|
||||
@Override
|
||||
public Builder section(SectionType<?> section) {
|
||||
if (this.sections == null)
|
||||
this.sections = Lists.newArrayList();
|
||||
this.sections.add(checkNotNull(section, "section"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getFiles()
|
||||
*/
|
||||
@Override
|
||||
public Builder files(FilesList files) {
|
||||
this.files = files;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getStatus()
|
||||
*/
|
||||
@Override
|
||||
public Builder status(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getId()
|
||||
*/
|
||||
@Override
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
this.href = href;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromAbstractVAppType(AbstractVAppType<VApp> in) {
|
||||
return Builder.class.cast(super.fromAbstractVAppType(in));
|
||||
}
|
||||
|
||||
public Builder fromVApp(VApp in) {
|
||||
return fromAbstractVAppType(in).owner(in.getOwner()).isInMaintenanceMode(in.isInMaintenanceMode()).children(in.getChildren()).isOvfDescriptorUploaded(in.isOvfDescriptorUploaded());
|
||||
}
|
||||
}
|
||||
|
||||
protected VApp() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public VApp(URI href, String type, @Nullable Set<Link> links, String description, @Nullable Set<Task> tasks, String id, String name, FilesList files, Integer status, Reference vAppParent,
|
||||
@Nullable List<SectionType<?>> sections, Boolean deployed, Owner owner, Boolean inMaintenanceMode, VAppChildren children, Boolean ovfDescriptorUploaded) {
|
||||
super(href, type, links, description, tasks, id, name, files, status, vAppParent, sections, deployed);
|
||||
this.owner = owner;
|
||||
this.inMaintenanceMode = inMaintenanceMode;
|
||||
this.children = children;
|
||||
this.ovfDescriptorUploaded = ovfDescriptorUploaded;
|
||||
}
|
||||
|
||||
@XmlElement(name = "Owner")
|
||||
protected Owner owner;
|
||||
@XmlElement(name = "InMaintenanceMode")
|
||||
protected Boolean inMaintenanceMode;
|
||||
@XmlElement(name = "Children")
|
||||
protected VAppChildren children;
|
||||
@XmlAttribute
|
||||
protected Boolean ovfDescriptorUploaded;
|
||||
|
||||
/**
|
||||
* Gets the value of the owner property.
|
||||
*/
|
||||
public Owner getOwner() {
|
||||
return owner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the inMaintenanceMode property.
|
||||
*/
|
||||
public Boolean isInMaintenanceMode() {
|
||||
return inMaintenanceMode;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the children property.
|
||||
*/
|
||||
public VAppChildren getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the ovfDescriptorUploaded property.
|
||||
*/
|
||||
public Boolean isOvfDescriptorUploaded() {
|
||||
return ovfDescriptorUploaded;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VApp that = VApp.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(this.owner, that.owner) && equal(this.inMaintenanceMode, that.inMaintenanceMode) &&
|
||||
equal(this.children, that.children) && equal(this.ovfDescriptorUploaded, that.ovfDescriptorUploaded);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), owner, inMaintenanceMode, children, ovfDescriptorUploaded);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("owner", owner).add("inMaintenanceMode", inMaintenanceMode)
|
||||
.add("children", children).add("ovfDescriptorUploaded", ovfDescriptorUploaded);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
* 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.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* Represents vApp children.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VAppChildren" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "VAppChildren")
|
||||
public class VAppChildren {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVAppChildren(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private List<VApp> vApps = Lists.newArrayList();
|
||||
private List<Vm> vms = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* @see VAppChildren#getVApps()
|
||||
*/
|
||||
public Builder vApps(List<VApp> vApps) {
|
||||
this.vApps = checkNotNull(vApps, "vApps");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppChildren#getVApps()
|
||||
*/
|
||||
public Builder vApp(VApp vApp) {
|
||||
this.vApps.add(checkNotNull(vApp, "vApp"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppChildren#getVms()
|
||||
*/
|
||||
public Builder vms(List<Vm> vms) {
|
||||
this.vms = checkNotNull(vms, "vms");
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppChildren#getVms()
|
||||
*/
|
||||
public Builder vm(Vm vm) {
|
||||
this.vms.add(checkNotNull(vm, "vm"));
|
||||
return this;
|
||||
}
|
||||
|
||||
public VAppChildren build() {
|
||||
VAppChildren vAppChildren = new VAppChildren(vApps, vms);
|
||||
return vAppChildren;
|
||||
}
|
||||
|
||||
public Builder fromVAppChildren(VAppChildren in) {
|
||||
return vApps(in.getVApps()).vms(in.getVms());
|
||||
}
|
||||
}
|
||||
|
||||
private VAppChildren() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
private VAppChildren(List<VApp> vApps, List<Vm> vms) {
|
||||
this.vApps = vApps;
|
||||
this.vms = vms;
|
||||
}
|
||||
|
||||
@XmlElement(name = "VApp")
|
||||
protected List<VApp> vApps = Lists.newArrayList();
|
||||
@XmlElement(name = "Vm")
|
||||
protected List<Vm> vms = Lists.newArrayList();
|
||||
|
||||
/**
|
||||
* Reserved.
|
||||
*
|
||||
* Unimplemented.
|
||||
*/
|
||||
public List<VApp> getVApps() {
|
||||
return vApps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Child VMs.
|
||||
*/
|
||||
public List<Vm> getVms() {
|
||||
return vms;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VAppChildren that = VAppChildren.class.cast(o);
|
||||
return equal(this.vApps, that.vApps) && equal(this.vms, that.vms);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(vApps, vms);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("vApps", vApps).add("vms", vms).toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* Represents vApp creation parameters.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VAppCreationParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "VAppCreationParams")
|
||||
public class VAppCreationParams extends VAppCreationParamsType<VAppCreationParams> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVAppCreationParams(this);
|
||||
}
|
||||
|
||||
public static class Builder extends VAppCreationParamsType.Builder<VAppCreationParams> {
|
||||
|
||||
@Override
|
||||
public VAppCreationParams build() {
|
||||
VAppCreationParams vAppCreationParams = new VAppCreationParams(description, name, vAppParent, instantiationParams, deploy, powerOn);
|
||||
return vAppCreationParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder vAppParent(Reference vAppParent) {
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#getInstantiationParams()
|
||||
*/
|
||||
@Override
|
||||
public Builder instantiationParams(InstantiationParams instantiationParams) {
|
||||
this.instantiationParams = instantiationParams;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy(Boolean deploy) {
|
||||
this.deploy = deploy;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn(Boolean powerOn) {
|
||||
this.powerOn = powerOn;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
@Override
|
||||
public Builder notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromVAppCreationParamsType(VAppCreationParamsType<VAppCreationParams> in) {
|
||||
return Builder.class.cast(super.fromVAppCreationParamsType(in));
|
||||
}
|
||||
|
||||
public Builder fromVAppCreationParams(VAppCreationParams in) {
|
||||
return fromVAppCreationParamsType(in);
|
||||
}
|
||||
}
|
||||
|
||||
protected VAppCreationParams() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public VAppCreationParams(String description, String name, Reference vAppParent, InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn) {
|
||||
super(description, name, vAppParent, instantiationParams, deploy, powerOn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VAppCreationParams that = VAppCreationParams.class.cast(o);
|
||||
return super.equals(that);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,64 +16,27 @@
|
|||
* 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.Objects.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
||||
/**
|
||||
* Represents vApp creation parameters.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for VAppCreationParams complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VAppCreationParams">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}ParamsType">
|
||||
* <sequence>
|
||||
* <element name="VAppParent" type="{http://www.vmware.com/vcloud/v1.5}ReferenceType" minOccurs="0"/>
|
||||
* <element name="InstantiationParams" type="{http://www.vmware.com/vcloud/v1.5}InstantiationParamsType" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="deploy" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="powerOn" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="VAppCreationParams" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "VAppCreationParams", propOrder = {
|
||||
"vAppParent",
|
||||
"instantiationParams"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
// InstantiateOvfParamsType.class,
|
||||
// ComposeVAppParamsType.class,
|
||||
// InstantiateVAppParamsType.class,
|
||||
// ImportVmAsVAppParamsType.class
|
||||
})
|
||||
public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
||||
extends ParamsType<T>
|
||||
|
||||
{
|
||||
public static <T extends VAppCreationParamsType<T>> Builder<T> builder() {
|
||||
return new Builder<T>();
|
||||
}
|
||||
|
||||
public Builder<T> toBuilder() {
|
||||
return new Builder<T>().fromVAppCreationParamsType(this);
|
||||
}
|
||||
public class VAppCreationParamsType<T extends VAppCreationParamsType<T>> extends ParamsType<T> {
|
||||
|
||||
public static class Builder<T extends VAppCreationParamsType<T>> extends ParamsType.Builder<T> {
|
||||
|
||||
|
@ -106,6 +69,22 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
public Builder<T> deploy() {
|
||||
this.deploy = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isDeploy()
|
||||
*/
|
||||
public Builder<T> notDeploy() {
|
||||
this.deploy = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
|
@ -114,45 +93,68 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
public Builder<T> powerOn() {
|
||||
this.powerOn = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppCreationParamsType#isPowerOn()
|
||||
*/
|
||||
public Builder<T> notPowerOn() {
|
||||
this.powerOn = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VAppCreationParamsType<T> build() {
|
||||
return new VAppCreationParamsType<T>(description, name, vAppParent, instantiationParams,deploy, powerOn);
|
||||
VAppCreationParamsType<T> vAppCreationParams = new VAppCreationParamsType<T>(description, name, vAppParent, instantiationParams, deploy, powerOn);
|
||||
return vAppCreationParams;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> description(String description) {
|
||||
super.description(description);
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ParamsType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder<T> name(String name) {
|
||||
super.name(name);
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder<T> fromParamsType(ParamsType<T> in) {
|
||||
return Builder.class.cast(super.fromParamsType(in));
|
||||
}
|
||||
|
||||
public Builder<T> fromVAppCreationParamsType(VAppCreationParamsType<T> in) {
|
||||
return fromParamsType(in)
|
||||
.vAppParent(in.getVAppParent())
|
||||
.instantiationParams(in.getInstantiationParams())
|
||||
.deploy(in.isDeploy())
|
||||
.powerOn(in.isPowerOn());
|
||||
return fromParamsType(in).vAppParent(in.getVAppParent()).instantiationParams(in.getInstantiationParams()).deploy(in.isDeploy()).powerOn(in.isPowerOn());
|
||||
}
|
||||
}
|
||||
|
||||
protected VAppCreationParamsType() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public VAppCreationParamsType(String description, String name, Reference vAppParent, InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn) {
|
||||
super(description, name);
|
||||
this.vAppParent = vAppParent;
|
||||
this.instantiationParams = instantiationParams;
|
||||
this.deploy = deploy;
|
||||
this.powerOn = powerOn;
|
||||
}
|
||||
|
||||
@XmlElement(name = "VAppParent")
|
||||
protected Reference vAppParent;
|
||||
@XmlElement(name = "InstantiationParams")
|
||||
|
@ -162,24 +164,8 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
@XmlAttribute
|
||||
protected Boolean powerOn;
|
||||
|
||||
public VAppCreationParamsType(String description, String name, Reference vAppParent,
|
||||
InstantiationParams instantiationParams, Boolean deploy, Boolean powerOn) {
|
||||
super(description, name);
|
||||
this.vAppParent = vAppParent;
|
||||
this.instantiationParams = instantiationParams;
|
||||
this.deploy = deploy;
|
||||
this.powerOn = powerOn;
|
||||
}
|
||||
|
||||
protected VAppCreationParamsType() {
|
||||
// for JAXB
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the vAppParent property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Reference }
|
||||
*/
|
||||
public Reference getVAppParent() {
|
||||
return vAppParent;
|
||||
|
@ -187,9 +173,6 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
|
||||
/**
|
||||
* Gets the value of the instantiationParams property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link InstantiationParams }
|
||||
*/
|
||||
public InstantiationParams getInstantiationParams() {
|
||||
return instantiationParams;
|
||||
|
@ -197,9 +180,6 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
|
||||
/**
|
||||
* Gets the value of the deploy property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isDeploy() {
|
||||
return deploy;
|
||||
|
@ -207,9 +187,6 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
|
||||
/**
|
||||
* Gets the value of the powerOn property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*/
|
||||
public Boolean isPowerOn() {
|
||||
return powerOn;
|
||||
|
@ -222,7 +199,8 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VAppCreationParamsType<?> that = VAppCreationParamsType.class.cast(o);
|
||||
return equal(vAppParent, that.vAppParent) &&
|
||||
return super.equals(that) &&
|
||||
equal(vAppParent, that.vAppParent) &&
|
||||
equal(instantiationParams, that.instantiationParams) &&
|
||||
equal(deploy, that.deploy) &&
|
||||
equal(powerOn, that.powerOn);
|
||||
|
@ -230,19 +208,15 @@ public class VAppCreationParamsType<T extends VAppCreationParamsType<T>>
|
|||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(vAppParent,
|
||||
instantiationParams,
|
||||
deploy,
|
||||
powerOn);
|
||||
return Objects.hashCode(super.hashCode(), vAppParent, instantiationParams, deploy, powerOn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public ToStringHelper string() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("vAppParent", vAppParent)
|
||||
.add("instantiationParams", instantiationParams)
|
||||
.add("deploy", deploy)
|
||||
.add("powerOn", powerOn).toString();
|
||||
.add("powerOn", powerOn);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,235 @@
|
|||
/**
|
||||
* 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.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a vApp network.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VAppNetwork" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlType(name = "VAppNetwork")
|
||||
public class VAppNetwork extends NetworkType<VAppNetwork> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVAppNetwork(this);
|
||||
}
|
||||
|
||||
public static class Builder extends NetworkType.Builder<VAppNetwork> {
|
||||
|
||||
private Boolean deployed;
|
||||
|
||||
/**
|
||||
* @see VAppNetwork#isDeployed()
|
||||
*/
|
||||
public Builder isDeployed(Boolean deployed) {
|
||||
this.deployed = deployed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppNetwork#isDeployed()
|
||||
*/
|
||||
public Builder deployed() {
|
||||
this.deployed = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VAppNetwork#isDeployed()
|
||||
*/
|
||||
public Builder notDeployed() {
|
||||
this.deployed = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VAppNetwork build() {
|
||||
VAppNetwork vAppNetwork = new VAppNetwork(href, type, links, description, tasks, id, name, networkConfiguration);
|
||||
vAppNetwork.deployed = deployed;
|
||||
return vAppNetwork;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see NetworkType#getConfiguration()
|
||||
*/
|
||||
@Override
|
||||
public Builder configuration(NetworkConfiguration networkConfiguration) {
|
||||
this.networkConfiguration = networkConfiguration;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getName()
|
||||
*/
|
||||
@Override
|
||||
public Builder name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getDescription()
|
||||
*/
|
||||
@Override
|
||||
public Builder description(String description) {
|
||||
this.description = description;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getId()
|
||||
*/
|
||||
@Override
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
this.href = href;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromNetworkType(NetworkType<VAppNetwork> in) {
|
||||
return Builder.class.cast(super.fromNetworkType(in));
|
||||
}
|
||||
|
||||
public Builder fromVAppNetwork(VAppNetwork in) {
|
||||
return fromNetworkType(in).isDeployed(in.isDeployed());
|
||||
}
|
||||
}
|
||||
|
||||
protected VAppNetwork() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public VAppNetwork(URI href, String type, @Nullable Set<Link> links, String description, @Nullable Set<Task> tasks, String id, String name, NetworkConfiguration networkConfiguration) {
|
||||
super(href, type, links, description, tasks, id, name, networkConfiguration);
|
||||
}
|
||||
|
||||
@XmlAttribute
|
||||
protected Boolean deployed;
|
||||
|
||||
/**
|
||||
* Gets the value of the deployed property.
|
||||
*/
|
||||
public Boolean isDeployed() {
|
||||
return deployed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VAppNetwork that = VAppNetwork.class.cast(o);
|
||||
return super.equals(that) && equal(this.deployed, that.deployed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), deployed);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("deployed", deployed);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,11 +16,10 @@
|
|||
* 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 static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Set;
|
||||
|
@ -30,40 +29,20 @@ import javax.xml.bind.annotation.XmlElement;
|
|||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
* Represents a VApp network configuration.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for VAppNetworkConfiguration complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VAppNetworkConfiguration">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}ResourceType">
|
||||
* <sequence>
|
||||
* <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="Configuration" type="{http://www.vmware.com/vcloud/v1.5}NetworkConfigurationType"/>
|
||||
* <element name="IsDeployed" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="networkName" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="VAppNetworkConfiguration" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlType(name = "VAppNetworkConfiguration", propOrder = {
|
||||
"description",
|
||||
"configuration",
|
||||
"isDeployed"
|
||||
})
|
||||
@XmlType(name = "VAppNetworkConfiguration")
|
||||
public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfiguration> {
|
||||
public static <T extends VAppNetworkConfiguration> Builder builder() {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
|
@ -76,7 +55,7 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
|
||||
private String description;
|
||||
private NetworkConfiguration configuration;
|
||||
private Boolean isDeployed;
|
||||
private Boolean deployed;
|
||||
private String networkName;
|
||||
|
||||
/**
|
||||
|
@ -98,8 +77,8 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
/**
|
||||
* @see VAppNetworkConfiguration#isDeployed()
|
||||
*/
|
||||
public Builder isDeployed(Boolean isDeployed) {
|
||||
this.isDeployed = isDeployed;
|
||||
public Builder isDeployed(Boolean deployed) {
|
||||
this.deployed = deployed;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -111,13 +90,11 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VAppNetworkConfiguration build() {
|
||||
return new VAppNetworkConfiguration(href, type, links,
|
||||
description, configuration, isDeployed, networkName);
|
||||
return new VAppNetworkConfiguration(href, type, links, description, configuration, deployed, networkName);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
|
@ -157,7 +134,7 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder fromResourceType(ResourceType<VAppNetworkConfiguration> in) {
|
||||
return Builder.class.cast(super.fromResourceType(in));
|
||||
}
|
||||
|
@ -176,7 +153,7 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
@XmlElement(name = "Configuration", required = true)
|
||||
protected NetworkConfiguration configuration;
|
||||
@XmlElement(name = "IsDeployed")
|
||||
protected Boolean isDeployed;
|
||||
protected Boolean deployed;
|
||||
@XmlAttribute(required = true)
|
||||
protected String networkName;
|
||||
|
||||
|
@ -185,19 +162,16 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
super(href, type, links);
|
||||
this.description = description;
|
||||
this.configuration = configuration;
|
||||
isDeployed = deployed;
|
||||
this.deployed = deployed;
|
||||
this.networkName = networkName;
|
||||
}
|
||||
|
||||
private VAppNetworkConfiguration() {
|
||||
protected VAppNetworkConfiguration() {
|
||||
// For JAXB
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the description property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
|
@ -205,29 +179,20 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
|
||||
/**
|
||||
* Gets the value of the configuration property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link NetworkConfiguration }
|
||||
*/
|
||||
public NetworkConfiguration getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the isDeployed property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
* Gets the value of the deployed property.
|
||||
*/
|
||||
public Boolean isDeployed() {
|
||||
return isDeployed;
|
||||
return deployed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the networkName property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*/
|
||||
public String getNetworkName() {
|
||||
return networkName;
|
||||
|
@ -240,27 +205,24 @@ public class VAppNetworkConfiguration extends ResourceType<VAppNetworkConfigurat
|
|||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VAppNetworkConfiguration that = VAppNetworkConfiguration.class.cast(o);
|
||||
return equal(description, that.description) &&
|
||||
equal(configuration, that.configuration) &&
|
||||
equal(isDeployed, that.isDeployed) &&
|
||||
equal(networkName, that.networkName);
|
||||
return super.equals(that) &&
|
||||
equal(this.description, that.description) &&
|
||||
equal(this.configuration, that.configuration) &&
|
||||
equal(this.deployed, that.deployed) &&
|
||||
equal(this.networkName, that.networkName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(description,
|
||||
configuration,
|
||||
isDeployed,
|
||||
networkName);
|
||||
return Objects.hashCode(super.hashCode(), description, configuration, deployed, networkName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public ToStringHelper string() {
|
||||
return Objects.toStringHelper("")
|
||||
.add("description", description)
|
||||
.add("configuration", configuration)
|
||||
.add("isDeployed", isDeployed)
|
||||
.add("networkName", networkName).toString();
|
||||
.add("deployed", deployed)
|
||||
.add("networkName", networkName);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -16,11 +16,10 @@
|
|||
* 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 static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.Collections;
|
||||
|
@ -30,54 +29,23 @@ import javax.xml.bind.annotation.XmlAttribute;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.DeploymentOptionSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.DiskSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.NetworkSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.ProductSection;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.VirtualHardwareSection;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
|
||||
/**
|
||||
* Represents a vApp template.
|
||||
* <p/>
|
||||
* <p/>
|
||||
* <p>Java class for VAppTemplate complex type.
|
||||
* <p/>
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
* <p/>
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VAppTemplate">
|
||||
* <complexContent>
|
||||
* <extension base="{http://www.vmware.com/vcloud/v1.5}ResourceEntityType">
|
||||
* <sequence>
|
||||
* <element name="Owner" type="{http://www.vmware.com/vcloud/v1.5}OwnerType" minOccurs="0"/>
|
||||
* <element name="Children" type="{http://www.vmware.com/vcloud/v1.5}VAppTemplateChildrenType" minOccurs="0"/>
|
||||
* <element ref="{http://schemas.dmtf.org/ovf/envelope/1}Section" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="VAppScopedLocalId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="ovfDescriptorUploaded" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="goldMaster" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
|
||||
* <anyAttribute processContents='lax' namespace='##other'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* <complexType name="VAppTemplate" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlRootElement(name = "VAppTemplate")
|
||||
@XmlType(propOrder = {
|
||||
"owner",
|
||||
"children",
|
||||
"sections",
|
||||
"vAppScopedLocalId"
|
||||
})
|
||||
public class VAppTemplate extends ResourceEntityType<VAppTemplate> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* 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.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "VMWareTools")
|
||||
public class VMWareTools {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVMWareTools(this);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* @see VMWareTools#getVersion()
|
||||
*/
|
||||
public Builder version(String version) {
|
||||
this.version = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public VMWareTools build() {
|
||||
VMWareTools vmWareTools = new VMWareTools(version);
|
||||
return vmWareTools;
|
||||
}
|
||||
|
||||
public Builder fromVMWareTools(VMWareTools in) {
|
||||
return version(in.getVersion());
|
||||
}
|
||||
}
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
protected String version;
|
||||
|
||||
protected VMWareTools() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public VMWareTools(String version) {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the version property.
|
||||
*/
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VMWareTools that = VMWareTools.class.cast(o);
|
||||
return equal(this.version, that.version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper("").add("version", version).toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,333 @@
|
|||
/*
|
||||
* 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.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
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.javax.annotation.Nullable;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType;
|
||||
import org.jclouds.vcloud.director.v1_5.domain.ovf.environment.EnvironmentType;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a VM.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="Vm" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "Vm")
|
||||
public class Vm extends AbstractVAppType<Vm> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVm(this);
|
||||
}
|
||||
|
||||
public static class Builder extends AbstractVAppType.Builder<Vm> {
|
||||
|
||||
private String vAppScopedLocalId;
|
||||
private EnvironmentType environment;
|
||||
private Boolean needsCustomization;
|
||||
|
||||
/**
|
||||
* @see Vm#getVAppScopedLocalId()
|
||||
*/
|
||||
public Builder vAppScopedLocalId(String vAppScopedLocalId) {
|
||||
this.vAppScopedLocalId = vAppScopedLocalId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Vm#getEnvironment()
|
||||
*/
|
||||
public Builder environment(EnvironmentType environment) {
|
||||
this.environment = environment;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Vm#getNeedsCustomization()
|
||||
*/
|
||||
public Builder isNeedsCustomization(Boolean needsCustomization) {
|
||||
this.needsCustomization = needsCustomization;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Vm#getNeedsCustomization()
|
||||
*/
|
||||
public Builder needsCustomization() {
|
||||
this.needsCustomization = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see Vm#getNeedsCustomization()
|
||||
*/
|
||||
public Builder notNeedsCustomization() {
|
||||
this.needsCustomization = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Vm build() {
|
||||
Vm vm = new Vm(href, type, links, description, tasks, id, name, files, status, vAppParent, sections, deployed, vAppScopedLocalId, environment, needsCustomization);
|
||||
return vm;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
@Override
|
||||
public Builder isDeployed(Boolean deployed) {
|
||||
this.deployed = deployed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
@Override
|
||||
public Builder deployed() {
|
||||
this.deployed = Boolean.TRUE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#isDeployed()
|
||||
*/
|
||||
@Override
|
||||
public Builder notDeployed() {
|
||||
this.deployed = Boolean.FALSE;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getVAppParent()
|
||||
*/
|
||||
@Override
|
||||
public Builder parent(Reference vAppParent) {
|
||||
this.vAppParent = vAppParent;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getSections()
|
||||
*/
|
||||
@Override
|
||||
public Builder sections(List<SectionType<?>> sections) {
|
||||
if (checkNotNull(sections, "sections").size() > 0)
|
||||
this.sections = Lists.newArrayList(sections);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see AbstractVAppType#getSections()
|
||||
*/
|
||||
@Override
|
||||
public Builder section(SectionType<?> section) {
|
||||
if (this.sections == null)
|
||||
this.sections = Lists.newArrayList();
|
||||
this.sections.add(checkNotNull(section, "section"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getFiles()
|
||||
*/
|
||||
@Override
|
||||
public Builder files(FilesList files) {
|
||||
this.files = files;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceEntityType#getStatus()
|
||||
*/
|
||||
@Override
|
||||
public Builder status(Integer status) {
|
||||
this.status = status;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getId()
|
||||
*/
|
||||
@Override
|
||||
public Builder id(String id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder tasks(Set<Task> tasks) {
|
||||
if (checkNotNull(tasks, "tasks").size() > 0)
|
||||
this.tasks = Sets.newLinkedHashSet(tasks);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see EntityType#getTasks()
|
||||
*/
|
||||
@Override
|
||||
public Builder task(Task task) {
|
||||
if (tasks == null)
|
||||
tasks = Sets.newLinkedHashSet();
|
||||
this.tasks.add(checkNotNull(task, "task"));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
this.href = href;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ReferenceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
if (checkNotNull(links, "links").size() > 0)
|
||||
this.links = Sets.newLinkedHashSet(links);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
if (links == null)
|
||||
links = Sets.newLinkedHashSet();
|
||||
this.links.add(checkNotNull(link, "link"));
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromAbstractVAppType(AbstractVAppType<Vm> in) {
|
||||
return Builder.class.cast(super.fromAbstractVAppType(in));
|
||||
}
|
||||
|
||||
public Builder fromVm(Vm in) {
|
||||
return fromAbstractVAppType(in).vAppScopedLocalId(in.getVAppScopedLocalId()).environment(in.getEnvironment()).isNeedsCustomization(in.isNeedsCustomization());
|
||||
}
|
||||
}
|
||||
|
||||
protected Vm() {
|
||||
// for JAXB and Builders
|
||||
}
|
||||
|
||||
public Vm(URI href, String type, @Nullable Set<Link> links, String description, @Nullable Set<Task> tasks, String id, String name, FilesList files, Integer status, Reference vAppParent,
|
||||
@Nullable List<SectionType<?>> sections, Boolean deployed, String vAppScopedlocalId, EnvironmentType environment, Boolean needsCustomization) {
|
||||
super(href, type, links, description, tasks, id, name, files, status, vAppParent, sections, deployed);
|
||||
this.vAppScopedLocalId = vAppScopedlocalId;
|
||||
this.environment = environment;
|
||||
this.needsCustomization = needsCustomization;
|
||||
}
|
||||
|
||||
@XmlElement(name = "VAppScopedLocalId")
|
||||
protected String vAppScopedLocalId;
|
||||
@XmlElement(name = "Environment", namespace = "http://schemas.dmtf.org/ovf/environment/1")
|
||||
protected EnvironmentType environment;
|
||||
@XmlAttribute
|
||||
protected Boolean needsCustomization;
|
||||
|
||||
/**
|
||||
* Gets the value of the vAppScopedLocalId property.
|
||||
*
|
||||
* @return possible object is {@link String }
|
||||
*/
|
||||
public String getVAppScopedLocalId() {
|
||||
return vAppScopedLocalId;
|
||||
}
|
||||
|
||||
/**
|
||||
* OVF environment section
|
||||
*
|
||||
* @return possible object is {@link Environment }
|
||||
*/
|
||||
public EnvironmentType getEnvironment() {
|
||||
return environment;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the needsCustomization property.
|
||||
*
|
||||
* @return possible object is {@link Boolean }
|
||||
*/
|
||||
public Boolean isNeedsCustomization() {
|
||||
return needsCustomization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
Vm that = Vm.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(this.vAppScopedLocalId, that.vAppScopedLocalId) && equal(this.environment, that.environment) && equal(this.needsCustomization, that.needsCustomization);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), vAppScopedLocalId, environment, needsCustomization);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("vAppScopedLocalId", vAppScopedLocalId).add("environment", environment).add("needsCustomization", needsCustomization);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import static com.google.common.base.Objects.*;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
|
||||
import java.net.URI;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
/**
|
||||
* Represents a question which vSphere issued for a VM in a stuck state(WAITING_FOR_INPUT). It has a question element, a question ID
|
||||
* element, and a list of choices with at least one element.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VmPendingQuestion" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlType(name = "VmPendingQuestion")
|
||||
public class VmPendingQuestion extends ResourceType<VmPendingQuestion> {
|
||||
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromVmPendingQuestion(this);
|
||||
}
|
||||
|
||||
public static class Builder extends ResourceType.Builder<VmPendingQuestion> {
|
||||
|
||||
private String question;
|
||||
private String questionId;
|
||||
private List<VmQuestionAnswerChoice> choices;
|
||||
|
||||
/**
|
||||
* @see VmPendingQuestion#getQuestion()
|
||||
*/
|
||||
public Builder question(String question) {
|
||||
this.question = question;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VmPendingQuestion#getQuestionId()
|
||||
*/
|
||||
public Builder questionId(String questionId) {
|
||||
this.questionId = questionId;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see VmPendingQuestion#getChoices()
|
||||
*/
|
||||
public Builder choices(List<VmQuestionAnswerChoice> choices) {
|
||||
this.choices = choices;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VmPendingQuestion build() {
|
||||
VmPendingQuestion vmPendingQuestion = new VmPendingQuestion(href, type, links, question, questionId, choices);
|
||||
return vmPendingQuestion;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getHref()
|
||||
*/
|
||||
@Override
|
||||
public Builder href(URI href) {
|
||||
super.href(href);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getType()
|
||||
*/
|
||||
@Override
|
||||
public Builder type(String type) {
|
||||
super.type(type);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder links(Set<Link> links) {
|
||||
super.links(Sets.newLinkedHashSet(checkNotNull(links, "links")));
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ResourceType#getLinks()
|
||||
*/
|
||||
@Override
|
||||
public Builder link(Link link) {
|
||||
super.link(link);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder fromResourceType(ResourceType<VmPendingQuestion> in) {
|
||||
return Builder.class.cast(super.fromResourceType(in));
|
||||
}
|
||||
|
||||
public Builder fromVmPendingQuestion(VmPendingQuestion in) {
|
||||
return fromResourceType(in).question(in.getQuestion()).questionId(in.getQuestionId()).choices(in.getChoices());
|
||||
}
|
||||
}
|
||||
|
||||
protected VmPendingQuestion() {
|
||||
// For JAXB and builder use
|
||||
}
|
||||
|
||||
public VmPendingQuestion(URI href, String type, Set<Link> links, String question, String questionId, List<VmQuestionAnswerChoice> choices) {
|
||||
super(href, type, links);
|
||||
this.question = question;
|
||||
this.questionId = questionId;
|
||||
this.choices = choices;
|
||||
}
|
||||
|
||||
@XmlElement(name = "Question", required = true)
|
||||
protected String question;
|
||||
@XmlElement(name = "QuestionId", required = true)
|
||||
protected String questionId;
|
||||
@XmlElement(name = "Choices", required = true)
|
||||
protected List<VmQuestionAnswerChoice> choices;
|
||||
|
||||
/**
|
||||
* Gets the value of the question property.
|
||||
*/
|
||||
public String getQuestion() {
|
||||
return question;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the questionId property.
|
||||
*/
|
||||
public String getQuestionId() {
|
||||
return questionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the choices property.
|
||||
*/
|
||||
public List<VmQuestionAnswerChoice> getChoices() {
|
||||
return choices;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o)
|
||||
return true;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
VmPendingQuestion that = VmPendingQuestion.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(this.question, that.question) && equal(this.questionId, that.questionId) && equal(this.choices, that.choices);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hashCode(super.hashCode(), question, questionId, choices);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ToStringHelper string() {
|
||||
return super.string().add("question", question).add("questionId", questionId).add("choices", choices);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents a VM answer to a question when the VM is in a stuck
|
||||
* (WAITING_FOR_INPUT) state.
|
||||
*
|
||||
*
|
||||
* <p>Java class for VmQuestionAnswer complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VmQuestionAnswer">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="ChoiceId" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||
* <element name="QuestionId" type="{http://www.w3.org/2001/XMLSchema}string"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "VmQuestionAnswer", propOrder = {
|
||||
"choiceId",
|
||||
"questionId"
|
||||
})
|
||||
public class VmQuestionAnswer {
|
||||
|
||||
// TODO builder
|
||||
|
||||
@XmlElement(name = "ChoiceId")
|
||||
protected int choiceId;
|
||||
@XmlElement(name = "QuestionId", required = true)
|
||||
protected String questionId;
|
||||
|
||||
/**
|
||||
* Gets the value of the choiceId property.
|
||||
*
|
||||
*/
|
||||
public int getChoiceId() {
|
||||
return choiceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the choiceId property.
|
||||
*
|
||||
*/
|
||||
public void setChoiceId(int value) {
|
||||
this.choiceId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the questionId property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getQuestionId() {
|
||||
return questionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the questionId property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setQuestionId(String value) {
|
||||
this.questionId = value;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. jclouds licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Represents a pair of ID and text of an answer choice of a VM question.
|
||||
*
|
||||
*
|
||||
* <p>Java class for VmQuestionAnswerChoice complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="VmQuestionAnswerChoice">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="Id" type="{http://www.w3.org/2001/XMLSchema}int"/>
|
||||
* <element name="Text" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "VmQuestionAnswerChoice", propOrder = {
|
||||
"id",
|
||||
"text"
|
||||
})
|
||||
public class VmQuestionAnswerChoice {
|
||||
|
||||
@XmlElement(name = "Id")
|
||||
protected int id;
|
||||
@XmlElement(name = "Text")
|
||||
protected String text;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
*/
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
*/
|
||||
public void setId(int value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the text property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the text property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setText(String value) {
|
||||
this.text = value;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Java class for anonymous complex type.
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class AutomaticRecoveryAction extends CimAnySimpleType {
|
||||
|
||||
|
||||
}
|
|
@ -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.
|
||||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Java class for anonymous complex type.
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class AutomaticShutdownAction
|
||||
extends CimAnySimpleType
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -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.
|
||||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Java class for anonymous complex type.
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class AutomaticStartupAction
|
||||
extends CimAnySimpleType
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,785 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Java class for CIM_ResourceAllocationSettingData_Type complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="CIM_ResourceAllocationSettingData_Type" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "CIM_ResourceAllocationSettingData_Type", namespace = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData")
|
||||
public class CIMResourceAllocationSettingDataType {
|
||||
|
||||
@XmlElement(name = "Address", nillable = true)
|
||||
protected CimString address;
|
||||
@XmlElement(name = "AddressOnParent", nillable = true)
|
||||
protected CimString addressOnParent;
|
||||
@XmlElement(name = "AllocationUnits", nillable = true)
|
||||
protected CimString allocationUnits;
|
||||
@XmlElement(name = "AutomaticAllocation", nillable = true)
|
||||
protected CimBoolean automaticAllocation;
|
||||
@XmlElement(name = "AutomaticDeallocation", nillable = true)
|
||||
protected CimBoolean automaticDeallocation;
|
||||
@XmlElementRef(name = "Caption", namespace = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData", type = ResourceAllocationCaption.class)
|
||||
protected ResourceAllocationCaption caption;
|
||||
@XmlElementRef(name = "ChangeableType", namespace = "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData", type = ResourceAllocationChangeableType.class)
|
||||
protected ResourceAllocationChangeableType changeableType;
|
||||
@XmlElement(name = "ConfigurationName", nillable = true)
|
||||
protected CimString configurationName;
|
||||
@XmlElement(name = "Connection", nillable = true)
|
||||
protected List<CimString> connection;
|
||||
@XmlElement(name = "ConsumerVisibility", nillable = true)
|
||||
protected ConsumerVisibility consumerVisibility;
|
||||
@XmlElement(name = "Description", nillable = true)
|
||||
protected CimString description;
|
||||
@XmlElement(name = "ElementName", required = true)
|
||||
protected CimString elementName;
|
||||
@XmlElement(name = "Generation", nillable = true)
|
||||
protected CimUnsignedLong generation;
|
||||
@XmlElement(name = "HostResource", nillable = true)
|
||||
protected List<CimString> hostResource;
|
||||
@XmlElement(name = "InstanceID", required = true)
|
||||
protected CimString instanceID;
|
||||
@XmlElement(name = "Limit", nillable = true)
|
||||
protected CimUnsignedLong limit;
|
||||
@XmlElement(name = "MappingBehavior", nillable = true)
|
||||
protected MappingBehavior mappingBehavior;
|
||||
@XmlElement(name = "OtherResourceType", nillable = true)
|
||||
protected CimString otherResourceType;
|
||||
@XmlElement(name = "Parent", nillable = true)
|
||||
protected CimString parent;
|
||||
@XmlElement(name = "PoolID", nillable = true)
|
||||
protected CimString poolID;
|
||||
@XmlElement(name = "Reservation", nillable = true)
|
||||
protected CimUnsignedLong reservation;
|
||||
@XmlElement(name = "ResourceSubType", nillable = true)
|
||||
protected CimString resourceSubType;
|
||||
@XmlElement(name = "ResourceType", nillable = true)
|
||||
protected ResourceType resourceType;
|
||||
@XmlElement(name = "VirtualQuantity", nillable = true)
|
||||
protected CimUnsignedLong virtualQuantity;
|
||||
@XmlElement(name = "VirtualQuantityUnits", nillable = true)
|
||||
protected CimString virtualQuantityUnits;
|
||||
@XmlElement(name = "Weight", nillable = true)
|
||||
protected CimUnsignedInt weight;
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the address property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the address property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setAddress(CimString value) {
|
||||
this.address = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the addressOnParent property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getAddressOnParent() {
|
||||
return addressOnParent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the addressOnParent property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setAddressOnParent(CimString value) {
|
||||
this.addressOnParent = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the allocationUnits property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getAllocationUnits() {
|
||||
return allocationUnits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the allocationUnits property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setAllocationUnits(CimString value) {
|
||||
this.allocationUnits = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the automaticAllocation property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimBoolean }
|
||||
*
|
||||
*/
|
||||
public CimBoolean getAutomaticAllocation() {
|
||||
return automaticAllocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the automaticAllocation property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimBoolean }
|
||||
*
|
||||
*/
|
||||
public void setAutomaticAllocation(CimBoolean value) {
|
||||
this.automaticAllocation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the automaticDeallocation property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimBoolean }
|
||||
*
|
||||
*/
|
||||
public CimBoolean getAutomaticDeallocation() {
|
||||
return automaticDeallocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the automaticDeallocation property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimBoolean }
|
||||
*
|
||||
*/
|
||||
public void setAutomaticDeallocation(CimBoolean value) {
|
||||
this.automaticDeallocation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the caption property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link ResourceAllocationCaption }
|
||||
*
|
||||
*/
|
||||
public ResourceAllocationCaption getCaption() {
|
||||
return caption;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the caption property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link ResourceAllocationCaption }
|
||||
*
|
||||
*/
|
||||
public void setCaption(ResourceAllocationCaption value) {
|
||||
this.caption = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the changeableType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link ResourceAllocationChangeableType }
|
||||
*
|
||||
*/
|
||||
public ResourceAllocationChangeableType getChangeableType() {
|
||||
return changeableType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the changeableType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link ResourceAllocationChangeableType }
|
||||
*
|
||||
*/
|
||||
public void setChangeableType(ResourceAllocationChangeableType value) {
|
||||
this.changeableType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the configurationName property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getConfigurationName() {
|
||||
return configurationName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the configurationName property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setConfigurationName(CimString value) {
|
||||
this.configurationName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the connection property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the connection property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getConnection().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link CimString }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<CimString> getConnection() {
|
||||
if (connection == null) {
|
||||
connection = new ArrayList<CimString>();
|
||||
}
|
||||
return this.connection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the consumerVisibility property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link ConsumerVisibility }
|
||||
*
|
||||
*/
|
||||
public ConsumerVisibility getConsumerVisibility() {
|
||||
return consumerVisibility;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the consumerVisibility property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link ConsumerVisibility }
|
||||
*
|
||||
*/
|
||||
public void setConsumerVisibility(ConsumerVisibility value) {
|
||||
this.consumerVisibility = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the description property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the description property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setDescription(CimString value) {
|
||||
this.description = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the elementName property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getElementName() {
|
||||
return elementName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the elementName property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setElementName(CimString value) {
|
||||
this.elementName = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the generation property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public CimUnsignedLong getGeneration() {
|
||||
return generation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the generation property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public void setGeneration(CimUnsignedLong value) {
|
||||
this.generation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the hostResource property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the hostResource property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getHostResource().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link CimString }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<CimString> getHostResource() {
|
||||
if (hostResource == null) {
|
||||
hostResource = new ArrayList<CimString>();
|
||||
}
|
||||
return this.hostResource;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the instanceID property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getInstanceID() {
|
||||
return instanceID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the instanceID property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setInstanceID(CimString value) {
|
||||
this.instanceID = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the limit property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public CimUnsignedLong getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the limit property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public void setLimit(CimUnsignedLong value) {
|
||||
this.limit = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the mappingBehavior property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link MappingBehavior }
|
||||
*
|
||||
*/
|
||||
public MappingBehavior getMappingBehavior() {
|
||||
return mappingBehavior;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the mappingBehavior property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link MappingBehavior }
|
||||
*
|
||||
*/
|
||||
public void setMappingBehavior(MappingBehavior value) {
|
||||
this.mappingBehavior = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the otherResourceType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getOtherResourceType() {
|
||||
return otherResourceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the otherResourceType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setOtherResourceType(CimString value) {
|
||||
this.otherResourceType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the parent property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the parent property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setParent(CimString value) {
|
||||
this.parent = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the poolID property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getPoolID() {
|
||||
return poolID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the poolID property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setPoolID(CimString value) {
|
||||
this.poolID = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the reservation property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public CimUnsignedLong getReservation() {
|
||||
return reservation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the reservation property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public void setReservation(CimUnsignedLong value) {
|
||||
this.reservation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the resourceSubType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getResourceSubType() {
|
||||
return resourceSubType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the resourceSubType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setResourceSubType(CimString value) {
|
||||
this.resourceSubType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the resourceType property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link ResourceType }
|
||||
*
|
||||
*/
|
||||
public ResourceType getResourceType() {
|
||||
return resourceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the resourceType property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link ResourceType }
|
||||
*
|
||||
*/
|
||||
public void setResourceType(ResourceType value) {
|
||||
this.resourceType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the virtualQuantity property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public CimUnsignedLong getVirtualQuantity() {
|
||||
return virtualQuantity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the virtualQuantity property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimUnsignedLong }
|
||||
*
|
||||
*/
|
||||
public void setVirtualQuantity(CimUnsignedLong value) {
|
||||
this.virtualQuantity = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the virtualQuantityUnits property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public CimString getVirtualQuantityUnits() {
|
||||
return virtualQuantityUnits;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the virtualQuantityUnits property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimString }
|
||||
*
|
||||
*/
|
||||
public void setVirtualQuantityUnits(CimString value) {
|
||||
this.virtualQuantityUnits = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the weight property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link CimUnsignedInt }
|
||||
*
|
||||
*/
|
||||
public CimUnsignedInt getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the weight property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link CimUnsignedInt }
|
||||
*
|
||||
*/
|
||||
public void setWeight(CimUnsignedInt value) {
|
||||
this.weight = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the any property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAny().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Object }
|
||||
* {@link Element }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
if (any == null) {
|
||||
any = new ArrayList<Object>();
|
||||
}
|
||||
return this.any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,93 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* <p>Java class for cimAnySimpleType complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimAnySimpleType" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimAnySimpleType", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common")
|
||||
public class CimAnySimpleType {
|
||||
|
||||
@XmlValue
|
||||
@XmlJavaTypeAdapter(CimAnySimpleTypeAdapter.class)
|
||||
@XmlSchemaType(name = "anySimpleType")
|
||||
protected String value;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
public class CimAnySimpleTypeAdapter extends XmlAdapter<String, String> {
|
||||
|
||||
@Override
|
||||
public String unmarshal(String value) {
|
||||
return (javax.xml.bind.DatatypeConverter.parseAnySimpleType(value));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String marshal(String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
return (javax.xml.bind.DatatypeConverter.printAnySimpleType(value));
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Java class for cimBoolean complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimBoolean" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimBoolean", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common")
|
||||
public class CimBoolean {
|
||||
|
||||
@XmlValue
|
||||
protected boolean value;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
*/
|
||||
public boolean isValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
*/
|
||||
public void setValue(boolean value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Java class for cimReference complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimReference" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimReference", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common")
|
||||
public class CimReference {
|
||||
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the any property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAny().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Object }
|
||||
* {@link Element }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
if (any == null) {
|
||||
any = new ArrayList<Object>();
|
||||
}
|
||||
return this.any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Java class for cimString complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimString" />
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimString", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common")
|
||||
public class CimString {
|
||||
|
||||
@XmlValue
|
||||
protected String value;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Java class for cimUnsignedInt complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimUnsignedInt" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimUnsignedInt", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common")
|
||||
public class CimUnsignedInt {
|
||||
|
||||
@XmlValue
|
||||
@XmlSchemaType(name = "unsignedInt")
|
||||
protected long value;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
*/
|
||||
public long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
*/
|
||||
public void setValue(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* Java class for cimUnsignedLong complex type.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimUnsignedLong" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimUnsignedLong", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common")
|
||||
public class CimUnsignedLong {
|
||||
|
||||
@XmlValue
|
||||
@XmlSchemaType(name = "unsignedLong")
|
||||
protected BigInteger value;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public BigInteger getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link BigInteger }
|
||||
*
|
||||
*/
|
||||
public void setValue(BigInteger value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for cimUnsignedShort complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cimUnsignedShort">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>unsignedShort">
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cimUnsignedShort", namespace = "http://schemas.dmtf.org/wbem/wscim/1/common", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
VirtualSystemChangeableTypeType.class,
|
||||
ResourceAllocationChangeableTypeType.class
|
||||
})
|
||||
public class CimUnsignedShort {
|
||||
|
||||
@XmlValue
|
||||
@XmlSchemaType(name = "unsignedShort")
|
||||
protected int value;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
*/
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
*/
|
||||
public void setValue(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Java class for anonymous complex type.
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class ConsumerVisibility extends CimAnySimpleType {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* 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.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Java class for anonymous complex type.
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class MappingBehavior extends CimAnySimpleType {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
public class ResourceAllocationCaption
|
||||
extends JAXBElement<ResourceAllocationCaptionType>
|
||||
{
|
||||
|
||||
protected final static QName NAME = new QName("http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData", "Caption");
|
||||
|
||||
public ResourceAllocationCaption(ResourceAllocationCaptionType value) {
|
||||
super(NAME, ((Class) ResourceAllocationCaptionType.class), null, value);
|
||||
}
|
||||
|
||||
public ResourceAllocationCaption() {
|
||||
super(NAME, ((Class) ResourceAllocationCaptionType.class), null, null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <restriction base="<http://schemas.dmtf.org/wbem/wscim/1/common>cimString">
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class ResourceAllocationCaptionType
|
||||
extends CimString
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
public class ResourceAllocationChangeableType
|
||||
extends JAXBElement<ResourceAllocationChangeableTypeType>
|
||||
{
|
||||
|
||||
protected final static QName NAME = new QName("http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData", "ChangeableType");
|
||||
|
||||
public ResourceAllocationChangeableType(ResourceAllocationChangeableTypeType value) {
|
||||
super(NAME, ((Class) ResourceAllocationChangeableTypeType.class), null, value);
|
||||
}
|
||||
|
||||
public ResourceAllocationChangeableType() {
|
||||
super(NAME, ((Class) ResourceAllocationChangeableTypeType.class), null, null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <restriction base="<http://schemas.dmtf.org/wbem/wscim/1/common>cimUnsignedShort">
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class ResourceAllocationChangeableTypeType extends CimUnsignedShort {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <restriction base="<http://schemas.dmtf.org/wbem/wscim/1/common>cimAnySimpleType">
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class ResourceType
|
||||
extends CimAnySimpleType
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
public class VirtualSystemCaption
|
||||
extends JAXBElement<VirtualSystemCaptionType>
|
||||
{
|
||||
|
||||
protected final static QName NAME = new QName("http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData", "Caption");
|
||||
|
||||
public VirtualSystemCaption(VirtualSystemCaptionType value) {
|
||||
super(NAME, ((Class) VirtualSystemCaptionType.class), null, value);
|
||||
}
|
||||
|
||||
public VirtualSystemCaption() {
|
||||
super(NAME, ((Class) VirtualSystemCaptionType.class), null, null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <restriction base="<http://schemas.dmtf.org/wbem/wscim/1/common>cimString">
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class VirtualSystemCaptionType
|
||||
extends CimString
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
public class VirtualSystemChangeableType
|
||||
extends JAXBElement<VirtualSystemChangeableTypeType>
|
||||
{
|
||||
|
||||
protected final static QName NAME = new QName("http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData", "ChangeableType");
|
||||
|
||||
public VirtualSystemChangeableType(VirtualSystemChangeableTypeType value) {
|
||||
super(NAME, ((Class) VirtualSystemChangeableTypeType.class), null, value);
|
||||
}
|
||||
|
||||
public VirtualSystemChangeableType() {
|
||||
super(NAME, ((Class) VirtualSystemChangeableTypeType.class), null, null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.cim;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <simpleContent>
|
||||
* <restriction base="<http://schemas.dmtf.org/wbem/wscim/1/common>cimUnsignedShort">
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
public class VirtualSystemChangeableTypeType
|
||||
extends CimUnsignedShort
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -93,8 +93,8 @@ public class DeploymentOptionSection extends SectionType<DeploymentOptionSection
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<DeploymentOptionSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<DeploymentOptionSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -95,8 +95,8 @@ public class DiskSection extends SectionType<DiskSection> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<DiskSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<DiskSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
/*
|
||||
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||
* contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
|
@ -33,7 +33,6 @@ import com.google.common.collect.Multimap;
|
|||
@XmlRootElement(name = "Envelope", namespace = VCLOUD_OVF_NS)
|
||||
public class Envelope extends BaseEnvelope<VirtualSystem, Envelope> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -41,6 +40,7 @@ public class Envelope extends BaseEnvelope<VirtualSystem, Envelope> {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder toBuilder() {
|
||||
return new Builder().fromEnvelope(this);
|
||||
}
|
||||
|
@ -50,6 +50,7 @@ public class Envelope extends BaseEnvelope<VirtualSystem, Envelope> {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Envelope build() {
|
||||
return new Envelope(diskSections, networkSections, additionalSections, virtualSystem);
|
||||
}
|
||||
|
@ -57,18 +58,16 @@ public class Envelope extends BaseEnvelope<VirtualSystem, Envelope> {
|
|||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder additionalSection(String name, SectionType additionalSection) {
|
||||
public Builder additionalSection(String name, SectionType<?> additionalSection) {
|
||||
return Builder.class.cast(super.additionalSection(name, additionalSection));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder additionalSections(Multimap<String, SectionType> additionalSections) {
|
||||
public Builder additionalSections(Multimap<String, SectionType<?>> additionalSections) {
|
||||
return Builder.class.cast(super.additionalSections(additionalSections));
|
||||
}
|
||||
|
||||
|
@ -122,9 +121,8 @@ public class Envelope extends BaseEnvelope<VirtualSystem, Envelope> {
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private Envelope(Iterable<? extends DiskSection> diskSections, Iterable<? extends NetworkSection> networkSections,
|
||||
Multimap<String, SectionType> additionalSections, VirtualSystem virtualSystem) {
|
||||
Multimap<String, SectionType<?>> additionalSections, VirtualSystem virtualSystem) {
|
||||
super(diskSections, networkSections, additionalSections, virtualSystem);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,272 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="order" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" />
|
||||
* <attribute name="startDelay" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" default="0" />
|
||||
* <attribute name="waitingForGuest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
|
||||
* <attribute name="stopDelay" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" default="0" />
|
||||
* <attribute name="startAction" type="{http://www.w3.org/2001/XMLSchema}string" default="powerOn" />
|
||||
* <attribute name="stopAction" type="{http://www.w3.org/2001/XMLSchema}string" default="powerOff" />
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
@XmlSeeAlso({
|
||||
StartupSectionItem.class
|
||||
})
|
||||
public class Item {
|
||||
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1", required = true)
|
||||
protected String id;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1", required = true)
|
||||
@XmlSchemaType(name = "unsignedShort")
|
||||
protected int order;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
@XmlSchemaType(name = "unsignedShort")
|
||||
protected Integer startDelay;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
protected Boolean waitingForGuest;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
@XmlSchemaType(name = "unsignedShort")
|
||||
protected Integer stopDelay;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
protected String startAction;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
protected String stopAction;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the order property.
|
||||
*
|
||||
*/
|
||||
public int getOrder() {
|
||||
return order;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the order property.
|
||||
*
|
||||
*/
|
||||
public void setOrder(int value) {
|
||||
this.order = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the startDelay property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public int getStartDelay() {
|
||||
if (startDelay == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return startDelay;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the startDelay property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setStartDelay(Integer value) {
|
||||
this.startDelay = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the waitingForGuest property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public boolean isWaitingForGuest() {
|
||||
if (waitingForGuest == null) {
|
||||
return false;
|
||||
} else {
|
||||
return waitingForGuest;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the waitingForGuest property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public void setWaitingForGuest(Boolean value) {
|
||||
this.waitingForGuest = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the stopDelay property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public int getStopDelay() {
|
||||
if (stopDelay == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return stopDelay;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the stopDelay property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Integer }
|
||||
*
|
||||
*/
|
||||
public void setStopDelay(Integer value) {
|
||||
this.stopDelay = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the startAction property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getStartAction() {
|
||||
if (startAction == null) {
|
||||
return "powerOn";
|
||||
} else {
|
||||
return startAction;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the startAction property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setStartAction(String value) {
|
||||
this.startAction = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the stopAction property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getStopAction() {
|
||||
if (stopAction == null) {
|
||||
return "powerOff";
|
||||
} else {
|
||||
return stopAction;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the stopAction property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setStopAction(String value) {
|
||||
this.stopAction = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -87,8 +87,8 @@ public class NetworkSection extends SectionType<NetworkSection> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<NetworkSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<NetworkSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -93,8 +93,8 @@ public class OperatingSystemSection extends SectionType<OperatingSystemSection>
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<OperatingSystemSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<OperatingSystemSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -91,8 +91,8 @@ public class ProductSection extends SectionType<ProductSection> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<ProductSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<ProductSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.cim.CIMResourceAllocationSettingDataType;
|
||||
|
||||
|
||||
/**
|
||||
* Wrapper for CIM_ResourceAllocationSettingData_Type
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="RASD_Type" />
|
||||
* </pre>
|
||||
*
|
||||
* @author grkvlt@apache.org
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "RASD_Type")
|
||||
public class RASD extends CIMResourceAllocationSettingDataType {
|
||||
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
protected Boolean required;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
protected String configuration;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/envelope/1")
|
||||
protected String bound;
|
||||
|
||||
/**
|
||||
* Gets the value of the required property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public boolean isRequired() {
|
||||
if (required == null) {
|
||||
return true;
|
||||
} else {
|
||||
return required;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the required property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
public void setRequired(Boolean value) {
|
||||
this.required = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the configuration property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getConfiguration() {
|
||||
return configuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the configuration property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setConfiguration(String value) {
|
||||
this.configuration = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the bound property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getBound() {
|
||||
return bound;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the bound property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setBound(String value) {
|
||||
this.bound = value;
|
||||
}
|
||||
|
||||
}
|
|
@ -81,7 +81,7 @@ public abstract class SectionType<T extends SectionType<T>> {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder<T> fromSection(SectionType<T> in) {
|
||||
public Builder<T> fromSectionType(SectionType<T> in) {
|
||||
return info(in.getInfo()).required(in.isRequired());
|
||||
}
|
||||
}
|
||||
|
@ -110,6 +110,10 @@ public abstract class SectionType<T extends SectionType<T>> {
|
|||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Boolean isRequired() {
|
||||
return required;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
/**
|
||||
* Specifies the order in which entities in a VirtualSystemCollection are powered on and shut down
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="StartupSection_Type" />
|
||||
* </pre>
|
||||
*/
|
||||
@XmlRootElement(name = "StartupSection", namespace = VCLOUD_OVF_NS)
|
||||
public class StartupSection extends SectionType<StartupSection> {
|
||||
|
||||
/** @see org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType#toBuilder() */
|
||||
@Override
|
||||
public org.jclouds.vcloud.director.v1_5.domain.ovf.SectionType.Builder<StartupSection> toBuilder() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@XmlElement(name = "Item")
|
||||
protected List<StartupSectionItem> item;
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any;
|
||||
|
||||
/**
|
||||
* Gets the value of the item property.
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned
|
||||
* list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the item property.
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
*
|
||||
* <pre>
|
||||
* getItem().add(newItem);
|
||||
* </pre>
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list {@link StartupSectionItem }
|
||||
*/
|
||||
public List<StartupSectionItem> getItem() {
|
||||
if (item == null) {
|
||||
item = new ArrayList<StartupSectionItem>();
|
||||
}
|
||||
return this.item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned
|
||||
* list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the any property.
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
*
|
||||
* <pre>
|
||||
* getAny().add(newItem);
|
||||
* </pre>
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list {@link Object } {@link Element }
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
if (any == null) {
|
||||
any = new ArrayList<Object>();
|
||||
}
|
||||
return this.any;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.02.08 at 02:47:44 PM GMT
|
||||
//
|
||||
|
||||
|
||||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for Item element declaration.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <element name="Item">
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="order" use="required" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" />
|
||||
* <attribute name="startDelay" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" default="0" />
|
||||
* <attribute name="waitingForGuest" type="{http://www.w3.org/2001/XMLSchema}boolean" default="false" />
|
||||
* <attribute name="stopDelay" type="{http://www.w3.org/2001/XMLSchema}unsignedShort" default="0" />
|
||||
* <attribute name="startAction" type="{http://www.w3.org/2001/XMLSchema}string" default="powerOn" />
|
||||
* <attribute name="stopAction" type="{http://www.w3.org/2001/XMLSchema}string" default="powerOff" />
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </element>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "")
|
||||
@XmlRootElement(name = "Item")
|
||||
public class StartupSectionItem
|
||||
extends Item
|
||||
{
|
||||
|
||||
|
||||
}
|
|
@ -18,8 +18,8 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.*;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -46,7 +46,6 @@ import com.google.common.collect.Sets;
|
|||
@XmlRootElement(name = "VirtualHardwareSection", namespace = VCLOUD_OVF_NS)
|
||||
public class VirtualHardwareSection extends SectionType<VirtualHardwareSection> {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Builder builder() {
|
||||
return new Builder();
|
||||
}
|
||||
|
@ -114,7 +113,7 @@ public class VirtualHardwareSection extends SectionType<VirtualHardwareSection>
|
|||
}
|
||||
|
||||
public Builder fromVirtualHardwareSection(VirtualHardwareSection in) {
|
||||
return fromSection(in).items(in.getItems()).transports(in.getTransports()).system(
|
||||
return fromSectionType(in).items(in.getItems()).transports(in.getTransports()).system(
|
||||
in.getSystem()).info(in.getInfo());
|
||||
}
|
||||
|
||||
|
@ -122,8 +121,8 @@ public class VirtualHardwareSection extends SectionType<VirtualHardwareSection>
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<VirtualHardwareSection> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<VirtualHardwareSection> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.vcloud.director.v1_5.domain.ovf;
|
||||
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.VCLOUD_OVF_NS;
|
||||
import static org.jclouds.vcloud.director.v1_5.VCloudDirectorConstants.*;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
@ -50,25 +50,22 @@ public class VirtualSystem extends BaseVirtualSystem<VirtualSystem> {
|
|||
*/
|
||||
@Override
|
||||
public VirtualSystem build() {
|
||||
return new VirtualSystem(id, info, required, name, operatingSystem, virtualHardwareSections, productSections,
|
||||
additionalSections);
|
||||
return new VirtualSystem(id, info, required, name, operatingSystem, virtualHardwareSections, productSections, additionalSections);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder additionalSection(String name, SectionType additionalSection) {
|
||||
public Builder additionalSection(String name, SectionType<?> additionalSection) {
|
||||
return Builder.class.cast(super.additionalSection(name, additionalSection));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Builder additionalSections(Multimap<String, SectionType> additionalSections) {
|
||||
public Builder additionalSections(Multimap<String, SectionType<?>> additionalSections) {
|
||||
return Builder.class.cast(super.additionalSections(additionalSections));
|
||||
}
|
||||
|
||||
|
@ -76,8 +73,8 @@ public class VirtualSystem extends BaseVirtualSystem<VirtualSystem> {
|
|||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public Builder fromSection(SectionType<VirtualSystem> in) {
|
||||
return Builder.class.cast(super.fromSection(in));
|
||||
public Builder fromSectionType(SectionType<VirtualSystem> in) {
|
||||
return Builder.class.cast(super.fromSectionType(in));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -164,7 +161,7 @@ public class VirtualSystem extends BaseVirtualSystem<VirtualSystem> {
|
|||
|
||||
private VirtualSystem(String id, String info, @Nullable Boolean required, String name, OperatingSystemSection operatingSystem,
|
||||
Iterable<? extends VirtualHardwareSection> virtualHardwareSections,
|
||||
Iterable<? extends ProductSection> productSections, Multimap<String, SectionType> additionalSections) {
|
||||
Iterable<? extends ProductSection> productSections, Multimap<String, SectionType<?>> additionalSections) {
|
||||
super(id, info, required, name, operatingSystem, virtualHardwareSections, productSections, additionalSections);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,181 @@
|
|||
/*
|
||||
* 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.ovf.environment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.namespace.QName;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
||||
/**
|
||||
* Container of sections for a specific entity
|
||||
*
|
||||
*
|
||||
* <p>Java class for Entity_Type complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="Entity_Type">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://schemas.dmtf.org/ovf/environment/1}Section" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "Entity_Type", propOrder = {
|
||||
"section",
|
||||
"any"
|
||||
})
|
||||
public class EntityType {
|
||||
|
||||
@XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/environment/1", type = JAXBElement.class)
|
||||
protected List<JAXBElement<? extends SectionType>> section;
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/environment/1", required = true)
|
||||
protected String id;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Gets the value of the section property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the section property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getSection().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link JAXBElement }{@code <}{@link SectionType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link PropertySectionType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link PlatformSectionType }{@code >}
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<JAXBElement<? extends SectionType>> getSection() {
|
||||
if (section == null) {
|
||||
section = new ArrayList<JAXBElement<? extends SectionType>>();
|
||||
}
|
||||
return this.section;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the any property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAny().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Object }
|
||||
* {@link Element }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
if (any == null) {
|
||||
any = new ArrayList<Object>();
|
||||
}
|
||||
return this.any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,219 @@
|
|||
/*
|
||||
* 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.ovf.environment;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyAttribute;
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.namespace.QName;
|
||||
import org.w3c.dom.Element;
|
||||
|
||||
|
||||
/**
|
||||
* Type for root OVF environment
|
||||
*
|
||||
* <p>Java class for Environment_Type complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="Environment_Type">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://schemas.dmtf.org/ovf/environment/1}Section" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="Entity" type="{http://schemas.dmtf.org/ovf/environment/1}Entity_Type" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" default="" />
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "Environment_Type", propOrder = {
|
||||
"section",
|
||||
"entity",
|
||||
"any"
|
||||
})
|
||||
public class EnvironmentType {
|
||||
|
||||
@XmlElementRef(name = "Section", namespace = "http://schemas.dmtf.org/ovf/environment/1", type = JAXBElement.class)
|
||||
protected List<JAXBElement<? extends SectionType>> section;
|
||||
@XmlElement(name = "Entity")
|
||||
protected List<EntityType> entity;
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any;
|
||||
@XmlAttribute(namespace = "http://schemas.dmtf.org/ovf/environment/1")
|
||||
protected String id;
|
||||
@XmlAnyAttribute
|
||||
private Map<QName, String> otherAttributes = new HashMap<QName, String>();
|
||||
|
||||
/**
|
||||
* Entity independent meta-data
|
||||
* sections Gets the value of the section property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the section property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getSection().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link JAXBElement }{@code <}{@link SectionType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link PropertySectionType }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link PlatformSectionType }{@code >}
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<JAXBElement<? extends SectionType>> getSection() {
|
||||
if (section == null) {
|
||||
section = new ArrayList<JAXBElement<? extends SectionType>>();
|
||||
}
|
||||
return this.section;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the entity property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the entity property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getEntity().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link EntityType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<EntityType> getEntity() {
|
||||
if (entity == null) {
|
||||
entity = new ArrayList<EntityType>();
|
||||
}
|
||||
return this.entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
*
|
||||
* <p>
|
||||
* This accessor method returns a reference to the live list,
|
||||
* not a snapshot. Therefore any modification you make to the
|
||||
* returned list will be present inside the JAXB object.
|
||||
* This is why there is not a <CODE>set</CODE> method for the any property.
|
||||
*
|
||||
* <p>
|
||||
* For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAny().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* Objects of the following type(s) are allowed in the list
|
||||
* {@link Object }
|
||||
* {@link Element }
|
||||
*
|
||||
*
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
if (any == null) {
|
||||
any = new ArrayList<Object>();
|
||||
}
|
||||
return this.any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public String getId() {
|
||||
if (id == null) {
|
||||
return "";
|
||||
} else {
|
||||
return id;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map that contains attributes that aren't bound to any typed property on this class.
|
||||
*
|
||||
* <p>
|
||||
* the map is keyed by the name of the attribute and
|
||||
* the value is the string value of the attribute.
|
||||
*
|
||||
* the map returned by this method is live, and you can add new attribute
|
||||
* by updating the map directly. Because of this design, there's no setter.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
* always non-null
|
||||
*/
|
||||
public Map<QName, String> getOtherAttributes() {
|
||||
return otherAttributes;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
* 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.ovf.environment;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAnyElement;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
import org.jclouds.vcloud.director.v1_5.domain.cim.CimString;
|
||||
|
||||
/**
|
||||
* Information about deployment platform
|
||||
* <p>
|
||||
* Java class for PlatformSection_Type complex type.
|
||||
* <p>
|
||||
* The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="PlatformSection_Type">
|
||||
* <complexContent>
|
||||
* <extension base="{http://schemas.dmtf.org/ovf/environment/1}Section_Type">
|
||||
* <sequence>
|
||||
* <element name="Kind" type="{http://schemas.dmtf.org/wbem/wscim/1/common}cimString" minOccurs="0"/>
|
||||
* <element name="Version" type="{http://schemas.dmtf.org/wbem/wscim/1/common}cimString" minOccurs="0"/>
|
||||
* <element name="Vendor" type="{http://schemas.dmtf.org/wbem/wscim/1/common}cimString" minOccurs="0"/>
|
||||
* <element name="Locale" type="{http://schemas.dmtf.org/wbem/wscim/1/common}cimString" minOccurs="0"/>
|
||||
* <element name="Timezone" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
|
||||
* <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <anyAttribute processContents='lax'/>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "PlatformSection_Type", propOrder = { "kind", "version", "vendor", "locale", "timezone", "any" })
|
||||
public class PlatformSectionType extends SectionType {
|
||||
|
||||
@XmlElement(name = "Kind")
|
||||
protected CimString kind;
|
||||
@XmlElement(name = "Version")
|
||||
protected CimString version;
|
||||
@XmlElement(name = "Vendor")
|
||||
protected CimString vendor;
|
||||
@XmlElement(name = "Locale")
|
||||
protected CimString locale;
|
||||
@XmlElement(name = "Timezone")
|
||||
protected Integer timezone;
|
||||
@XmlAnyElement(lax = true)
|
||||
protected List<Object> any;
|
||||
|
||||
/**
|
||||
* Gets the value of the kind property.
|
||||
*/
|
||||
public CimString getKind() {
|
||||
return kind;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the version property.
|
||||
*/
|
||||
public CimString getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the vendor property.
|
||||
*/
|
||||
public CimString getVendor() {
|
||||
return vendor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the locale property.
|
||||
*/
|
||||
public CimString getLocale() {
|
||||
return locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the timezone property.
|
||||
*/
|
||||
public Integer getTimezone() {
|
||||
return timezone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the any property.
|
||||
*/
|
||||
public List<Object> getAny() {
|
||||
return any;
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue