aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/pomba/contextbuilder/aai/datatype
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/pomba/contextbuilder/aai/datatype')
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelatedToProperty.java91
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/Relationship.java121
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipDatum.java91
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipList.java81
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/ServiceInstance.java231
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModule.java210
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModules.java81
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfInstance.java440
-rw-r--r--src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfcInstance.java231
9 files changed, 1577 insertions, 0 deletions
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelatedToProperty.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelatedToProperty.java
new file mode 100644
index 0000000..88b9d7a
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelatedToProperty.java
@@ -0,0 +1,91 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class RelatedToProperty {
+
+ @SerializedName("property-key")
+ @Expose
+ private String propertyKey;
+ @SerializedName("property-value")
+ @Expose
+ private String propertyValue;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public RelatedToProperty() {
+ }
+
+ /**
+ *
+ * @param propertyKey
+ * @param propertyValue
+ */
+ public RelatedToProperty(String propertyKey, String propertyValue) {
+ super();
+ this.propertyKey = propertyKey;
+ this.propertyValue = propertyValue;
+ }
+
+ public String getPropertyKey() {
+ return propertyKey;
+ }
+
+ public void setPropertyKey(String propertyKey) {
+ this.propertyKey = propertyKey;
+ }
+
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ public void setPropertyValue(String propertyValue) {
+ this.propertyValue = propertyValue;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("propertyKey", propertyKey).append("propertyValue", propertyValue).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(propertyKey).append(propertyValue).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof RelatedToProperty)) {
+ return false;
+ }
+ RelatedToProperty rhs = ((RelatedToProperty) other);
+ return new EqualsBuilder().append(propertyKey, rhs.propertyKey).append(propertyValue, rhs.propertyValue).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/Relationship.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/Relationship.java
new file mode 100644
index 0000000..edf9d84
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/Relationship.java
@@ -0,0 +1,121 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import java.util.List;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class Relationship {
+
+ @SerializedName("related-to")
+ @Expose
+ private String relatedTo;
+ @SerializedName("related-link")
+ @Expose
+ private String relatedLink;
+ @SerializedName("relationship-data")
+ @Expose
+ @Valid
+ private List<RelationshipDatum> relationshipData = null;
+ @SerializedName("related-to-property")
+ @Expose
+ @Valid
+ private List<RelatedToProperty> relatedToProperty = null;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public Relationship() {
+ }
+
+ /**
+ *
+ * @param relatedToProperty
+ * @param relatedLink
+ * @param relationshipData
+ * @param relatedTo
+ */
+ public Relationship(String relatedTo, String relatedLink, List<RelationshipDatum> relationshipData, List<RelatedToProperty> relatedToProperty) {
+ super();
+ this.relatedTo = relatedTo;
+ this.relatedLink = relatedLink;
+ this.relationshipData = relationshipData;
+ this.relatedToProperty = relatedToProperty;
+ }
+
+ public String getRelatedTo() {
+ return relatedTo;
+ }
+
+ public void setRelatedTo(String relatedTo) {
+ this.relatedTo = relatedTo;
+ }
+
+ public String getRelatedLink() {
+ return relatedLink;
+ }
+
+ public void setRelatedLink(String relatedLink) {
+ this.relatedLink = relatedLink;
+ }
+
+ public List<RelationshipDatum> getRelationshipData() {
+ return relationshipData;
+ }
+
+ public void setRelationshipData(List<RelationshipDatum> relationshipData) {
+ this.relationshipData = relationshipData;
+ }
+
+ public List<RelatedToProperty> getRelatedToProperty() {
+ return relatedToProperty;
+ }
+
+ public void setRelatedToProperty(List<RelatedToProperty> relatedToProperty) {
+ this.relatedToProperty = relatedToProperty;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("relatedTo", relatedTo).append("relatedLink", relatedLink).append("relationshipData", relationshipData).append("relatedToProperty", relatedToProperty).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(relatedToProperty).append(relatedLink).append(relationshipData).append(relatedTo).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof Relationship)) {
+ return false;
+ }
+ Relationship rhs = ((Relationship) other);
+ return new EqualsBuilder().append(relatedToProperty, rhs.relatedToProperty).append(relatedLink, rhs.relatedLink).append(relationshipData, rhs.relationshipData).append(relatedTo, rhs.relatedTo).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipDatum.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipDatum.java
new file mode 100644
index 0000000..9d50ed9
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipDatum.java
@@ -0,0 +1,91 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class RelationshipDatum {
+
+ @SerializedName("relationship-key")
+ @Expose
+ private String relationshipKey;
+ @SerializedName("relationship-value")
+ @Expose
+ private String relationshipValue;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public RelationshipDatum() {
+ }
+
+ /**
+ *
+ * @param relationshipValue
+ * @param relationshipKey
+ */
+ public RelationshipDatum(String relationshipKey, String relationshipValue) {
+ super();
+ this.relationshipKey = relationshipKey;
+ this.relationshipValue = relationshipValue;
+ }
+
+ public String getRelationshipKey() {
+ return relationshipKey;
+ }
+
+ public void setRelationshipKey(String relationshipKey) {
+ this.relationshipKey = relationshipKey;
+ }
+
+ public String getRelationshipValue() {
+ return relationshipValue;
+ }
+
+ public void setRelationshipValue(String relationshipValue) {
+ this.relationshipValue = relationshipValue;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("relationshipKey", relationshipKey).append("relationshipValue", relationshipValue).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(relationshipValue).append(relationshipKey).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof RelationshipDatum)) {
+ return false;
+ }
+ RelationshipDatum rhs = ((RelationshipDatum) other);
+ return new EqualsBuilder().append(relationshipValue, rhs.relationshipValue).append(relationshipKey, rhs.relationshipKey).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipList.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipList.java
new file mode 100644
index 0000000..3899257
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/RelationshipList.java
@@ -0,0 +1,81 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import java.util.List;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class RelationshipList {
+
+ @SerializedName("relationship")
+ @Expose
+ @Valid
+ private List<Relationship> relationship = null;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public RelationshipList() {
+ }
+
+ /**
+ *
+ * @param relationship
+ */
+ public RelationshipList(List<Relationship> relationship) {
+ super();
+ this.relationship = relationship;
+ }
+
+ public List<Relationship> getRelationship() {
+ return relationship;
+ }
+
+ public void setRelationship(List<Relationship> relationship) {
+ this.relationship = relationship;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("relationship", relationship).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(relationship).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof RelationshipList)) {
+ return false;
+ }
+ RelationshipList rhs = ((RelationshipList) other);
+ return new EqualsBuilder().append(relationship, rhs.relationship).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/ServiceInstance.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/ServiceInstance.java
new file mode 100644
index 0000000..bd67d63
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/ServiceInstance.java
@@ -0,0 +1,231 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.onap.pomba.contextbuilder.aai.exception.AuditError;
+import org.onap.pomba.contextbuilder.aai.exception.AuditException;
+
+public class ServiceInstance {
+
+ @SerializedName("service-instance-id")
+ @Expose
+ private String serviceInstanceId;
+ @SerializedName("service-instance-name")
+ @Expose
+ private String serviceInstanceName;
+ @SerializedName("service-type")
+ @Expose
+ private String serviceType;
+ @SerializedName("service-role")
+ @Expose
+ private String serviceRole;
+ @SerializedName("environment-context")
+ @Expose
+ private String environmentContext;
+ @SerializedName("workload-context")
+ @Expose
+ private String workloadContext;
+ @SerializedName("model-invariant-id")
+ @Expose
+ private String modelInvariantId;
+ @SerializedName("model-version-id")
+ @Expose
+ private String modelVersionId;
+ @SerializedName("resource-version")
+ @Expose
+ private String resourceVersion;
+ @SerializedName("orchestration-status")
+ @Expose
+ private String orchestrationStatus;
+ @SerializedName("relationship-list")
+ @Expose
+ @Valid
+ private RelationshipList relationshipList;
+
+ private static final Gson gson = new GsonBuilder().disableHtmlEscaping().create();
+
+ public String toJson() {
+ return gson.toJson(this);
+ }
+
+ public static ServiceInstance fromJson(String payload) throws AuditException {
+ try {
+ if (payload == null || payload.isEmpty()) {
+ throw new AuditException("Empty Json response");
+ }
+ return gson.fromJson(payload, ServiceInstance.class);
+ } catch (Exception ex) {
+ throw new AuditException(AuditError.JSON_READER_PARSE_ERROR, ex);
+ }
+ }
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public ServiceInstance() {
+ }
+
+ /**
+ *
+ * @param serviceRole
+ * @param serviceInstanceName
+ * @param orchestrationStatus
+ * @param serviceType
+ * @param modelInvariantId
+ * @param workloadContext
+ * @param environmentContext
+ * @param resourceVersion
+ * @param relationshipList
+ * @param modelVersionId
+ * @param serviceInstanceId
+ */
+ public ServiceInstance(String serviceInstanceId, String serviceInstanceName, String serviceType, String serviceRole, String environmentContext, String workloadContext, String modelInvariantId, String modelVersionId, String resourceVersion, String orchestrationStatus, RelationshipList relationshipList) {
+ super();
+ this.serviceInstanceId = serviceInstanceId;
+ this.serviceInstanceName = serviceInstanceName;
+ this.serviceType = serviceType;
+ this.serviceRole = serviceRole;
+ this.environmentContext = environmentContext;
+ this.workloadContext = workloadContext;
+ this.modelInvariantId = modelInvariantId;
+ this.modelVersionId = modelVersionId;
+ this.resourceVersion = resourceVersion;
+ this.orchestrationStatus = orchestrationStatus;
+ this.relationshipList = relationshipList;
+ }
+
+ public String getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ public void setServiceInstanceId(String serviceInstanceId) {
+ this.serviceInstanceId = serviceInstanceId;
+ }
+
+ public String getServiceInstanceName() {
+ return serviceInstanceName;
+ }
+
+ public void setServiceInstanceName(String serviceInstanceName) {
+ this.serviceInstanceName = serviceInstanceName;
+ }
+
+ public String getServiceType() {
+ return serviceType;
+ }
+
+ public void setServiceType(String serviceType) {
+ this.serviceType = serviceType;
+ }
+
+ public String getServiceRole() {
+ return serviceRole;
+ }
+
+ public void setServiceRole(String serviceRole) {
+ this.serviceRole = serviceRole;
+ }
+
+ public String getEnvironmentContext() {
+ return environmentContext;
+ }
+
+ public void setEnvironmentContext(String environmentContext) {
+ this.environmentContext = environmentContext;
+ }
+
+ public String getWorkloadContext() {
+ return workloadContext;
+ }
+
+ public void setWorkloadContext(String workloadContext) {
+ this.workloadContext = workloadContext;
+ }
+
+ public String getModelInvariantId() {
+ return modelInvariantId;
+ }
+
+ public void setModelInvariantId(String modelInvariantId) {
+ this.modelInvariantId = modelInvariantId;
+ }
+
+ public String getModelVersionId() {
+ return modelVersionId;
+ }
+
+ public void setModelVersionId(String modelVersionId) {
+ this.modelVersionId = modelVersionId;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ public void setOrchestrationStatus(String orchestrationStatus) {
+ this.orchestrationStatus = orchestrationStatus;
+ }
+
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("serviceInstanceId", serviceInstanceId).append("serviceInstanceName", serviceInstanceName).append("serviceType", serviceType).append("serviceRole", serviceRole).append("environmentContext", environmentContext).append("workloadContext", workloadContext).append("modelInvariantId", modelInvariantId).append("modelVersionId", modelVersionId).append("resourceVersion", resourceVersion).append("orchestrationStatus", orchestrationStatus).append("relationshipList", relationshipList).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(serviceRole).append(serviceInstanceName).append(orchestrationStatus).append(serviceType).append(modelInvariantId).append(workloadContext).append(environmentContext).append(resourceVersion).append(relationshipList).append(modelVersionId).append(serviceInstanceId).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof ServiceInstance)) {
+ return false;
+ }
+ ServiceInstance rhs = ((ServiceInstance) other);
+ return new EqualsBuilder().append(serviceRole, rhs.serviceRole).append(serviceInstanceName, rhs.serviceInstanceName).append(orchestrationStatus, rhs.orchestrationStatus).append(serviceType, rhs.serviceType).append(modelInvariantId, rhs.modelInvariantId).append(workloadContext, rhs.workloadContext).append(environmentContext, rhs.environmentContext).append(resourceVersion, rhs.resourceVersion).append(relationshipList, rhs.relationshipList).append(modelVersionId, rhs.modelVersionId).append(serviceInstanceId, rhs.serviceInstanceId).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModule.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModule.java
new file mode 100644
index 0000000..33312ee
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModule.java
@@ -0,0 +1,210 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class VfModule {
+
+ @SerializedName("vf-module-id")
+ @Expose
+ private String vfModuleId;
+ @SerializedName("vf-module-name")
+ @Expose
+ private String vfModuleName;
+ @SerializedName("heat-stack-id")
+ @Expose
+ private String heatStackId;
+ @SerializedName("orchestration-status")
+ @Expose
+ private String orchestrationStatus;
+ @SerializedName("is-base-vf-module")
+ @Expose
+ private Boolean isBaseVfModule;
+ @SerializedName("resource-version")
+ @Expose
+ private String resourceVersion;
+ @SerializedName("model-invariant-id")
+ @Expose
+ private String modelInvariantId;
+ @SerializedName("model-version-id")
+ @Expose
+ private String modelVersionId;
+ @SerializedName("model-customization-id")
+ @Expose
+ private String modelCustomizationId;
+ @SerializedName("module-index")
+ @Expose
+ private Integer moduleIndex;
+ @SerializedName("relationship-list")
+ @Expose
+ @Valid
+ private RelationshipList relationshipList;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public VfModule() {
+ }
+
+ /**
+ *
+ * @param modelCustomizationId
+ * @param moduleIndex
+ * @param vfModuleName
+ * @param orchestrationStatus
+ * @param vfModuleId
+ * @param modelInvariantId
+ * @param heatStackId
+ * @param isBaseVfModule
+ * @param resourceVersion
+ * @param relationshipList
+ * @param modelVersionId
+ */
+ public VfModule(String vfModuleId, String vfModuleName, String heatStackId, String orchestrationStatus, Boolean isBaseVfModule, String resourceVersion, String modelInvariantId, String modelVersionId, String modelCustomizationId, Integer moduleIndex, RelationshipList relationshipList) {
+ super();
+ this.vfModuleId = vfModuleId;
+ this.vfModuleName = vfModuleName;
+ this.heatStackId = heatStackId;
+ this.orchestrationStatus = orchestrationStatus;
+ this.isBaseVfModule = isBaseVfModule;
+ this.resourceVersion = resourceVersion;
+ this.modelInvariantId = modelInvariantId;
+ this.modelVersionId = modelVersionId;
+ this.modelCustomizationId = modelCustomizationId;
+ this.moduleIndex = moduleIndex;
+ this.relationshipList = relationshipList;
+ }
+
+ public String getVfModuleId() {
+ return vfModuleId;
+ }
+
+ public void setVfModuleId(String vfModuleId) {
+ this.vfModuleId = vfModuleId;
+ }
+
+ public String getVfMduleName() {
+ return vfModuleName;
+ }
+
+ public void setVfModuleName(String vfModuleName) {
+ this.vfModuleName = vfModuleName;
+ }
+
+ public String getHeatStackId() {
+ return heatStackId;
+ }
+
+ public void setHeatStackId(String heatStackId) {
+ this.heatStackId = heatStackId;
+ }
+
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ public void setOrchestrationStatus(String orchestrationStatus) {
+ this.orchestrationStatus = orchestrationStatus;
+ }
+
+ public Boolean getIsBaseVfModule() {
+ return isBaseVfModule;
+ }
+
+ public void setIsBaseVfModule(Boolean isBaseVfModule) {
+ this.isBaseVfModule = isBaseVfModule;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public String getModelInvariantId() {
+ return modelInvariantId;
+ }
+
+ public void setModelInvariantId(String modelInvariantId) {
+ this.modelInvariantId = modelInvariantId;
+ }
+
+ public String getModelVersionId() {
+ return modelVersionId;
+ }
+
+ public void setModelVersionId(String modelVersionId) {
+ this.modelVersionId = modelVersionId;
+ }
+
+ public String getModelCustomizationId() {
+ return modelCustomizationId;
+ }
+
+ public void setModelCustomizationId(String modelCustomizationId) {
+ this.modelCustomizationId = modelCustomizationId;
+ }
+
+ public Integer getModuleIndex() {
+ return moduleIndex;
+ }
+
+ public void setModuleIndex(Integer moduleIndex) {
+ this.moduleIndex = moduleIndex;
+ }
+
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("vfModuleId", vfModuleId).append("vfModuleName", vfModuleName).append("heatStackId", heatStackId).append("orchestrationStatus", orchestrationStatus).append("isBaseVfModule", isBaseVfModule).append("resourceVersion", resourceVersion).append("modelInvariantId", modelInvariantId).append("modelVersionId", modelVersionId).append("modelCustomizationId", modelCustomizationId).append("moduleIndex", moduleIndex).append("relationshipList", relationshipList).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(modelCustomizationId).append(moduleIndex).append(vfModuleName).append(orchestrationStatus).append(vfModuleId).append(modelInvariantId).append(heatStackId).append(isBaseVfModule).append(resourceVersion).append(relationshipList).append(modelVersionId).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof VfModule)) {
+ return false;
+ }
+ VfModule rhs = ((VfModule) other);
+ return new EqualsBuilder().append(modelCustomizationId, rhs.modelCustomizationId).append(moduleIndex, rhs.moduleIndex).append(vfModuleName, rhs.vfModuleName).append(orchestrationStatus, rhs.orchestrationStatus).append(vfModuleId, rhs.vfModuleId).append(modelInvariantId, rhs.modelInvariantId).append(heatStackId, rhs.heatStackId).append(isBaseVfModule, rhs.isBaseVfModule).append(resourceVersion, rhs.resourceVersion).append(relationshipList, rhs.relationshipList).append(modelVersionId, rhs.modelVersionId).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModules.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModules.java
new file mode 100644
index 0000000..d81f3c5
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VfModules.java
@@ -0,0 +1,81 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import java.util.List;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+
+public class VfModules {
+
+ @SerializedName("vf-module")
+ @Expose
+ @Valid
+ private List<VfModule> vfModule = null;
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public VfModules() {
+ }
+
+ /**
+ *
+ * @param vf_module
+ */
+ public VfModules(List<VfModule> vfModule) {
+ super();
+ this.vfModule = vfModule;
+ }
+
+ public List<VfModule> getVfModule() {
+ return vfModule;
+ }
+
+ public void setVfModule(List<VfModule> vfModule) {
+ this.vfModule = vfModule;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("vfModule", vfModule).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(vfModule).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof VfModules)) {
+ return false;
+ }
+ VfModules rhs = ((VfModules) other);
+ return new EqualsBuilder().append(vfModule, rhs.vfModule).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfInstance.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfInstance.java
new file mode 100644
index 0000000..26949ed
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfInstance.java
@@ -0,0 +1,440 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.onap.pomba.contextbuilder.aai.exception.AuditError;
+import org.onap.pomba.contextbuilder.aai.exception.AuditException;
+
+public class VnfInstance {
+
+ @SerializedName("vnf-id")
+ @Expose
+ private String vnfId;
+ @SerializedName("vnf-name")
+ @Expose
+ private String vnfName;
+ @SerializedName("vnf-name2")
+ @Expose
+ private String vnfName2;
+ @SerializedName("vnf-type")
+ @Expose
+ private String vnfType;
+ @SerializedName("service-id")
+ @Expose
+ private String serviceId;
+ @SerializedName("prov-status")
+ @Expose
+ private String provisionStatus;
+ @SerializedName("license-key")
+ @Expose
+ private String licenseKey;
+ @SerializedName("equipment-role")
+ @Expose
+ private String equipmentRole;
+ @SerializedName("orchestration-status")
+ @Expose
+ private String orchestrationStatus;
+ @SerializedName("heat-stack-id")
+ @Expose
+ private String heatStackId;
+ @SerializedName("mso-catalog-key")
+ @Expose
+ private String msoCatalogKey;
+ @SerializedName("ipv4-oam-address")
+ @Expose
+ private String ipv4OamAddress;
+ @SerializedName("ipv4-loopback0-address")
+ @Expose
+ private String ipv4Loopback0Address;
+ @SerializedName("nm-lan-v6-address")
+ @Expose
+ private String nmLanV6Address;
+ @SerializedName("management-v6-address")
+ @Expose
+ private String managementV6Address;
+ @SerializedName("in-maint")
+ @Expose
+ private Boolean inMaintenance;
+ @SerializedName("is-closed-loop-disabled")
+ @Expose
+ private Boolean isClosedLoopDisabled;
+ @SerializedName("resource-version")
+ @Expose
+ private String resourceVersion;
+ @SerializedName("model-invariant-id")
+ @Expose
+ private String modelInvariantId;
+ @SerializedName("model-version-id")
+ @Expose
+ private String modelVersionId;
+ @SerializedName("model-customization-id")
+ @Expose
+ private String modelCustomizationId;
+ @SerializedName("nf-type")
+ @Expose
+ private String nfType;
+ @SerializedName("nf-function")
+ @Expose
+ private String nfFunction;
+ @SerializedName("nf-role")
+ @Expose
+ private String nfRole;
+ @SerializedName("nf-naming-code")
+ @Expose
+ private String nfNamingCode;
+ @SerializedName("relationship-list")
+ @Expose
+ @Valid
+ private RelationshipList relationshipList;
+ @SerializedName("vf-modules")
+ @Expose
+ @Valid
+ private VfModules vfModules;
+
+ private static final Gson gson = new GsonBuilder().disableHtmlEscaping().create();
+
+ public String toJson() {
+ return gson.toJson(this);
+ }
+
+ public static VnfInstance fromJson(String payload) throws AuditException {
+ try {
+ if (payload == null || payload.isEmpty()) {
+ throw new AuditException("Empty Json response");
+ }
+ return gson.fromJson(payload, VnfInstance.class);
+ } catch (Exception ex) {
+ throw new AuditException(AuditError.JSON_READER_PARSE_ERROR, ex);
+ }
+ }
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public VnfInstance() {
+ }
+
+ /**
+ *
+ * @param serviceId
+ * @param modelCustomizationId
+ * @param vnfType
+ * @param ipv4Loopback0Address
+ * @param nfFunction
+ * @param modelInvariantId
+ * @param resourceVersion
+ * @param vnfName2
+ * @param relationshipList
+ * @param nmLanV6Address
+ * @param nfRole
+ * @param nfType
+ * @param modelVersionId
+ * @param ipv4OamAddress
+ * @param vnfName
+ * @param inMaintenance
+ * @param msoCatalogKey
+ * @param provisionStatus
+ * @param vfModules
+ * @param equipmentRole
+ * @param vnfId
+ * @param orchestrationStatus
+ * @param nfNamingCode
+ * @param heatStackId
+ * @param isClosedLoopDisabled
+ * @param licenseKey
+ * @param managementV6Address
+ */
+ public VnfInstance(String vnfId, String vnfName, String vnfName2, String vnfType, String serviceId, String provisionStatus, String licenseKey, String equipmentRole, String orchestrationStatus, String heatStackId, String msoCatalogKey, String ipv4OamAddress, String ipv4Loopback0Address, String nmLanV6Address, String managementV6Address, Boolean inMaintenance, Boolean isClosedLoopDisabled, String resourceVersion, String modelInvariantId, String modelVersionId, String modelCustomizationId, String nfType, String nfFunction, String nfRole, String nfNamingCode, RelationshipList relationshipList, VfModules vfModules) {
+ super();
+ this.vnfId = vnfId;
+ this.vnfName = vnfName;
+ this.vnfName2 = vnfName2;
+ this.vnfType = vnfType;
+ this.serviceId = serviceId;
+ this.provisionStatus = provisionStatus;
+ this.licenseKey = licenseKey;
+ this.equipmentRole = equipmentRole;
+ this.orchestrationStatus = orchestrationStatus;
+ this.heatStackId = heatStackId;
+ this.msoCatalogKey = msoCatalogKey;
+ this.ipv4OamAddress = ipv4OamAddress;
+ this.ipv4Loopback0Address = ipv4Loopback0Address;
+ this.nmLanV6Address = nmLanV6Address;
+ this.managementV6Address = managementV6Address;
+ this.inMaintenance = inMaintenance;
+ this.isClosedLoopDisabled = isClosedLoopDisabled;
+ this.resourceVersion = resourceVersion;
+ this.modelInvariantId = modelInvariantId;
+ this.modelVersionId = modelVersionId;
+ this.modelCustomizationId = modelCustomizationId;
+ this.nfType = nfType;
+ this.nfFunction = nfFunction;
+ this.nfRole = nfRole;
+ this.nfNamingCode = nfNamingCode;
+ this.relationshipList = relationshipList;
+ this.vfModules = vfModules;
+ }
+
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ public void setVnfId(String vnfId) {
+ this.vnfId = vnfId;
+ }
+
+ public String getVnfName() {
+ return vnfName;
+ }
+
+ public void setVnfName(String vnfName) {
+ this.vnfName = vnfName;
+ }
+
+ public String getVnfName2() {
+ return vnfName2;
+ }
+
+ public void setVnfName2(String vnfName2) {
+ this.vnfName2 = vnfName2;
+ }
+
+ public String getVnfType() {
+ return vnfType;
+ }
+
+ public void setVnfType(String vnfType) {
+ this.vnfType = vnfType;
+ }
+
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ public void setServiceId(String serviceId) {
+ this.serviceId = serviceId;
+ }
+
+ public String getProvisionStatus() {
+ return provisionStatus;
+ }
+
+ public void setProvisionStatus(String provisionStatus) {
+ this.provisionStatus = provisionStatus;
+ }
+
+ public String getLicenseKey() {
+ return licenseKey;
+ }
+
+ public void setLicenseKey(String licenseKey) {
+ this.licenseKey = licenseKey;
+ }
+
+ public String getEquipmentRole() {
+ return equipmentRole;
+ }
+
+ public void setEquipmentRole(String equipmentRole) {
+ this.equipmentRole = equipmentRole;
+ }
+
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ public void setoOrchestrationStatus(String orchestrationStatus) {
+ this.orchestrationStatus = orchestrationStatus;
+ }
+
+ public String getHeatStackId() {
+ return heatStackId;
+ }
+
+ public void setHeatStackId(String heatStackId) {
+ this.heatStackId = heatStackId;
+ }
+
+ public String getMsoCatalogKey() {
+ return msoCatalogKey;
+ }
+
+ public void setMsoCatalogKey(String msoCatalogKey) {
+ this.msoCatalogKey = msoCatalogKey;
+ }
+
+ public String getIpv4OamAddress() {
+ return ipv4OamAddress;
+ }
+
+ public void setIpv4OamAddress(String ipv4OamAddress) {
+ this.ipv4OamAddress = ipv4OamAddress;
+ }
+
+ public String getIpv4Loopback0Address() {
+ return ipv4Loopback0Address;
+ }
+
+ public void setIpv4Loopback0Address(String ipv4Loopback0Address) {
+ this.ipv4Loopback0Address = ipv4Loopback0Address;
+ }
+
+ public String getNmLanV6Address() {
+ return nmLanV6Address;
+ }
+
+ public void setNmLanV6Address(String nmLanV6Address) {
+ this.nmLanV6Address = nmLanV6Address;
+ }
+
+ public String getManagementV6Address() {
+ return managementV6Address;
+ }
+
+ public void setManagementV6Address(String managementV6Address) {
+ this.managementV6Address = managementV6Address;
+ }
+
+ public Boolean getInMaintenance() {
+ return inMaintenance;
+ }
+
+ public void setInMaintenance(Boolean inMaintenance) {
+ this.inMaintenance = inMaintenance;
+ }
+
+ public Boolean getIsClosedLoopDisabled() {
+ return isClosedLoopDisabled;
+ }
+
+ public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
+ this.isClosedLoopDisabled = isClosedLoopDisabled;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public String getModelInvariantId() {
+ return modelInvariantId;
+ }
+
+ public void setModelInvariantId(String modelInvariantId) {
+ this.modelInvariantId = modelInvariantId;
+ }
+
+ public String getModelVersionId() {
+ return modelVersionId;
+ }
+
+ public void setModelVersionId(String modelVersionId) {
+ this.modelVersionId = modelVersionId;
+ }
+
+ public String getModelCustomizationId() {
+ return modelCustomizationId;
+ }
+
+ public void setModelCustomizationId(String modelCustomizationId) {
+ this.modelCustomizationId = modelCustomizationId;
+ }
+
+ public String getNfType() {
+ return nfType;
+ }
+
+ public void setNfType(String nfType) {
+ this.nfType = nfType;
+ }
+
+ public String getNfFunction() {
+ return nfFunction;
+ }
+
+ public void setNfFunction(String nfFunction) {
+ this.nfFunction = nfFunction;
+ }
+
+ public String getNfRole() {
+ return nfRole;
+ }
+
+ public void setNfRole(String nfRole) {
+ this.nfRole = nfRole;
+ }
+
+ public String getNfNamingCode() {
+ return nfNamingCode;
+ }
+
+ public void setNfNamingCode(String nfNamingCode) {
+ this.nfNamingCode = nfNamingCode;
+ }
+
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
+ public VfModules getVfModules() {
+ return vfModules;
+ }
+
+ public void setVfModules(VfModules vfModules) {
+ this.vfModules = vfModules;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("vnfId", vnfId).append("vnfName", vnfName).append("vnfName2", vnfName2).append("vnfType", vnfType).append("serviceId", serviceId).append("provisionStatus", provisionStatus).append("licenseKey", licenseKey).append("equipmentRole", equipmentRole).append("orchestrationStatus", orchestrationStatus).append("heatStackId", heatStackId).append("msoCatalogKey", msoCatalogKey).append("ipv4OamAddress", ipv4OamAddress).append("ipv4Loopback0Address", ipv4Loopback0Address).append("nmLanV6Address", nmLanV6Address).append("managementV6Address", managementV6Address).append("inMaintenance", inMaintenance).append("isClosedLoopDisabled", isClosedLoopDisabled).append("resourceVersion", resourceVersion).append("modelInvariantId", modelInvariantId).append("modelVersionId", modelVersionId).append("modelCustomizationId", modelCustomizationId).append("nfType", nfType).append("nfFunction", nfFunction).append("nfRole", nfRole).append("nfNamingCode", nfNamingCode).append("relationshipList", relationshipList).append("vfModules", vfModules).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(modelCustomizationId).append(serviceId).append(ipv4Loopback0Address).append(vnfType).append(nfFunction).append(modelInvariantId).append(resourceVersion).append(vnfName2).append(relationshipList).append(nmLanV6Address).append(nfRole).append(nfType).append(modelVersionId).append(ipv4OamAddress).append(vnfName).append(inMaintenance).append(msoCatalogKey).append(provisionStatus).append(vfModules).append(equipmentRole).append(vnfId).append(orchestrationStatus).append(nfNamingCode).append(isClosedLoopDisabled).append(heatStackId).append(licenseKey).append(managementV6Address).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof VnfInstance)) {
+ return false;
+ }
+ VnfInstance rhs = ((VnfInstance) other);
+ return new EqualsBuilder().append(modelCustomizationId, rhs.modelCustomizationId).append(serviceId, rhs.serviceId).append(ipv4Loopback0Address, rhs.ipv4Loopback0Address).append(vnfType, rhs.vnfType).append(nfFunction, rhs.nfFunction).append(modelInvariantId, rhs.modelInvariantId).append(resourceVersion, rhs.resourceVersion).append(vnfName2, rhs.vnfName2).append(relationshipList, rhs.relationshipList).append(nmLanV6Address, rhs.nmLanV6Address).append(nfRole, rhs.nfRole).append(nfType, rhs.nfType).append(modelVersionId, rhs.modelVersionId).append(ipv4OamAddress, rhs.ipv4OamAddress).append(vnfName, rhs.vnfName).append(inMaintenance, rhs.inMaintenance).append(msoCatalogKey, rhs.msoCatalogKey).append(provisionStatus, rhs.provisionStatus).append(vfModules, rhs.vfModules).append(equipmentRole, rhs.equipmentRole).append(vnfId, rhs.vnfId).append(orchestrationStatus, rhs.orchestrationStatus).append(nfNamingCode, rhs.nfNamingCode).append(isClosedLoopDisabled, rhs.isClosedLoopDisabled).append(heatStackId, rhs.heatStackId).append(licenseKey, rhs.licenseKey).append(managementV6Address, rhs.managementV6Address).isEquals();
+ }
+
+}
diff --git a/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfcInstance.java b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfcInstance.java
new file mode 100644
index 0000000..3790d52
--- /dev/null
+++ b/src/main/java/org/onap/pomba/contextbuilder/aai/datatype/VnfcInstance.java
@@ -0,0 +1,231 @@
+/*
+ * ============LICENSE_START===================================================
+ * Copyright (c) 2018 Amdocs
+ * ============================================================================
+ * Licensed 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.
+ * ============LICENSE_END=====================================================
+ */
+package org.onap.pomba.contextbuilder.aai.datatype;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.annotations.Expose;
+import com.google.gson.annotations.SerializedName;
+import javax.validation.Valid;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.onap.pomba.contextbuilder.aai.exception.AuditError;
+import org.onap.pomba.contextbuilder.aai.exception.AuditException;
+
+public class VnfcInstance {
+
+ @SerializedName("vnfc-name")
+ @Expose
+ private String vnfcName;
+ @SerializedName("nfc-naming-code")
+ @Expose
+ private String nfcNamingCode;
+ @SerializedName("nfc-function")
+ @Expose
+ private String nfcFunction;
+ @SerializedName("prov-status")
+ @Expose
+ private String provisionStatus;
+ @SerializedName("orchestration-status")
+ @Expose
+ private String orchestrationStatus;
+ @SerializedName("in-maint")
+ @Expose
+ private Boolean inMaintenance;
+ @SerializedName("is-closed-loop-disabled")
+ @Expose
+ private Boolean isClosedLoopDisabled;
+ @SerializedName("resource-version")
+ @Expose
+ private String resourceVersion;
+ @SerializedName("model-invariant-id")
+ @Expose
+ private String modelInvariantId;
+ @SerializedName("model-version-id")
+ @Expose
+ private String modelVersionId;
+ @SerializedName("relationship-list")
+ @Expose
+ @Valid
+ private RelationshipList relationshipList;
+
+ private static final Gson gson = new GsonBuilder().disableHtmlEscaping().create();
+
+ public String toJson() {
+ return gson.toJson(this);
+ }
+
+ public static VnfcInstance fromJson(String payload) throws AuditException {
+ try {
+ if (payload == null || payload.isEmpty()) {
+ throw new AuditException("Empty Json response");
+ }
+ return gson.fromJson(payload, VnfcInstance.class);
+ } catch (Exception ex) {
+ throw new AuditException(AuditError.JSON_READER_PARSE_ERROR, ex);
+ }
+ }
+
+ /**
+ * No args constructor for use in serialization
+ *
+ */
+ public VnfcInstance() {
+ }
+
+ /**
+ *
+ * @param nfcNamingCode
+ * @param inMaintenance
+ * @param nfcFunction
+ * @param orchestrationStatus
+ * @param modelInvariantId
+ * @param isClosedLoopDisabled
+ * @param resourceVersion
+ * @param provisionStatus
+ * @param relationshipList
+ * @param modelVersionId
+ * @param vnfcName
+ */
+ public VnfcInstance(String vnfcName, String nfcNamingCode, String nfcFunction, String provisionStatus, String orchestrationStatus, Boolean inMaintenance, Boolean isClosedLoopDisabled, String resourceVersion, String modelInvariantId, String modelVersionId, RelationshipList relationshipList) {
+ super();
+ this.vnfcName = vnfcName;
+ this.nfcNamingCode = nfcNamingCode;
+ this.nfcFunction = nfcFunction;
+ this.provisionStatus = provisionStatus;
+ this.orchestrationStatus = orchestrationStatus;
+ this.inMaintenance = inMaintenance;
+ this.isClosedLoopDisabled = isClosedLoopDisabled;
+ this.resourceVersion = resourceVersion;
+ this.modelInvariantId = modelInvariantId;
+ this.modelVersionId = modelVersionId;
+ this.relationshipList = relationshipList;
+ }
+
+ public String getVnfcName() {
+ return vnfcName;
+ }
+
+ public void setVnfcName(String vnfcName) {
+ this.vnfcName = vnfcName;
+ }
+
+ public String getNfcNamingCode() {
+ return nfcNamingCode;
+ }
+
+ public void setNfcNamingCode(String nfcNamingCode) {
+ this.nfcNamingCode = nfcNamingCode;
+ }
+
+ public String getNfcFunction() {
+ return nfcFunction;
+ }
+
+ public void setNfcFunction(String nfcFunction) {
+ this.nfcFunction = nfcFunction;
+ }
+
+ public String getProvisionStatus() {
+ return provisionStatus;
+ }
+
+ public void setProvisionStatus(String provisionStatus) {
+ this.provisionStatus = provisionStatus;
+ }
+
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ public void setOrchestrationStatus(String orchestrationStatus) {
+ this.orchestrationStatus = orchestrationStatus;
+ }
+
+ public Boolean getInMaintenance() {
+ return inMaintenance;
+ }
+
+ public void setInMaintenance(Boolean inMaintenance) {
+ this.inMaintenance = inMaintenance;
+ }
+
+ public Boolean getIsClosedLoopDisabled() {
+ return isClosedLoopDisabled;
+ }
+
+ public void setIsClosedLoopDisabled(Boolean isClosedLoopDisabled) {
+ this.isClosedLoopDisabled = isClosedLoopDisabled;
+ }
+
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ public String getModelInvariantId() {
+ return modelInvariantId;
+ }
+
+ public void setModelInvariantId(String modelInvariantId) {
+ this.modelInvariantId = modelInvariantId;
+ }
+
+ public String getModelVersionId() {
+ return modelVersionId;
+ }
+
+ public void setModelVersionId(String modelVersionId) {
+ this.modelVersionId = modelVersionId;
+ }
+
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this).append("vnfcName", vnfcName).append("nfcNamingCode", nfcNamingCode).append("nfcFunction", nfcFunction).append("provisionStatus", provisionStatus).append("orchestration_status", orchestrationStatus).append("inMaintenance", inMaintenance).append("isClosedLoopDisabled", isClosedLoopDisabled).append("resourceVersion", resourceVersion).append("modelInvariantId", modelInvariantId).append("modelVersionId", modelVersionId).append("relationshipList", relationshipList).toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder().append(nfcNamingCode).append(inMaintenance).append(nfcFunction).append(orchestrationStatus).append(modelInvariantId).append(isClosedLoopDisabled).append(resourceVersion).append(provisionStatus).append(relationshipList).append(modelVersionId).append(vnfcName).toHashCode();
+ }
+
+ @Override
+ public boolean equals(Object other) {
+ if (other == this) {
+ return true;
+ }
+ if (!(other instanceof VnfcInstance)) {
+ return false;
+ }
+ VnfcInstance rhs = ((VnfcInstance) other);
+ return new EqualsBuilder().append(nfcNamingCode, rhs.nfcNamingCode).append(inMaintenance, rhs.inMaintenance).append(nfcFunction, rhs.nfcFunction).append(orchestrationStatus, rhs.orchestrationStatus).append(modelInvariantId, rhs.modelInvariantId).append(isClosedLoopDisabled, rhs.isClosedLoopDisabled).append(resourceVersion, rhs.resourceVersion).append(provisionStatus, rhs.provisionStatus).append(relationshipList, rhs.relationshipList).append(modelVersionId, rhs.modelVersionId).append(vnfcName, rhs.vnfcName).isEquals();
+ }
+
+}