diff --git a/bindings-generator/pom.xml b/bindings-generator/pom.xml
index 9eae5e7..dd26e8b 100644
--- a/bindings-generator/pom.xml
+++ b/bindings-generator/pom.xml
@@ -11,14 +11,14 @@
com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.3.0${project.artifactId} :: Bindings generation utilityProvides custom API bindings generation beyond what can be accomplished with xjc and OpenAPI3.7
- 1.8
+ 112.3.01.721.2.3
diff --git a/pom.xml b/pom.xml
index 4d93571..7af5d54 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,14 +1,9 @@
-
4.0.0com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.3.0pom${project.artifactId} :: vCloud Director REST API tooling parentParent project housing tools and utilities to process vCloud Director APIs and build bindings
diff --git a/vcd-bindings-maven-plugin/pom.xml b/vcd-bindings-maven-plugin/pom.xml
index e703ad0..08ee1a4 100644
--- a/vcd-bindings-maven-plugin/pom.xml
+++ b/vcd-bindings-maven-plugin/pom.xml
@@ -12,7 +12,7 @@
com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.3.0${project.artifactId} :: Maven plugin wrapper for bindings generation utility
@@ -40,13 +40,13 @@
maven-compiler-plugin2.5.1
- 1.8
- 1.8
+ 11
+ 11maven-plugin-plugin
- 3.5.1
+ 3.6.0com.vmware.vcloud:vcd-bindings-maven-plugin
diff --git a/vcd-xjc-plugins/pom.xml b/vcd-xjc-plugins/pom.xml
index 2421c71..f6006fb 100644
--- a/vcd-xjc-plugins/pom.xml
+++ b/vcd-xjc-plugins/pom.xml
@@ -10,7 +10,7 @@
com.vmware.vcloudvcd-api-tooling-parent
- 9.7
+ 10.3.0jar${project.artifactId} :: Custom plugins for XML to Java Compilation
@@ -29,12 +29,37 @@
com.fasterxml.jackson.corejackson-annotations
-
com.fasterxml.jackson.corejackson-databind2.12.2
-
-
+
+
+ javax.ws.rs
+ javax.ws.rs-api
+ 2.0.1
+
+
+ org.apache.commons
+ commons-lang3
+ 3.7
+
+
+ org.apache.cxf
+ cxf-core
+ 3.1.11
+
+
+
+
+ maven-compiler-plugin
+
+ utf8
+ 11
+ 11
+
+
+
+
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/CrossReferences.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/CrossReferences.java
new file mode 100644
index 0000000..d26f22a
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/CrossReferences.java
@@ -0,0 +1,50 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Indicates properties that are not explicitly contained in the model object, but can be
+ * used to filter a query on the model object.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.TYPE, ElementType.METHOD })
+public @interface CrossReferences {
+ /**
+ * The alias name for the cross referenced property.
+ *
+ * E.g: computePolicyType in OrgVdc that refers to policyType in VdcComputePolicy
+ */
+ String[] aliases();
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/DefaultSort.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/DefaultSort.java
new file mode 100644
index 0000000..88ca96a
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/DefaultSort.java
@@ -0,0 +1,56 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation denotes the default field and direction the annotated method can use to determine
+ * how it should sort it's return values in the case when the caller has not provided this
+ * information.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.METHOD })
+public @interface DefaultSort {
+
+ /**
+ * Default field to be used when sorting results.
+ */
+ String defaultSortField();
+
+ /**
+ * Determines direction of sort, ascending if "true".
+ */
+ boolean sortAscending();
+
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Event.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Event.java
new file mode 100644
index 0000000..1dcfb2d
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Event.java
@@ -0,0 +1,50 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Used to annotate methods that have an associated Audit Trail API Event.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Event {
+
+ /**
+ * The name of the EventTopic to look up an associated Builder implementation of.
+ *
+ * @return the String name of the EventTopic.
+ */
+ String eventTopicName();
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/LinkParamName.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/LinkParamName.java
new file mode 100644
index 0000000..f038d06
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/LinkParamName.java
@@ -0,0 +1,48 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.PARAMETER;
+
+/**
+ * This annotation is generated by the Swagger code generator on all parameters on all API methods.
+ * It is used to match up link parameter names during link generation.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ PARAMETER })
+public @interface LinkParamName {
+
+ String value();
+
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/MultiSite.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/MultiSite.java
new file mode 100644
index 0000000..b0c4c5e
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/MultiSite.java
@@ -0,0 +1,79 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.xml.bind.JAXBElement;
+
+import com.vmware.vcloud.api.rest.version.ApiVersion;
+
+
+/**
+ * Indicates that a handler method can handle multi-site requests. A list of collection field names
+ * to be merged in the result body can be optionally specified. A custom response builder class can
+ * also be optionallyspecified to handle aggregation of the federated responses. If neither is
+ * specified, default aggregation implementation will be applied to the results.
+ */
+@Inherited
+@Target({ ElementType.TYPE, ElementType.METHOD })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MultiSite {
+
+ /**
+ * Specifies the list of collection names in a {@link JAXBElement} type that should be merged to
+ * create a multi-site response. i.e. the contents of independent response objects from multiple
+ * associated Org endpoints will be merged into a single collection in the response object
+ */
+ String[] mergeCollections() default {};
+
+ /**
+ * Specifies a custom class to use to build a multi-site response object. If none specified, a
+ * default multi-site response builder will be used to construct a multi-site response for the
+ * request. Any mrgeCollections value is ignored if a custom response builder is specified
+ */
+ Class> customResponseBuilder() default Object.class;
+
+ /**
+ * Specifies an {@link ApiVersion.Alias} to add support for multi-site request fanout. If none
+ * specified, a default {@code ApiVersion.Alias.MULTI_SITE} is used
+ */
+ ApiVersion.Alias addedIn() default ApiVersion.Alias.MULTI_SITE;
+
+ /**
+ * Specifies an {@link ApiVersion.Alias} to remove support for multi-site request fanout. If
+ * none specified, a default {@code ApiVersion.Alias.FUTURE} is used
+ */
+ ApiVersion.Alias removedIn() default ApiVersion.Alias.FUTURE;
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Password.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Password.java
new file mode 100644
index 0000000..7f02e60
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Password.java
@@ -0,0 +1,46 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * This annotation denotes that the annotated field contains a password.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.FIELD })
+public @interface Password {
+
+
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Restricted.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Restricted.java
new file mode 100644
index 0000000..9944db7
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Restricted.java
@@ -0,0 +1,46 @@
+package com.vmware.vcloud.api.annotation;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation denotes that the annotated field is potentially restricted. Before writing out or
+ * reading in this field, the API framework should determine if the caller is allowed to see/use the
+ * field.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ ElementType.FIELD })
+public @interface Restricted {
+
+}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java
index ef9b15e..ae216bb 100644
--- a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/annotation/Supported.java
@@ -4,7 +4,7 @@
* #%L
* vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
* %%
- * Copyright (C) 2018 VMware, Inc.
+ * Copyright (C) 2018 - 2021 VMware, Inc.
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -36,28 +36,26 @@
/**
* This annotation denotes when the specific feature was introduced to the
- * REST-API and if and when it was removed.
- *
- * A feature is present starting from {@link #addedIn()} version inclusive, to
- * {@link #removedIn()} exclusive.
- *
- * This annotation is added automatically to the JAXB generated classes.
+ * REST-API and if and when it was removed. This annotation is added
+ * automatically to the JAXB generated classes.
+ *
+ * The feature is present starting from {@link #addedIn()} version inclusive, to
+ * {@link #removedIn()} exclusive.
+ *
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.FIELD, ElementType.METHOD, ElementType.TYPE })
public @interface Supported {
+ public static final String VCLOUD_LEGACY_FILTER_PARAM = "vcloud_legacy";
+
/**
- * Version in which the feature was added, inclusive.
- *
- * @return a version string
+ * Version in which the feature was added.
*/
String addedIn();
/**
- * Version in which the feature was removed, exclusive.
- *
- * @return a version string
+ * Version in which the feature was removed.
*/
String removedIn() default "";
}
diff --git a/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/http/converters/JAXBElementConverter.java b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/http/converters/JAXBElementConverter.java
new file mode 100644
index 0000000..cd29262
--- /dev/null
+++ b/vcd-xjc-plugins/src/main/java/com/vmware/vcloud/api/http/converters/JAXBElementConverter.java
@@ -0,0 +1,137 @@
+package com.vmware.vcloud.api.http.converters;
+
+/*-
+ * #%L
+ * vcd-xjc-plugins :: Custom plugins for XML to Java Compilation
+ * %%
+ * Copyright (C) 2018 - 2021 VMware, Inc.
+ * %%
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ * #L%
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import javax.xml.bind.JAXBElement;
+
+
+/**
+ * Converts an xsd-generated type into a {@link JAXBElement} wrapped representation
+ */
+public class JAXBElementConverter {
+
+ private static class ObjectFactoryInvocation {
+ final Object objectFactory;
+ final Method factoryMethod;
+
+ ObjectFactoryInvocation(Object objectFactory, Method factoryMethod) {
+ this.objectFactory = objectFactory;
+ this.factoryMethod = factoryMethod;
+ }
+
+ public JAXBElement> convert(Object value) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException {
+ return (JAXBElement>) factoryMethod.invoke(objectFactory, value);
+ }
+ }
+
+
+ private final List