summaryrefslogtreecommitdiffstats
path: root/nokiav2/generatedapis
diff options
context:
space:
mode:
Diffstat (limited to 'nokiav2/generatedapis')
-rw-r--r--nokiav2/generatedapis/pom.xml6
-rw-r--r--nokiav2/generatedapis/src/main/resources/patch183
2 files changed, 3 insertions, 186 deletions
diff --git a/nokiav2/generatedapis/pom.xml b/nokiav2/generatedapis/pom.xml
index be2dc46f..3dfeba34 100644
--- a/nokiav2/generatedapis/pom.xml
+++ b/nokiav2/generatedapis/pom.xml
@@ -40,7 +40,7 @@
</goals>
<configuration>
<inputSpec>${basedir}/src/main/resources/nokia.vnfm.api.v3.lcm.json</inputSpec>
- <language>com.nokia.cbam.swagger.CbamJavaClientCodegen</language>
+ <language>java</language>
<output>${project.build.directory}/generated-sources/cbam</output>
<apiPackage>com.nokia.cbam.lcm.v32.api</apiPackage>
<modelPackage>com.nokia.cbam.lcm.v32.model</modelPackage>
@@ -59,7 +59,7 @@
</goals>
<configuration>
<inputSpec>${basedir}/src/main/resources/nokia.vnfm.api.v3.lcn.subscription.json</inputSpec>
- <language>com.nokia.cbam.swagger.CbamJavaClientCodegen</language>
+ <language>java</language>
<output>${project.build.directory}/generated-sources/cbam</output>
<apiPackage>com.nokia.cbam.lcn.v32.api</apiPackage>
<modelPackage>com.nokia.cbam.lcn.v32.model</modelPackage>
@@ -76,7 +76,7 @@
</goals>
<configuration>
<inputSpec>${basedir}/src/main/resources/nokia.catalog.json</inputSpec>
- <language>com.nokia.cbam.swagger.CbamJavaClientCodegen</language>
+ <language>java</language>
<output>${project.build.directory}/generated-sources/cbam</output>
<apiPackage>com.nokia.cbam.catalog.v1.api</apiPackage>
<modelPackage>com.nokia.cbam.catalog.v1.model</modelPackage>
diff --git a/nokiav2/generatedapis/src/main/resources/patch b/nokiav2/generatedapis/src/main/resources/patch
index e19dd1a0..562c7a1d 100644
--- a/nokiav2/generatedapis/src/main/resources/patch
+++ b/nokiav2/generatedapis/src/main/resources/patch
@@ -1,186 +1,3 @@
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java 2018-02-19 17:32:34.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/JSON.java 2018-02-19 17:34:43.000000000 +0100
-@@ -13,14 +13,12 @@
-
- package com.nokia.cbam.lcm.v32;
-
--import com.google.gson.Gson;
--import com.google.gson.GsonBuilder;
--import com.google.gson.JsonParseException;
--import com.google.gson.TypeAdapter;
-+import com.google.gson.*;
-+import com.google.gson.internal.Streams;
- import com.google.gson.internal.bind.util.ISO8601Utils;
- import com.google.gson.stream.JsonReader;
-+import com.google.gson.stream.JsonToken;
- import com.google.gson.stream.JsonWriter;
--import com.google.gson.JsonElement;
- import io.gsonfire.GsonFireBuilder;
- import io.gsonfire.TypeSelector;
- import org.threeten.bp.LocalDate;
-@@ -46,6 +44,8 @@
- private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
- private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
- private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
-+ private VimInfoTypeAdapter vimInfoTypeAdapter = new VimInfoTypeAdapter();
-+ private LcnAdapter lcnAdapter = new LcnAdapter();
-
- public static GsonBuilder createGson() {
- GsonFireBuilder fireBuilder = new GsonFireBuilder()
-@@ -75,6 +75,8 @@
- .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
- .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
- .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
-+ .registerTypeAdapter(VimInfo.class, vimInfoTypeAdapter)
-+ .registerTypeAdapter(AbstractVnfNotification.class, lcnAdapter)
- .create();
- }
-
-@@ -349,6 +351,67 @@
- }
- }
-
-+ static abstract class AbstractTypeAdapter<T> extends TypeAdapter<T>{
-+
-+ @Override
-+ public void write(JsonWriter out, T value) throws IOException {
-+ out.jsonValue(new Gson().toJson(value));
-+ }
-+
-+ @Override
-+ public T read(JsonReader in) throws IOException {
-+ switch (in.peek()) {
-+ case NULL:
-+ in.nextNull();
-+ return null;
-+ default:
-+ JsonElement object = Streams.parse(in);
-+ String type = object.getAsJsonObject().get(getTypeField()).getAsString();
-+ Type typeOfT = getTypeMap().get(type);
-+ return new Gson().fromJson(object, typeOfT);
-+ }
-+ }
-+
-+ abstract protected String getTypeField();
-+ abstract protected Map<String, Type> getTypeMap();
-+
-+ }
-+
-+ public static class VimInfoTypeAdapter extends AbstractTypeAdapter<VimInfo> {
-+
-+ @Override
-+ protected String getTypeField() {
-+ return "vimInfoType";
-+ }
-+
-+ @Override
-+ protected Map<String, Type> getTypeMap() {
-+ Map<String,Type> myMap = new HashMap<String,Type>();
-+ myMap.put(VimInfo.VimInfoTypeEnum.OPENSTACK_V2_INFO.name(), OPENSTACKV2INFO.class);
-+ myMap.put(VimInfo.VimInfoTypeEnum.OPENSTACK_V3_INFO.name(), OPENSTACKV3INFO.class);
-+ myMap.put(VimInfo.VimInfoTypeEnum.VMWARE_VCLOUD_INFO.name(), VMWAREVCLOUDINFO.class);
-+ return myMap;
-+ }
-+ }
-+
-+ public static class LcnAdapter extends AbstractTypeAdapter<AbstractVnfNotification>{
-+ @Override
-+ protected String getTypeField() {
-+ return "notificationType";
-+ }
-+
-+ @Override
-+ protected Map<String, Type> getTypeMap() {
-+ Map<String,Type> myMap = new HashMap<String,Type>();
-+ myMap.put(VnfNotificationType.VNFIDENTIFIERCREATIONNOTIFICATION.name(), VnfIdentifierCreationNotification.class);
-+ myMap.put(VnfNotificationType.VNFIDENTIFIERDELETIONNOTIFICATION.name(), VnfIdentifierDeletionNotification.class);
-+ myMap.put(VnfNotificationType.VNFINFOATTRIBUTEVALUECHANGENOTIFICATION.name(), VnfInfoAttributeValueChangeNotification.class);
-+ myMap.put(VnfNotificationType.VNFLIFECYCLECHANGENOTIFICATION.name(), VnfLifecycleChangeNotification.class);
-+ myMap.put(VnfNotificationType.OTHERNOTIFICATION.name(), OtherNotification.class);
-+ return myMap;
-+ }
-+ }
-+
- public JSON setDateFormat(DateFormat dateFormat) {
- dateTypeAdapter.setFormat(dateFormat);
- return this;
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OTHERVIMINFO.java 2018-02-19 17:34:43.000000000 +0100
-@@ -43,13 +43,13 @@
- return false;
- }
- OTHERVIMINFO OTHER_VIM_INFO = (OTHERVIMINFO) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash( super.hashCode());
- }
-
-
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/OtherNotification.java 2018-02-19 17:34:43.000000000 +0100
-@@ -45,13 +45,13 @@
- return false;
- }
- OtherNotification otherNotification = (OtherNotification) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash( super.hashCode());
- }
-
-
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierCreationNotification.java 2018-02-19 17:34:43.000000000 +0100
-@@ -45,13 +45,13 @@
- return false;
- }
- VnfIdentifierCreationNotification vnfIdentifierCreationNotification = (VnfIdentifierCreationNotification) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash(super.hashCode());
- }
-
-
-diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java
---- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java 2018-02-19 17:32:33.000000000 +0100
-+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfIdentifierDeletionNotification.java 2018-02-19 17:34:43.000000000 +0100
-@@ -45,13 +45,13 @@
- return false;
- }
- VnfIdentifierDeletionNotification vnfIdentifierDeletionNotification = (VnfIdentifierDeletionNotification) o;
-- return &&
-+ return
- super.equals(o);
- }
-
- @Override
- public int hashCode() {
-- return Objects.hash(, super.hashCode());
-+ return Objects.hash( super.hashCode());
- }
-
-
diff -Naur old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java
--- old/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java 2018-02-19 17:32:33.000000000 +0100
+++ new/cbam/src/gen/java/main/com/nokia/cbam/lcm/v32/model/VnfProperty.java 2018-02-19 17:38:08.000000000 +0100