From 94c46cf460196b5d1da27326989781ab0955666e Mon Sep 17 00:00:00 2001 From: kurczews Date: Tue, 14 Aug 2018 11:25:03 +0200 Subject: Renaming vid-automation #7 Change-Id: I6715cddf18b0fad2f4468e26574b4ebf31109ea9 Issue-ID: VID-205 Signed-off-by: kurczews --- .../vid/model/mso/ChangeManagementRequest.java | 70 ++++ .../model/mso/ChangeManagementRequestDetails.java | 41 +++ .../org/onap/vid/model/mso/CloudConfiguration.java | 13 + .../org/onap/vid/model/mso/ExceptionResponse.java | 87 +++++ .../java/org/onap/vid/model/mso/ModelInfo.java | 124 +++++++ .../onap/vid/model/mso/MsoExceptionResponse.java | 32 ++ .../onap/vid/model/mso/MsoResponseWrapper2.java | 60 ++++ .../vid/model/mso/MsoResponseWrapperInterface.java | 15 + .../onap/vid/model/mso/OperationalEnvironment.java | 103 ++++++ .../vid/model/mso/OperationalEnvironmentList.java | 29 ++ .../java/org/onap/vid/model/mso/ProxyResponse.java | 30 ++ .../org/onap/vid/model/mso/RelatedInstance.java | 29 ++ .../onap/vid/model/mso/RelatedInstanceList.java | 26 ++ .../org/onap/vid/model/mso/RelatedToProperty.java | 35 ++ .../java/org/onap/vid/model/mso/Relationship.java | 56 +++ .../org/onap/vid/model/mso/RelationshipData.java | 30 ++ .../org/onap/vid/model/mso/RelationshipList.java | 26 ++ .../org/onap/vid/model/mso/RequestDetails.java | 218 ++++++++++++ .../java/org/onap/vid/model/mso/RequestInfo.java | 378 +++++++++++++++++++++ .../org/onap/vid/model/mso/RequestParameters.java | 102 ++++++ .../java/org/onap/vid/model/mso/RestObject.java | 123 +++++++ .../org/onap/vid/model/mso/SubscriberInfo.java | 146 ++++++++ .../java/org/onap/vid/model/mso/UserParam.java | 100 ++++++ .../vid/model/mso/ChangeManagementRequest.java | 70 ---- .../model/mso/ChangeManagementRequestDetails.java | 41 --- .../opencomp/vid/model/mso/CloudConfiguration.java | 13 - .../opencomp/vid/model/mso/ExceptionResponse.java | 87 ----- .../java/org/opencomp/vid/model/mso/ModelInfo.java | 124 ------- .../vid/model/mso/MsoExceptionResponse.java | 32 -- .../vid/model/mso/MsoResponseWrapper2.java | 60 ---- .../vid/model/mso/MsoResponseWrapperInterface.java | 15 - .../vid/model/mso/OperationalEnvironment.java | 103 ------ .../vid/model/mso/OperationalEnvironmentList.java | 29 -- .../org/opencomp/vid/model/mso/ProxyResponse.java | 30 -- .../opencomp/vid/model/mso/RelatedInstance.java | 29 -- .../vid/model/mso/RelatedInstanceList.java | 26 -- .../opencomp/vid/model/mso/RelatedToProperty.java | 35 -- .../org/opencomp/vid/model/mso/Relationship.java | 56 --- .../opencomp/vid/model/mso/RelationshipData.java | 30 -- .../opencomp/vid/model/mso/RelationshipList.java | 26 -- .../org/opencomp/vid/model/mso/RequestDetails.java | 218 ------------ .../org/opencomp/vid/model/mso/RequestInfo.java | 378 --------------------- .../opencomp/vid/model/mso/RequestParameters.java | 102 ------ .../org/opencomp/vid/model/mso/RestObject.java | 123 ------- .../org/opencomp/vid/model/mso/SubscriberInfo.java | 146 -------- .../java/org/opencomp/vid/model/mso/UserParam.java | 100 ------ 46 files changed, 1873 insertions(+), 1873 deletions(-) create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequestDetails.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/CloudConfiguration.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/ExceptionResponse.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/ModelInfo.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/MsoExceptionResponse.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/ProxyResponse.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstance.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstanceList.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RequestDetails.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java create mode 100644 vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequest.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequestDetails.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/CloudConfiguration.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/ExceptionResponse.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/ModelInfo.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoExceptionResponse.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapper2.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapperInterface.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironment.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironmentList.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/ProxyResponse.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstance.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstanceList.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedToProperty.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/Relationship.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipData.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipList.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestDetails.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestInfo.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestParameters.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/RestObject.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/SubscriberInfo.java delete mode 100644 vid-automation/src/test/java/org/opencomp/vid/model/mso/UserParam.java (limited to 'vid-automation/src/test/java/org') diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java b/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java new file mode 100644 index 000000000..91dd3ff27 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequest.java @@ -0,0 +1,70 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@JsonPropertyOrder({ + "requestDetails", + "requestType" +}) + +public class ChangeManagementRequest { + + public static class MsoChangeManagementRequest { + public final static String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate"; + public static final String REPLACE = "replace"; + public final static String CONFIG_UPDATE = "applyUpdatedConfig"; + + } + + public final static String VNF_IN_PLACE_SOFTWARE_UPDATE = "vnf in place software update"; + public static final String UPDATE = "update"; + public static final String REPLACE = "replace"; + public final static String CONFIG_UPDATE = "vnf config update"; + + @JsonProperty("requestDetails") + private List requestDetails; + + @JsonProperty("requestType") + private String requestType; + + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("requestDetails") + public List getRequestDetails() { + return requestDetails; + } + + @JsonProperty("requestDetails") + public void setRequestDetails(List requestDetails) { + this.requestDetails = requestDetails; + } + + @JsonProperty("requestType") + public String getRequestType() { + return requestType; + } + + @JsonProperty("requestType") + public void setRequestType(String requestType) { + this.requestType = requestType; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequestDetails.java b/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequestDetails.java new file mode 100644 index 000000000..ad0a38153 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/ChangeManagementRequestDetails.java @@ -0,0 +1,41 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"modelInfo", +"cloudConfiguration", +"requestInfo", +"requestParameters", +"vnfName", +"vnfInstanceId" +}) +public class ChangeManagementRequestDetails extends RequestDetails{ + + @JsonProperty("vnfName") + private String vnfName; + @JsonProperty("vnfInstanceId") + private String vnfInstanceId; + + @JsonProperty("vnfName") + public String getVnfName() { + return vnfName; + } + + @JsonProperty("vnfName") + public void setVnfName(String vnfName) { + this.vnfName = vnfName; + } + @JsonProperty("vnfInstanceId") + public String getVnfInstanceId() { + return vnfInstanceId; + } + + @JsonProperty("vnfInstanceId") + public void setVnfInstanceId(String vnfInstanceId) { + this.vnfInstanceId = vnfInstanceId; + } +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/CloudConfiguration.java b/vid-automation/src/test/java/org/onap/vid/model/mso/CloudConfiguration.java new file mode 100644 index 000000000..0200bd6fd --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/CloudConfiguration.java @@ -0,0 +1,13 @@ +package org.onap.vid.model.mso; + + +public class CloudConfiguration { + + public CloudConfiguration() { + } + + public String lcpCloudRegionId; + + public String tenantId; + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/ExceptionResponse.java b/vid-automation/src/test/java/org/onap/vid/model/mso/ExceptionResponse.java new file mode 100644 index 000000000..6801af2b5 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/ExceptionResponse.java @@ -0,0 +1,87 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.vid.model.mso; + +/** + * The Class ExceptionResponse. + */ +public class ExceptionResponse { + + public ExceptionResponse() { + } + + /** The exception. */ + private String exception; + + /** The message. */ + private String message; + + public ExceptionResponse(String exception, String message) { + this.exception = exception; + this.message = message; + } + + public ExceptionResponse(Exception exception) { + setException(exception); + } + + /** + * Gets the exception. + * + * @return the exception + */ + public String getException() { + return exception; + } + + /** + * Sets the exception. + * + * @param exception the new exception + */ + public void setException(String exception) { + this.exception = exception; + } + + public void setException(Exception exception) { + setException(exception.getClass().toString().replaceFirst("^.*[\\.$]", "")); + setMessage(exception.getMessage()); + } + + /** + * Gets the message. + * + * @return the message + */ + public String getMessage() { + return message; + } + + /** + * Sets the message. + * + * @param message the new message + */ + public void setMessage(String message) { + this.message = message; + } + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/ModelInfo.java b/vid-automation/src/test/java/org/onap/vid/model/mso/ModelInfo.java new file mode 100644 index 000000000..183d6dfd3 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/ModelInfo.java @@ -0,0 +1,124 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; + +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ +"modelType", +"modelInvariantId", +"modelVersionId", +"modelName", +"modelVersion", +"modelCustomizationName", +"modelCustomizationId" +}) +public class ModelInfo { + + public ModelInfo(){ + + } + + @JsonProperty("modelType") + private String modelType; + @JsonProperty("modelInvariantId") + private String modelInvariantId; + @JsonProperty("modelVersionId") + private String modelVersionId; + @JsonProperty("modelName") + private String modelName; + @JsonProperty("modelVersion") + private String modelVersion; + @JsonProperty("modelCustomizationName") + private String modelCustomizationName; + @JsonProperty("modelCustomizationId") + private String modelCustomizationId; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + @JsonProperty("modelType") + public String getModelType() { + return modelType; + } + + @JsonProperty("modelType") + public void setModelType(String modelType) { + this.modelType = modelType; + } + + @JsonProperty("modelInvariantId") + public String getModelInvariantId() { + return modelInvariantId; + } + + @JsonProperty("modelInvariantId") + public void setModelInvariantId(String modelInvariantId) { + this.modelInvariantId = modelInvariantId; + } + + @JsonProperty("modelVersionId") + public String getModelVersionId() { + return modelVersionId; + } + + @JsonProperty("modelVersionId") + public void setModelVersionId(String modelVersionId) { + this.modelVersionId = modelVersionId; + } + + @JsonProperty("modelName") + public String getModelName() { + return modelName; + } + + @JsonProperty("modelName") + public void setModelName(String modelName) { + this.modelName = modelName; + } + + @JsonProperty("modelVersion") + public String getModelVersion() { + return modelVersion; + } + + @JsonProperty("modelVersion") + public void setModelVersion(String modelVersion) { + this.modelVersion = modelVersion; + } + + @JsonProperty("modelCustomizationName") + public String getModelCustomizationName() { + return modelCustomizationName; + } + + @JsonProperty("modelCustomizationName") + public void setModelCustomizationName(String modelCustomizationName) { + this.modelCustomizationName = modelCustomizationName; + } + + @JsonProperty("modelCustomizationId") + public String getModelCustomizationId() { + return modelCustomizationId; + } + + @JsonProperty("modelCustomizationId") + public void setModelCustomizationId(String modelCustomizationId) { + this.modelCustomizationId = modelCustomizationId; + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + + + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoExceptionResponse.java b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoExceptionResponse.java new file mode 100644 index 000000000..81b506060 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoExceptionResponse.java @@ -0,0 +1,32 @@ +package org.onap.vid.model.mso; + +public class MsoExceptionResponse { + + public static class ServiceException { + + public ServiceException(String messageId, String text) { + this.messageId = messageId; + this.text = text; + } + + public ServiceException() { + } + + public String messageId; + public String text; + } + + public ServiceException serviceException; + + public MsoExceptionResponse() { + } + + public MsoExceptionResponse(String messageId, String text) { + this.serviceException = new ServiceException(messageId, text); + } + + public MsoExceptionResponse(Exception exception) { + ExceptionResponse exceptionResponse = new ExceptionResponse(exception); + this.serviceException = new ServiceException(exceptionResponse.getException(), exceptionResponse.getMessage()); + } +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java new file mode 100644 index 000000000..29fa931d5 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapper2.java @@ -0,0 +1,60 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; + +@JsonPropertyOrder({ + "status", + "entity" +}) + +/* +This is a brother of MsoResponseWrapper. I (Ittay) think it's better. +It is generic, immutable, and has some knowledge about RestObject. +The serialized "entity" field may be either String or nested object. + */ +public class MsoResponseWrapper2 implements MsoResponseWrapperInterface { + + final static ObjectMapper objectMapper = new ObjectMapper(); + + private final int status; + private final T entity; + private final String raw; + + public MsoResponseWrapper2(RestObject msoResponse) { + this.status = msoResponse.getStatusCode(); + this.entity = msoResponse.get(); + this.raw = msoResponse.getRaw(); + } + + public MsoResponseWrapper2( + @JsonProperty(value = "status", required = true) int status, + @JsonProperty(value = "entity", required = true) T entity) { + this.status = status; + this.entity = entity; + this.raw = null; + } + + public int getStatus() { + return status; + } + + @Override + @org.codehaus.jackson.annotate.JsonIgnore + @com.fasterxml.jackson.annotation.JsonIgnore + public String getResponse() { + try { + return objectMapper.writeValueAsString(this); + } catch (JsonProcessingException e) { + return getEntity() != null ? getEntity().toString() : null; + } + } + + @JsonProperty + public Object getEntity() { + return entity != null ? entity : raw; + } + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java new file mode 100644 index 000000000..eb305d2df --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/MsoResponseWrapperInterface.java @@ -0,0 +1,15 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public interface MsoResponseWrapperInterface { + @JsonProperty("entity") + Object getEntity(); + + @JsonProperty("status") + int getStatus(); + + @org.codehaus.jackson.annotate.JsonIgnore + @com.fasterxml.jackson.annotation.JsonIgnore + String getResponse(); +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java new file mode 100644 index 000000000..59e0e2f37 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironment.java @@ -0,0 +1,103 @@ +package org.onap.vid.model.mso; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class OperationalEnvironment { + + private String operationalEnvironmentId; + private String operationalEnvironmentName; + private String operationalEnvironmentType; + private String operationalEnvironmentStatus; + private String tenantContext; + private String workloadContext; + private String resourceVersion; + private RelationshipList relationshipList; + + public OperationalEnvironment() { + } + + public OperationalEnvironment(String operationalEnvironmentId, String operationalEnvironmentName, String operationalEnvironmentType, String operationalEnvironmentStatus, String tenantContext, String workloadContext, String resourceVersion, RelationshipList relationshipList) { + this.operationalEnvironmentId = operationalEnvironmentId; + this.operationalEnvironmentName = operationalEnvironmentName; + this.operationalEnvironmentType = operationalEnvironmentType; + this.operationalEnvironmentStatus = operationalEnvironmentStatus; + this.tenantContext = tenantContext; + this.workloadContext = workloadContext; + this.resourceVersion = resourceVersion; + this.relationshipList = relationshipList; + } + + @JsonProperty("operational-environment-id") + public String getOperationalEnvironmentId() { + return operationalEnvironmentId; + } + + public void setOperationalEnvironmentId(String operationalEnvironmentId) { + this.operationalEnvironmentId = operationalEnvironmentId; + } + + @JsonProperty("operational-environment-name") + public String getOperationalEnvironmentName() { + return operationalEnvironmentName; + } + + public void setOperationalEnvironmentName(String operationalEnvironmentName) { + this.operationalEnvironmentName = operationalEnvironmentName; + } + + @JsonProperty("operational-environment-type") + public String getOperationalEnvironmentType() { + return operationalEnvironmentType; + } + + public void setOperationalEnvironmentType(String operationalEnvironmentType) { + this.operationalEnvironmentType = operationalEnvironmentType; + } + + @JsonProperty("operational-environment-status") + public String getOperationalEnvironmentStatus() { + return operationalEnvironmentStatus; + } + + public void setOperationalEnvironmentStatus(String operationalEnvironmentStatus) { + this.operationalEnvironmentStatus = operationalEnvironmentStatus; + } + + @JsonProperty("tenant-context") + public String getTenantContext() { + return tenantContext; + } + + public void setTenantContext(String tenantContext) { + this.tenantContext = tenantContext; + } + + @JsonProperty("workload-context") + public String getWorkloadContext() { + return workloadContext; + } + + public void setWorkloadContext(String workloadContext) { + this.workloadContext = workloadContext; + } + + @JsonProperty("resource-version") + public String getResourceVersion() { + return resourceVersion; + } + + public void setResourceVersion(String resourceVersion) { + this.resourceVersion = resourceVersion; + } + + @JsonProperty("relationship-list") + public RelationshipList getRelationshipList() { + return relationshipList; + } + + public void setRelationshipList(RelationshipList relationshipList) { + this.relationshipList = relationshipList; + } +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java new file mode 100644 index 000000000..1ff84d3a3 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/OperationalEnvironmentList.java @@ -0,0 +1,29 @@ +package org.onap.vid.model.mso; + +import org.codehaus.jackson.annotate.JsonIgnoreProperties; +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + +@JsonIgnoreProperties(ignoreUnknown = true) +public class OperationalEnvironmentList { + + @JsonProperty("operational-environment") + public List getOperationalEnvironment() { + return operationalEnvironment; + } + + @JsonProperty("operational-environment") + public void setOperationalEnvironment(List operationalEnvironment) { + this.operationalEnvironment = operationalEnvironment; + } + + public OperationalEnvironmentList() { + } + + public OperationalEnvironmentList(List operationalEnvironment) { + this.operationalEnvironment = operationalEnvironment; + } + + private List operationalEnvironment; +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/ProxyResponse.java b/vid-automation/src/test/java/org/onap/vid/model/mso/ProxyResponse.java new file mode 100644 index 000000000..7352d0529 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/ProxyResponse.java @@ -0,0 +1,30 @@ +package org.onap.vid.model.mso; + +import com.google.common.base.MoreObjects; + +/** + * Created by Oren on 7/10/17. + */ +public class ProxyResponse { + + protected String errorMessage; + + protected int httpCode; + + public String getErrorMessage() { + return errorMessage; + } + + + public int getHttpCode() { + return httpCode; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("httpCode", httpCode) + .add("errorMessage", errorMessage) + .toString(); + } +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstance.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstance.java new file mode 100644 index 000000000..900f628dc --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstance.java @@ -0,0 +1,29 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "instanceId", + "modelInfo" +}) +public class RelatedInstance { + + @JsonProperty("instanceId") + public String instanceId; + + + @JsonProperty("modelInfo") + public ModelInfo modelInfo; + + @JsonGetter + public String getInstanceId() { + return instanceId; + } + + @JsonSetter + public void setInstanceId(String instanceId) { + this.instanceId = instanceId; + } + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstanceList.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstanceList.java new file mode 100644 index 000000000..81e871281 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedInstanceList.java @@ -0,0 +1,26 @@ +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import com.fasterxml.jackson.annotation.JsonSetter; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "relatedInstance" +}) +public class RelatedInstanceList { + + @JsonProperty("relatedInstance") + public RelatedInstance relatedInstance; + + @JsonSetter + public RelatedInstance getRelatedInstance() { + return relatedInstance; + } + + @JsonSetter + public void setRelatedInstance(RelatedInstance relatedInstance) { + this.relatedInstance = relatedInstance; + } +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java new file mode 100644 index 000000000..60fff94ab --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelatedToProperty.java @@ -0,0 +1,35 @@ +package org.onap.vid.model.mso; + + +import org.codehaus.jackson.annotate.JsonProperty; + +public class RelatedToProperty { + + 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; + } + + + @JsonProperty("property-key") + public String propertyKey; + + + @JsonProperty("property-value") + public String propertyValue; + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java b/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java new file mode 100644 index 000000000..a8f0f22de --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/Relationship.java @@ -0,0 +1,56 @@ +package org.onap.vid.model.mso; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + + +public class Relationship { + + @JsonProperty("related-to") + public String relatedTo; + + @JsonProperty("related-link") + public String relatedLink; + + @JsonProperty("relationship-data") + public List relationshipData; + + @JsonProperty("related-to-property") + public List 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 getRelationDataList() { + return relationshipData; + } + + public void setRelationDataList(List relationDataList) { + this.relationshipData = relationDataList; + } + + public List getRelatedToPropertyList() { + return relatedToProperty; + } + + public void setRelatedToPropertyList(List relatedToPropertyList) { + this.relatedToProperty = relatedToPropertyList; + } + + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java new file mode 100644 index 000000000..1e6ad2a19 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipData.java @@ -0,0 +1,30 @@ +package org.onap.vid.model.mso; + + +import org.codehaus.jackson.annotate.JsonProperty; + +public class RelationshipData { + @JsonProperty("relationship-key") + public String getRelationshipKey() { + return relationshipKey; + } + @JsonProperty("relationship-key") + public void setRelationshipKey(String relationshipKey) { + this.relationshipKey = relationshipKey; + } + @JsonProperty("relationship-value") + public String getRelationshipValue() { + return relationshipValue; + } + @JsonProperty("relationship-value") + public void setRelationshipValue(String relationshipValue) { + this.relationshipValue = relationshipValue; + } + + @JsonProperty("relationship-key") + public String relationshipKey; + + @JsonProperty("relationship-value") + public String relationshipValue; + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java new file mode 100644 index 000000000..56a077d5a --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RelationshipList.java @@ -0,0 +1,26 @@ +package org.onap.vid.model.mso; + +import org.codehaus.jackson.annotate.JsonProperty; + +import java.util.List; + + +public class RelationshipList { + + @JsonProperty("relationship") + public List getRelationship() { + return relationship; + } + + @JsonProperty("relationship") + public void setRelationship(List relationship) { + this.relationship = relationship; + } + + @JsonProperty("relationship") + public List relationship; + + + + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestDetails.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestDetails.java new file mode 100644 index 000000000..368350e81 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestDetails.java @@ -0,0 +1,218 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * aggregates the context, configuraiton and detailed parameters associated with the request into a single structure. + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@JsonPropertyOrder({ + "cloudConfiguration", + "modelInfo", + "relatedModelList", + "requestInfo", + "subscriberInfo", + "requestParameters" +}) +public class RequestDetails { + + /** The related model list. */ + @JsonProperty("relatedInstanceList") + public List relatedInstList; + /** The cloud configuration. */ + @JsonProperty("cloudConfiguration") + private CloudConfiguration cloudConfiguration; + + /** The model info. */ + @JsonProperty("modelInfo") + private ModelInfo modelInfo; + + /** The request info. */ + @JsonProperty("requestInfo") + private RequestInfo requestInfo; + + /** The subscriber info. */ + @JsonProperty("subscriberInfo") + private SubscriberInfo subscriberInfo; + + /** The request parameters. */ + @JsonProperty("requestParameters") + private RequestParameters requestParameters; + + /** The additional properties. */ + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * Gets the cloud configuration. + * + * @return The cloudConfiguration + */ + @JsonProperty("cloudConfiguration") + public CloudConfiguration getCloudConfiguration() { + return cloudConfiguration; + } + + /** + * Sets the cloud configuration. + * + * @param cloudConfiguration The cloudConfiguration + */ + @JsonProperty("cloudConfiguration") + public void setCloudConfiguration(CloudConfiguration cloudConfiguration) { + this.cloudConfiguration = cloudConfiguration; + } + + /** + * Gets the model info. + * + * @return The modelInfo + */ + @JsonProperty("modelInfo") + public ModelInfo getModelInfo() { + return modelInfo; + } + + /** + * Sets the model info. + * + * @param modelInfo The modelInfo + */ + @JsonProperty("modelInfo") + public void setModelInfo(ModelInfo modelInfo) { + this.modelInfo = modelInfo; + } + + /** + * Gets the request info. + * + * @return The requestInfo + */ + @JsonProperty("requestInfo") + public RequestInfo getRequestInfo() { + return requestInfo; + } + + /** + * Sets the request info. + * + * @param requestInfo The requestInfo + */ + @JsonProperty("requestInfo") + public void setRequestInfo(RequestInfo requestInfo) { + this.requestInfo = requestInfo; + } + + /** + * Gets the subscriber info. + * + * @return The subscriberInfo + */ + @JsonProperty("subscriberInfo") + public SubscriberInfo getSubscriberInfo() { + return subscriberInfo; + } + + /** + * Sets the subscriber info. + * + * @param subscriberInfo The subscriberInfo + */ + @JsonProperty("subscriberInfo") + public void setSubscriberInfo(SubscriberInfo subscriberInfo) { + this.subscriberInfo = subscriberInfo; + } + + /* (non-Javadoc) + * @see org.onap.vid.domain.mso.RequestDetails#toString() + */ + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + /* (non-Javadoc) + * @see org.onap.vid.domain.mso.RequestDetails#getAdditionalProperties() + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + /* (non-Javadoc) + * @see org.onap.vid.domain.mso.RequestDetails#setAdditionalProperty(java.lang.String, java.lang.Object) + */ + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + /* (non-Javadoc) + * @see org.onap.vid.domain.mso.RequestDetails#hashCode() + */ + @Override + public int hashCode() { + return new HashCodeBuilder().append(cloudConfiguration).append(modelInfo).append(requestInfo).append(getRequestParameters()).append(subscriberInfo).append(additionalProperties).toHashCode(); + } + + /* (non-Javadoc) + * @see org.onap.vid.domain.mso.RequestDetails#equals(java.lang.Object) + */ + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RequestDetails) == false) { + return false; + } + RequestDetails rhs = ((RequestDetails) other); + return new EqualsBuilder().append(cloudConfiguration, rhs.cloudConfiguration).append(modelInfo, rhs.modelInfo).append(requestInfo, rhs.requestInfo).append(getRequestParameters(), rhs.getRequestParameters()).append(subscriberInfo, rhs.subscriberInfo).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + + public RequestParameters getRequestParameters() { + return requestParameters; + } + + public void setRequestParameters(RequestParameters requestParameters) { + this.requestParameters = requestParameters; + } + + @JsonGetter + public List getRelatedInstList() { + return relatedInstList; + } + + @JsonSetter + public void setRelatedInstList(List relatedInstList) { + this.relatedInstList = relatedInstList; + } +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java new file mode 100644 index 000000000..d25acbd21 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestInfo.java @@ -0,0 +1,378 @@ + +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import javax.annotation.Generated; +import java.util.HashMap; +import java.util.Map; + + +/** + * fields providing general context information for the request + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "billingAccountNumber", + "callbackUrl", + "correlator", + "instanceName", + "orderNumber", + "orderVersion", + "productFamilyId", + "source", + "suppressRollback", + "responseValue", + "requestorId" +}) +public class RequestInfo { + + /** + * billing account associated with the model being operated on + * + */ + @JsonProperty("billingAccountNumber") + private String billingAccountNumber; + /** + * client URL to use for asynchronous responses + * + */ + @JsonProperty("callbackUrl") + private String callbackUrl; + /** + * Optional correlationId for async callback requests + * + */ + @JsonProperty("correlator") + private String correlator; + /** + * Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique) + * + */ + @JsonProperty("instanceName") + private String instanceName; + /** + * reference to an order + * + */ + @JsonProperty("orderNumber") + private String orderNumber; + /** + * order version number + * + */ + @JsonProperty("orderVersion") + private Double orderVersion; + /** + * UUID for the product family associated with the model being operated on + * + */ + @JsonProperty("productFamilyId") + private String productFamilyId; + /** + * source of the request--not authoritative--actual source revealed via authentication + * + */ + @JsonProperty("source") + private String source; + /** + * true or false boolean indicating whether rollbacks should be suppressed on failures + * + */ + @JsonProperty("suppressRollback") + private Boolean suppressRollback; + /** + * Is the user selected value based on the validResponses list provided to complete the manual task + * + */ + @JsonProperty("responseValue") + private String responseValue; + /** + * The id of the person who initiated the completion request + * + */ + @JsonProperty("requestorId") + private String requestorId; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * billing account associated with the model being operated on + * + * @return + * The billingAccountNumber + */ + @JsonProperty("billingAccountNumber") + public String getBillingAccountNumber() { + return billingAccountNumber; + } + + /** + * billing account associated with the model being operated on + * + * @param billingAccountNumber + * The billingAccountNumber + */ + @JsonProperty("billingAccountNumber") + public void setBillingAccountNumber(String billingAccountNumber) { + this.billingAccountNumber = billingAccountNumber; + } + + /** + * client URL to use for asynchronous responses + * + * @return + * The callbackUrl + */ + @JsonProperty("callbackUrl") + public String getCallbackUrl() { + return callbackUrl; + } + + /** + * client URL to use for asynchronous responses + * + * @param callbackUrl + * The callbackUrl + */ + @JsonProperty("callbackUrl") + public void setCallbackUrl(String callbackUrl) { + this.callbackUrl = callbackUrl; + } + + /** + * Optional correlationId for async callback requests + * + * @return + * The correlator + */ + @JsonProperty("correlator") + public String getCorrelator() { + return correlator; + } + + /** + * Optional correlationId for async callback requests + * + * @param correlator + * The correlator + */ + @JsonProperty("correlator") + public void setCorrelator(String correlator) { + this.correlator = correlator; + } + + /** + * Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique) + * + * @return + * The instanceName + */ + @JsonProperty("instanceName") + public String getInstanceName() { + return instanceName; + } + + /** + * Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique) + * + * @param instanceName + * The instanceName + */ + @JsonProperty("instanceName") + public void setInstanceName(String instanceName) { + this.instanceName = instanceName; + } + + /** + * reference to an order + * + * @return + * The orderNumber + */ + @JsonProperty("orderNumber") + public String getOrderNumber() { + return orderNumber; + } + + /** + * reference to an order + * + * @param orderNumber + * The orderNumber + */ + @JsonProperty("orderNumber") + public void setOrderNumber(String orderNumber) { + this.orderNumber = orderNumber; + } + + /** + * order version number + * + * @return + * The orderVersion + */ + @JsonProperty("orderVersion") + public Double getOrderVersion() { + return orderVersion; + } + + /** + * order version number + * + * @param orderVersion + * The orderVersion + */ + @JsonProperty("orderVersion") + public void setOrderVersion(Double orderVersion) { + this.orderVersion = orderVersion; + } + + /** + * UUID for the product family associated with the model being operated on + * + * @return + * The productFamilyId + */ + @JsonProperty("productFamilyId") + public String getProductFamilyId() { + return productFamilyId; + } + + /** + * UUID for the product family associated with the model being operated on + * + * @param productFamilyId + * The productFamilyId + */ + @JsonProperty("productFamilyId") + public void setProductFamilyId(String productFamilyId) { + this.productFamilyId = productFamilyId; + } + + /** + * source of the request--not authoritative--actual source revealed via authentication + * + * @return + * The source + */ + @JsonProperty("source") + public String getSource() { + return source; + } + + /** + * source of the request--not authoritative--actual source revealed via authentication + * + * @param source + * The source + */ + @JsonProperty("source") + public void setSource(String source) { + this.source = source; + } + + /** + * true or false boolean indicating whether rollbacks should be suppressed on failures + * + * @return + * The suppressRollback + */ + @JsonProperty("suppressRollback") + public Boolean getSuppressRollback() { + return suppressRollback; + } + + /** + * true or false boolean indicating whether rollbacks should be suppressed on failures + * + * @param suppressRollback + * The suppressRollback + */ + @JsonProperty("suppressRollback") + public void setSuppressRollback(Boolean suppressRollback) { + this.suppressRollback = suppressRollback; + } + + /** + * Is the user selected value based on the validResponses list provided to complete the manual task + * + * @return + * The responseValue + */ + @JsonProperty("responseValue") + public String getResponseValue() { + return responseValue; + } + + /** + * Is the user selected value based on the validResponses list provided to complete the manual task + * + * @param responseValue + * The responseValue + */ + @JsonProperty("responseValue") + public void setResponseValue(String responseValue) { + this.responseValue = responseValue; + } + + /** + * The id of the person who initiated the completion request + * + * @return + * The requestorId + */ + @JsonProperty("requestorId") + public String getRequestorId() { + return requestorId; + } + + /** + * The id of the person who initiated the completion request + * + * @param requestorId + * The requestorId + */ + @JsonProperty("requestorId") + public void setRequestorId(String requestorId) { + this.requestorId = requestorId; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(billingAccountNumber).append(callbackUrl).append(correlator).append(instanceName).append(orderNumber).append(orderVersion).append(productFamilyId).append(source).append(suppressRollback).append(responseValue).append(requestorId).append(additionalProperties).toHashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RequestInfo) == false) { + return false; + } + RequestInfo rhs = ((RequestInfo) other); + return new EqualsBuilder().append(billingAccountNumber, rhs.billingAccountNumber).append(callbackUrl, rhs.callbackUrl).append(correlator, rhs.correlator).append(instanceName, rhs.instanceName).append(orderNumber, rhs.orderNumber).append(orderVersion, rhs.orderVersion).append(productFamilyId, rhs.productFamilyId).append(source, rhs.source).append(suppressRollback, rhs.suppressRollback).append(responseValue, rhs.responseValue).append(requestorId, rhs.requestorId).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java new file mode 100644 index 000000000..d3574d7b5 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RequestParameters.java @@ -0,0 +1,102 @@ + +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import javax.annotation.Generated; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "subscriptionServiceType", + "userParams" +}) +public class RequestParameters { + + @JsonProperty("subscriptionServiceType") + private String subscriptionServiceType; + @JsonProperty("userParams") + private List userParams = new ArrayList(); + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The subscriptionServiceType + */ + @JsonProperty("subscriptionServiceType") + public String getSubscriptionServiceType() { + return subscriptionServiceType; + } + + /** + * + * @param subscriptionServiceType + * The subscriptionServiceType + */ + @JsonProperty("subscriptionServiceType") + public void setSubscriptionServiceType(String subscriptionServiceType) { + this.subscriptionServiceType = subscriptionServiceType; + } + + /** + * + * @return + * The userParams + */ + @JsonProperty("userParams") + public List getUserParams() { + return userParams; + } + + /** + * + * @param userParams + * The userParams + */ + @JsonProperty("userParams") + public void setUserParams(List userParams) { + this.userParams = userParams; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(subscriptionServiceType).append(userParams).append(additionalProperties).toHashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof RequestParameters) == false) { + return false; + } + RequestParameters rhs = ((RequestParameters) other); + return new EqualsBuilder().append(subscriptionServiceType, rhs.subscriptionServiceType).append(userParams, rhs.userParams).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java b/vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java new file mode 100644 index 000000000..b91ea410a --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/RestObject.java @@ -0,0 +1,123 @@ +/*- + * ============LICENSE_START======================================================= + * VID + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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.vid.model.mso; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.google.common.base.MoreObjects; + +import javax.ws.rs.core.Response; +import java.text.DateFormat; +import java.text.SimpleDateFormat; + +/** + * The Class RestObject. + * + * @param the generic type + */ +public class RestObject { + + final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); + + final static ObjectMapper objectMapper = new ObjectMapper(); + + /** + * Generic version of the RestObject class. + * + */ + // T stands for "Type" + private T t; + + // The string source of t, if available + private String rawT; + + /** The status code. */ + private int statusCode= 0; + + public RestObject() { + } + + public RestObject(Response cres, Class tClass) { + + String rawEntity = null; + try { + cres.bufferEntity(); + rawEntity = cres.readEntity(String.class); + T t = (T) objectMapper.readValue(rawEntity, tClass); + this.set(t); + } + catch ( Exception e ) { + try { + this.setRaw(rawEntity); + } catch (Exception e2) { + } + } + + int status = cres.getStatus(); + this.setStatusCode (status); + } + + + /** + * Sets the. + * + * @param t the t + */ + public void set(T t) { this.t = t; } + + /** + * Gets the. + * + * @return the t + */ + public T get() { return t; } + + /** + * Sets the status code. + * + * @param v the new status code + */ + public void setStatusCode(int v) { this.statusCode = v; } + + /** + * Gets the status code. + * + * @return the status code + */ + public int getStatusCode() { return this.statusCode; } + + public String getRaw() { + return rawT; + } + + public void setRaw(String rawT) { + this.rawT = rawT; + } + + @Override + public String toString() { + return MoreObjects.toStringHelper(this) + .add("t", t) + .add("rawT", rawT) + .add("statusCode", statusCode) + .toString(); + } +} + diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java b/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java new file mode 100644 index 000000000..67cded838 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/SubscriberInfo.java @@ -0,0 +1,146 @@ + +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import javax.annotation.Generated; +import java.util.HashMap; +import java.util.Map; + + +/** + * fields providing information about the subscriber associated with the request + * + */ +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "globalSubscriberId", + "subscriberCommonSiteId", + "subscriberName" +}) +public class SubscriberInfo { + + /** + * global Customer Id understood by A&AI + * + */ + @JsonProperty("globalSubscriberId") + private String globalSubscriberId; + /** + * id representing the location of the subscriber + * + */ + @JsonProperty("subscriberCommonSiteId") + private String subscriberCommonSiteId; + /** + * name of the customer or subscriber + * + */ + @JsonProperty("subscriberName") + private String subscriberName; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * global Customer Id understood by A&AI + * + * @return + * The globalSubscriberId + */ + @JsonProperty("globalSubscriberId") + public String getGlobalSubscriberId() { + return globalSubscriberId; + } + + /** + * global Customer Id understood by A&AI + * + * @param globalSubscriberId + * The globalSubscriberId + */ + @JsonProperty("globalSubscriberId") + public void setGlobalSubscriberId(String globalSubscriberId) { + this.globalSubscriberId = globalSubscriberId; + } + + /** + * id representing the location of the subscriber + * + * @return + * The subscriberCommonSiteId + */ + @JsonProperty("subscriberCommonSiteId") + public String getSubscriberCommonSiteId() { + return subscriberCommonSiteId; + } + + /** + * id representing the location of the subscriber + * + * @param subscriberCommonSiteId + * The subscriberCommonSiteId + */ + @JsonProperty("subscriberCommonSiteId") + public void setSubscriberCommonSiteId(String subscriberCommonSiteId) { + this.subscriberCommonSiteId = subscriberCommonSiteId; + } + + /** + * name of the customer or subscriber + * + * @return + * The subscriberName + */ + @JsonProperty("subscriberName") + public String getSubscriberName() { + return subscriberName; + } + + /** + * name of the customer or subscriber + * + * @param subscriberName + * The subscriberName + */ + @JsonProperty("subscriberName") + public void setSubscriberName(String subscriberName) { + this.subscriberName = subscriberName; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(globalSubscriberId).append(subscriberCommonSiteId).append(subscriberName).append(additionalProperties).toHashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof SubscriberInfo) == false) { + return false; + } + SubscriberInfo rhs = ((SubscriberInfo) other); + return new EqualsBuilder().append(globalSubscriberId, rhs.globalSubscriberId).append(subscriberCommonSiteId, rhs.subscriberCommonSiteId).append(subscriberName, rhs.subscriberName).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java b/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java new file mode 100644 index 000000000..384e45631 --- /dev/null +++ b/vid-automation/src/test/java/org/onap/vid/model/mso/UserParam.java @@ -0,0 +1,100 @@ + +package org.onap.vid.model.mso; + +import com.fasterxml.jackson.annotation.*; +import org.apache.commons.lang3.builder.EqualsBuilder; +import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import javax.annotation.Generated; +import java.util.HashMap; +import java.util.Map; + +@JsonInclude(JsonInclude.Include.NON_NULL) +@Generated("org.jsonschema2pojo") +@JsonPropertyOrder({ + "name", + "value" +}) +public class UserParam { + + @JsonProperty("name") + private String name; + @JsonProperty("value") + private String value; + @JsonIgnore + private Map additionalProperties = new HashMap(); + + /** + * + * @return + * The name + */ + @JsonProperty("name") + public String getName() { + return name; + } + + /** + * + * @param name + * The name + */ + @JsonProperty("name") + public void setName(String name) { + this.name = name; + } + + /** + * + * @return + * The value + */ + @JsonProperty("value") + public String getValue() { + return value; + } + + /** + * + * @param value + * The value + */ + @JsonProperty("value") + public void setValue(String value) { + this.value = value; + } + + @Override + public String toString() { + return ToStringBuilder.reflectionToString(this); + } + + @JsonAnyGetter + public Map getAdditionalProperties() { + return this.additionalProperties; + } + + @JsonAnySetter + public void setAdditionalProperty(String name, Object value) { + this.additionalProperties.put(name, value); + } + + @Override + public int hashCode() { + return new HashCodeBuilder().append(name).append(value).append(additionalProperties).toHashCode(); + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } + if ((other instanceof UserParam) == false) { + return false; + } + UserParam rhs = ((UserParam) other); + return new EqualsBuilder().append(name, rhs.name).append(value, rhs.value).append(additionalProperties, rhs.additionalProperties).isEquals(); + } + +} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequest.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequest.java deleted file mode 100644 index 273706686..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequest.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@JsonPropertyOrder({ - "requestDetails", - "requestType" -}) - -public class ChangeManagementRequest { - - public static class MsoChangeManagementRequest { - public final static String SOFTWARE_UPDATE = "inPlaceSoftwareUpdate"; - public static final String REPLACE = "replace"; - public final static String CONFIG_UPDATE = "applyUpdatedConfig"; - - } - - public final static String VNF_IN_PLACE_SOFTWARE_UPDATE = "vnf in place software update"; - public static final String UPDATE = "update"; - public static final String REPLACE = "replace"; - public final static String CONFIG_UPDATE = "vnf config update"; - - @JsonProperty("requestDetails") - private List requestDetails; - - @JsonProperty("requestType") - private String requestType; - - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("requestDetails") - public List getRequestDetails() { - return requestDetails; - } - - @JsonProperty("requestDetails") - public void setRequestDetails(List requestDetails) { - this.requestDetails = requestDetails; - } - - @JsonProperty("requestType") - public String getRequestType() { - return requestType; - } - - @JsonProperty("requestType") - public void setRequestType(String requestType) { - this.requestType = requestType; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequestDetails.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequestDetails.java deleted file mode 100644 index 4e50e10cd..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ChangeManagementRequestDetails.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"modelInfo", -"cloudConfiguration", -"requestInfo", -"requestParameters", -"vnfName", -"vnfInstanceId" -}) -public class ChangeManagementRequestDetails extends RequestDetails{ - - @JsonProperty("vnfName") - private String vnfName; - @JsonProperty("vnfInstanceId") - private String vnfInstanceId; - - @JsonProperty("vnfName") - public String getVnfName() { - return vnfName; - } - - @JsonProperty("vnfName") - public void setVnfName(String vnfName) { - this.vnfName = vnfName; - } - @JsonProperty("vnfInstanceId") - public String getVnfInstanceId() { - return vnfInstanceId; - } - - @JsonProperty("vnfInstanceId") - public void setVnfInstanceId(String vnfInstanceId) { - this.vnfInstanceId = vnfInstanceId; - } -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/CloudConfiguration.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/CloudConfiguration.java deleted file mode 100644 index 279fda1b7..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/CloudConfiguration.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.opencomp.vid.model.mso; - - -public class CloudConfiguration { - - public CloudConfiguration() { - } - - public String lcpCloudRegionId; - - public String tenantId; - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ExceptionResponse.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/ExceptionResponse.java deleted file mode 100644 index b7711b57b..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ExceptionResponse.java +++ /dev/null @@ -1,87 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.opencomp.vid.model.mso; - -/** - * The Class ExceptionResponse. - */ -public class ExceptionResponse { - - public ExceptionResponse() { - } - - /** The exception. */ - private String exception; - - /** The message. */ - private String message; - - public ExceptionResponse(String exception, String message) { - this.exception = exception; - this.message = message; - } - - public ExceptionResponse(Exception exception) { - setException(exception); - } - - /** - * Gets the exception. - * - * @return the exception - */ - public String getException() { - return exception; - } - - /** - * Sets the exception. - * - * @param exception the new exception - */ - public void setException(String exception) { - this.exception = exception; - } - - public void setException(Exception exception) { - setException(exception.getClass().toString().replaceFirst("^.*[\\.$]", "")); - setMessage(exception.getMessage()); - } - - /** - * Gets the message. - * - * @return the message - */ - public String getMessage() { - return message; - } - - /** - * Sets the message. - * - * @param message the new message - */ - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ModelInfo.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/ModelInfo.java deleted file mode 100644 index c636760eb..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ModelInfo.java +++ /dev/null @@ -1,124 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; - -import java.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ -"modelType", -"modelInvariantId", -"modelVersionId", -"modelName", -"modelVersion", -"modelCustomizationName", -"modelCustomizationId" -}) -public class ModelInfo { - - public ModelInfo(){ - - } - - @JsonProperty("modelType") - private String modelType; - @JsonProperty("modelInvariantId") - private String modelInvariantId; - @JsonProperty("modelVersionId") - private String modelVersionId; - @JsonProperty("modelName") - private String modelName; - @JsonProperty("modelVersion") - private String modelVersion; - @JsonProperty("modelCustomizationName") - private String modelCustomizationName; - @JsonProperty("modelCustomizationId") - private String modelCustomizationId; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - @JsonProperty("modelType") - public String getModelType() { - return modelType; - } - - @JsonProperty("modelType") - public void setModelType(String modelType) { - this.modelType = modelType; - } - - @JsonProperty("modelInvariantId") - public String getModelInvariantId() { - return modelInvariantId; - } - - @JsonProperty("modelInvariantId") - public void setModelInvariantId(String modelInvariantId) { - this.modelInvariantId = modelInvariantId; - } - - @JsonProperty("modelVersionId") - public String getModelVersionId() { - return modelVersionId; - } - - @JsonProperty("modelVersionId") - public void setModelVersionId(String modelVersionId) { - this.modelVersionId = modelVersionId; - } - - @JsonProperty("modelName") - public String getModelName() { - return modelName; - } - - @JsonProperty("modelName") - public void setModelName(String modelName) { - this.modelName = modelName; - } - - @JsonProperty("modelVersion") - public String getModelVersion() { - return modelVersion; - } - - @JsonProperty("modelVersion") - public void setModelVersion(String modelVersion) { - this.modelVersion = modelVersion; - } - - @JsonProperty("modelCustomizationName") - public String getModelCustomizationName() { - return modelCustomizationName; - } - - @JsonProperty("modelCustomizationName") - public void setModelCustomizationName(String modelCustomizationName) { - this.modelCustomizationName = modelCustomizationName; - } - - @JsonProperty("modelCustomizationId") - public String getModelCustomizationId() { - return modelCustomizationId; - } - - @JsonProperty("modelCustomizationId") - public void setModelCustomizationId(String modelCustomizationId) { - this.modelCustomizationId = modelCustomizationId; - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - - - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoExceptionResponse.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoExceptionResponse.java deleted file mode 100644 index 4f11f67fa..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoExceptionResponse.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.opencomp.vid.model.mso; - -public class MsoExceptionResponse { - - public static class ServiceException { - - public ServiceException(String messageId, String text) { - this.messageId = messageId; - this.text = text; - } - - public ServiceException() { - } - - public String messageId; - public String text; - } - - public ServiceException serviceException; - - public MsoExceptionResponse() { - } - - public MsoExceptionResponse(String messageId, String text) { - this.serviceException = new ServiceException(messageId, text); - } - - public MsoExceptionResponse(Exception exception) { - ExceptionResponse exceptionResponse = new ExceptionResponse(exception); - this.serviceException = new ServiceException(exceptionResponse.getException(), exceptionResponse.getMessage()); - } -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapper2.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapper2.java deleted file mode 100644 index d0487e19c..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapper2.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; - -@JsonPropertyOrder({ - "status", - "entity" -}) - -/* -This is a brother of MsoResponseWrapper. I (Ittay) think it's better. -It is generic, immutable, and has some knowledge about RestObject. -The serialized "entity" field may be either String or nested object. - */ -public class MsoResponseWrapper2 implements MsoResponseWrapperInterface { - - final static ObjectMapper objectMapper = new ObjectMapper(); - - private final int status; - private final T entity; - private final String raw; - - public MsoResponseWrapper2(RestObject msoResponse) { - this.status = msoResponse.getStatusCode(); - this.entity = msoResponse.get(); - this.raw = msoResponse.getRaw(); - } - - public MsoResponseWrapper2( - @JsonProperty(value = "status", required = true) int status, - @JsonProperty(value = "entity", required = true) T entity) { - this.status = status; - this.entity = entity; - this.raw = null; - } - - public int getStatus() { - return status; - } - - @Override - @org.codehaus.jackson.annotate.JsonIgnore - @com.fasterxml.jackson.annotation.JsonIgnore - public String getResponse() { - try { - return objectMapper.writeValueAsString(this); - } catch (JsonProcessingException e) { - return getEntity() != null ? getEntity().toString() : null; - } - } - - @JsonProperty - public Object getEntity() { - return entity != null ? entity : raw; - } - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapperInterface.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapperInterface.java deleted file mode 100644 index aafa4c339..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/MsoResponseWrapperInterface.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.JsonProperty; - -public interface MsoResponseWrapperInterface { - @JsonProperty("entity") - Object getEntity(); - - @JsonProperty("status") - int getStatus(); - - @org.codehaus.jackson.annotate.JsonIgnore - @com.fasterxml.jackson.annotation.JsonIgnore - String getResponse(); -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironment.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironment.java deleted file mode 100644 index 66c5b1834..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironment.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.opencomp.vid.model.mso; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class OperationalEnvironment { - - private String operationalEnvironmentId; - private String operationalEnvironmentName; - private String operationalEnvironmentType; - private String operationalEnvironmentStatus; - private String tenantContext; - private String workloadContext; - private String resourceVersion; - private RelationshipList relationshipList; - - public OperationalEnvironment() { - } - - public OperationalEnvironment(String operationalEnvironmentId, String operationalEnvironmentName, String operationalEnvironmentType, String operationalEnvironmentStatus, String tenantContext, String workloadContext, String resourceVersion, RelationshipList relationshipList) { - this.operationalEnvironmentId = operationalEnvironmentId; - this.operationalEnvironmentName = operationalEnvironmentName; - this.operationalEnvironmentType = operationalEnvironmentType; - this.operationalEnvironmentStatus = operationalEnvironmentStatus; - this.tenantContext = tenantContext; - this.workloadContext = workloadContext; - this.resourceVersion = resourceVersion; - this.relationshipList = relationshipList; - } - - @JsonProperty("operational-environment-id") - public String getOperationalEnvironmentId() { - return operationalEnvironmentId; - } - - public void setOperationalEnvironmentId(String operationalEnvironmentId) { - this.operationalEnvironmentId = operationalEnvironmentId; - } - - @JsonProperty("operational-environment-name") - public String getOperationalEnvironmentName() { - return operationalEnvironmentName; - } - - public void setOperationalEnvironmentName(String operationalEnvironmentName) { - this.operationalEnvironmentName = operationalEnvironmentName; - } - - @JsonProperty("operational-environment-type") - public String getOperationalEnvironmentType() { - return operationalEnvironmentType; - } - - public void setOperationalEnvironmentType(String operationalEnvironmentType) { - this.operationalEnvironmentType = operationalEnvironmentType; - } - - @JsonProperty("operational-environment-status") - public String getOperationalEnvironmentStatus() { - return operationalEnvironmentStatus; - } - - public void setOperationalEnvironmentStatus(String operationalEnvironmentStatus) { - this.operationalEnvironmentStatus = operationalEnvironmentStatus; - } - - @JsonProperty("tenant-context") - public String getTenantContext() { - return tenantContext; - } - - public void setTenantContext(String tenantContext) { - this.tenantContext = tenantContext; - } - - @JsonProperty("workload-context") - public String getWorkloadContext() { - return workloadContext; - } - - public void setWorkloadContext(String workloadContext) { - this.workloadContext = workloadContext; - } - - @JsonProperty("resource-version") - public String getResourceVersion() { - return resourceVersion; - } - - public void setResourceVersion(String resourceVersion) { - this.resourceVersion = resourceVersion; - } - - @JsonProperty("relationship-list") - public RelationshipList getRelationshipList() { - return relationshipList; - } - - public void setRelationshipList(RelationshipList relationshipList) { - this.relationshipList = relationshipList; - } -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironmentList.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironmentList.java deleted file mode 100644 index 9cd0b7ab7..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/OperationalEnvironmentList.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.opencomp.vid.model.mso; - -import org.codehaus.jackson.annotate.JsonIgnoreProperties; -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.List; - -@JsonIgnoreProperties(ignoreUnknown = true) -public class OperationalEnvironmentList { - - @JsonProperty("operational-environment") - public List getOperationalEnvironment() { - return operationalEnvironment; - } - - @JsonProperty("operational-environment") - public void setOperationalEnvironment(List operationalEnvironment) { - this.operationalEnvironment = operationalEnvironment; - } - - public OperationalEnvironmentList() { - } - - public OperationalEnvironmentList(List operationalEnvironment) { - this.operationalEnvironment = operationalEnvironment; - } - - private List operationalEnvironment; -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ProxyResponse.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/ProxyResponse.java deleted file mode 100644 index b8c387d81..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/ProxyResponse.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.google.common.base.MoreObjects; - -/** - * Created by Oren on 7/10/17. - */ -public class ProxyResponse { - - protected String errorMessage; - - protected int httpCode; - - public String getErrorMessage() { - return errorMessage; - } - - - public int getHttpCode() { - return httpCode; - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("httpCode", httpCode) - .add("errorMessage", errorMessage) - .toString(); - } -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstance.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstance.java deleted file mode 100644 index fad7c32bd..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstance.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "instanceId", - "modelInfo" -}) -public class RelatedInstance { - - @JsonProperty("instanceId") - public String instanceId; - - - @JsonProperty("modelInfo") - public ModelInfo modelInfo; - - @JsonGetter - public String getInstanceId() { - return instanceId; - } - - @JsonSetter - public void setInstanceId(String instanceId) { - this.instanceId = instanceId; - } - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstanceList.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstanceList.java deleted file mode 100644 index 5e6ccae6d..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedInstanceList.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonPropertyOrder; -import com.fasterxml.jackson.annotation.JsonSetter; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "relatedInstance" -}) -public class RelatedInstanceList { - - @JsonProperty("relatedInstance") - public RelatedInstance relatedInstance; - - @JsonSetter - public RelatedInstance getRelatedInstance() { - return relatedInstance; - } - - @JsonSetter - public void setRelatedInstance(RelatedInstance relatedInstance) { - this.relatedInstance = relatedInstance; - } -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedToProperty.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedToProperty.java deleted file mode 100644 index 6d012f985..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelatedToProperty.java +++ /dev/null @@ -1,35 +0,0 @@ -package org.opencomp.vid.model.mso; - - -import org.codehaus.jackson.annotate.JsonProperty; - -public class RelatedToProperty { - - 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; - } - - - @JsonProperty("property-key") - public String propertyKey; - - - @JsonProperty("property-value") - public String propertyValue; - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/Relationship.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/Relationship.java deleted file mode 100644 index 814237db5..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/Relationship.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.opencomp.vid.model.mso; - -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.List; - - -public class Relationship { - - @JsonProperty("related-to") - public String relatedTo; - - @JsonProperty("related-link") - public String relatedLink; - - @JsonProperty("relationship-data") - public List relationshipData; - - @JsonProperty("related-to-property") - public List 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 getRelationDataList() { - return relationshipData; - } - - public void setRelationDataList(List relationDataList) { - this.relationshipData = relationDataList; - } - - public List getRelatedToPropertyList() { - return relatedToProperty; - } - - public void setRelatedToPropertyList(List relatedToPropertyList) { - this.relatedToProperty = relatedToPropertyList; - } - - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipData.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipData.java deleted file mode 100644 index 4fdac42a0..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipData.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.opencomp.vid.model.mso; - - -import org.codehaus.jackson.annotate.JsonProperty; - -public class RelationshipData { - @JsonProperty("relationship-key") - public String getRelationshipKey() { - return relationshipKey; - } - @JsonProperty("relationship-key") - public void setRelationshipKey(String relationshipKey) { - this.relationshipKey = relationshipKey; - } - @JsonProperty("relationship-value") - public String getRelationshipValue() { - return relationshipValue; - } - @JsonProperty("relationship-value") - public void setRelationshipValue(String relationshipValue) { - this.relationshipValue = relationshipValue; - } - - @JsonProperty("relationship-key") - public String relationshipKey; - - @JsonProperty("relationship-value") - public String relationshipValue; - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipList.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipList.java deleted file mode 100644 index e2b5d5ef4..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RelationshipList.java +++ /dev/null @@ -1,26 +0,0 @@ -package org.opencomp.vid.model.mso; - -import org.codehaus.jackson.annotate.JsonProperty; - -import java.util.List; - - -public class RelationshipList { - - @JsonProperty("relationship") - public List getRelationship() { - return relationship; - } - - @JsonProperty("relationship") - public void setRelationship(List relationship) { - this.relationship = relationship; - } - - @JsonProperty("relationship") - public List relationship; - - - - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestDetails.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestDetails.java deleted file mode 100644 index b56a7d985..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestDetails.java +++ /dev/null @@ -1,218 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - - -/** - * aggregates the context, configuraiton and detailed parameters associated with the request into a single structure. - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@JsonPropertyOrder({ - "cloudConfiguration", - "modelInfo", - "relatedModelList", - "requestInfo", - "subscriberInfo", - "requestParameters" -}) -public class RequestDetails { - - /** The related model list. */ - @JsonProperty("relatedInstanceList") - public List relatedInstList; - /** The cloud configuration. */ - @JsonProperty("cloudConfiguration") - private CloudConfiguration cloudConfiguration; - - /** The model info. */ - @JsonProperty("modelInfo") - private ModelInfo modelInfo; - - /** The request info. */ - @JsonProperty("requestInfo") - private RequestInfo requestInfo; - - /** The subscriber info. */ - @JsonProperty("subscriberInfo") - private SubscriberInfo subscriberInfo; - - /** The request parameters. */ - @JsonProperty("requestParameters") - private RequestParameters requestParameters; - - /** The additional properties. */ - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * Gets the cloud configuration. - * - * @return The cloudConfiguration - */ - @JsonProperty("cloudConfiguration") - public CloudConfiguration getCloudConfiguration() { - return cloudConfiguration; - } - - /** - * Sets the cloud configuration. - * - * @param cloudConfiguration The cloudConfiguration - */ - @JsonProperty("cloudConfiguration") - public void setCloudConfiguration(CloudConfiguration cloudConfiguration) { - this.cloudConfiguration = cloudConfiguration; - } - - /** - * Gets the model info. - * - * @return The modelInfo - */ - @JsonProperty("modelInfo") - public ModelInfo getModelInfo() { - return modelInfo; - } - - /** - * Sets the model info. - * - * @param modelInfo The modelInfo - */ - @JsonProperty("modelInfo") - public void setModelInfo(ModelInfo modelInfo) { - this.modelInfo = modelInfo; - } - - /** - * Gets the request info. - * - * @return The requestInfo - */ - @JsonProperty("requestInfo") - public RequestInfo getRequestInfo() { - return requestInfo; - } - - /** - * Sets the request info. - * - * @param requestInfo The requestInfo - */ - @JsonProperty("requestInfo") - public void setRequestInfo(RequestInfo requestInfo) { - this.requestInfo = requestInfo; - } - - /** - * Gets the subscriber info. - * - * @return The subscriberInfo - */ - @JsonProperty("subscriberInfo") - public SubscriberInfo getSubscriberInfo() { - return subscriberInfo; - } - - /** - * Sets the subscriber info. - * - * @param subscriberInfo The subscriberInfo - */ - @JsonProperty("subscriberInfo") - public void setSubscriberInfo(SubscriberInfo subscriberInfo) { - this.subscriberInfo = subscriberInfo; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#toString() - */ - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#getAdditionalProperties() - */ - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#setAdditionalProperty(java.lang.String, java.lang.Object) - */ - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#hashCode() - */ - @Override - public int hashCode() { - return new HashCodeBuilder().append(cloudConfiguration).append(modelInfo).append(requestInfo).append(getRequestParameters()).append(subscriberInfo).append(additionalProperties).toHashCode(); - } - - /* (non-Javadoc) - * @see org.openecomp.vid.domain.mso.RequestDetails#equals(java.lang.Object) - */ - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RequestDetails) == false) { - return false; - } - RequestDetails rhs = ((RequestDetails) other); - return new EqualsBuilder().append(cloudConfiguration, rhs.cloudConfiguration).append(modelInfo, rhs.modelInfo).append(requestInfo, rhs.requestInfo).append(getRequestParameters(), rhs.getRequestParameters()).append(subscriberInfo, rhs.subscriberInfo).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - - public RequestParameters getRequestParameters() { - return requestParameters; - } - - public void setRequestParameters(RequestParameters requestParameters) { - this.requestParameters = requestParameters; - } - - @JsonGetter - public List getRelatedInstList() { - return relatedInstList; - } - - @JsonSetter - public void setRelatedInstList(List relatedInstList) { - this.relatedInstList = relatedInstList; - } -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestInfo.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestInfo.java deleted file mode 100644 index 6a6844bce..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestInfo.java +++ /dev/null @@ -1,378 +0,0 @@ - -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; - -import javax.annotation.Generated; -import java.util.HashMap; -import java.util.Map; - - -/** - * fields providing general context information for the request - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "billingAccountNumber", - "callbackUrl", - "correlator", - "instanceName", - "orderNumber", - "orderVersion", - "productFamilyId", - "source", - "suppressRollback", - "responseValue", - "requestorId" -}) -public class RequestInfo { - - /** - * billing account associated with the model being operated on - * - */ - @JsonProperty("billingAccountNumber") - private String billingAccountNumber; - /** - * client URL to use for asynchronous responses - * - */ - @JsonProperty("callbackUrl") - private String callbackUrl; - /** - * Optional correlationId for async callback requests - * - */ - @JsonProperty("correlator") - private String correlator; - /** - * Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique) - * - */ - @JsonProperty("instanceName") - private String instanceName; - /** - * reference to an order - * - */ - @JsonProperty("orderNumber") - private String orderNumber; - /** - * order version number - * - */ - @JsonProperty("orderVersion") - private Double orderVersion; - /** - * UUID for the product family associated with the model being operated on - * - */ - @JsonProperty("productFamilyId") - private String productFamilyId; - /** - * source of the request--not authoritative--actual source revealed via authentication - * - */ - @JsonProperty("source") - private String source; - /** - * true or false boolean indicating whether rollbacks should be suppressed on failures - * - */ - @JsonProperty("suppressRollback") - private Boolean suppressRollback; - /** - * Is the user selected value based on the validResponses list provided to complete the manual task - * - */ - @JsonProperty("responseValue") - private String responseValue; - /** - * The id of the person who initiated the completion request - * - */ - @JsonProperty("requestorId") - private String requestorId; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * billing account associated with the model being operated on - * - * @return - * The billingAccountNumber - */ - @JsonProperty("billingAccountNumber") - public String getBillingAccountNumber() { - return billingAccountNumber; - } - - /** - * billing account associated with the model being operated on - * - * @param billingAccountNumber - * The billingAccountNumber - */ - @JsonProperty("billingAccountNumber") - public void setBillingAccountNumber(String billingAccountNumber) { - this.billingAccountNumber = billingAccountNumber; - } - - /** - * client URL to use for asynchronous responses - * - * @return - * The callbackUrl - */ - @JsonProperty("callbackUrl") - public String getCallbackUrl() { - return callbackUrl; - } - - /** - * client URL to use for asynchronous responses - * - * @param callbackUrl - * The callbackUrl - */ - @JsonProperty("callbackUrl") - public void setCallbackUrl(String callbackUrl) { - this.callbackUrl = callbackUrl; - } - - /** - * Optional correlationId for async callback requests - * - * @return - * The correlator - */ - @JsonProperty("correlator") - public String getCorrelator() { - return correlator; - } - - /** - * Optional correlationId for async callback requests - * - * @param correlator - * The correlator - */ - @JsonProperty("correlator") - public void setCorrelator(String correlator) { - this.correlator = correlator; - } - - /** - * Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique) - * - * @return - * The instanceName - */ - @JsonProperty("instanceName") - public String getInstanceName() { - return instanceName; - } - - /** - * Client provided name for the instance being operated on by the operation (note: not guaranteed to be unique) - * - * @param instanceName - * The instanceName - */ - @JsonProperty("instanceName") - public void setInstanceName(String instanceName) { - this.instanceName = instanceName; - } - - /** - * reference to an order - * - * @return - * The orderNumber - */ - @JsonProperty("orderNumber") - public String getOrderNumber() { - return orderNumber; - } - - /** - * reference to an order - * - * @param orderNumber - * The orderNumber - */ - @JsonProperty("orderNumber") - public void setOrderNumber(String orderNumber) { - this.orderNumber = orderNumber; - } - - /** - * order version number - * - * @return - * The orderVersion - */ - @JsonProperty("orderVersion") - public Double getOrderVersion() { - return orderVersion; - } - - /** - * order version number - * - * @param orderVersion - * The orderVersion - */ - @JsonProperty("orderVersion") - public void setOrderVersion(Double orderVersion) { - this.orderVersion = orderVersion; - } - - /** - * UUID for the product family associated with the model being operated on - * - * @return - * The productFamilyId - */ - @JsonProperty("productFamilyId") - public String getProductFamilyId() { - return productFamilyId; - } - - /** - * UUID for the product family associated with the model being operated on - * - * @param productFamilyId - * The productFamilyId - */ - @JsonProperty("productFamilyId") - public void setProductFamilyId(String productFamilyId) { - this.productFamilyId = productFamilyId; - } - - /** - * source of the request--not authoritative--actual source revealed via authentication - * - * @return - * The source - */ - @JsonProperty("source") - public String getSource() { - return source; - } - - /** - * source of the request--not authoritative--actual source revealed via authentication - * - * @param source - * The source - */ - @JsonProperty("source") - public void setSource(String source) { - this.source = source; - } - - /** - * true or false boolean indicating whether rollbacks should be suppressed on failures - * - * @return - * The suppressRollback - */ - @JsonProperty("suppressRollback") - public Boolean getSuppressRollback() { - return suppressRollback; - } - - /** - * true or false boolean indicating whether rollbacks should be suppressed on failures - * - * @param suppressRollback - * The suppressRollback - */ - @JsonProperty("suppressRollback") - public void setSuppressRollback(Boolean suppressRollback) { - this.suppressRollback = suppressRollback; - } - - /** - * Is the user selected value based on the validResponses list provided to complete the manual task - * - * @return - * The responseValue - */ - @JsonProperty("responseValue") - public String getResponseValue() { - return responseValue; - } - - /** - * Is the user selected value based on the validResponses list provided to complete the manual task - * - * @param responseValue - * The responseValue - */ - @JsonProperty("responseValue") - public void setResponseValue(String responseValue) { - this.responseValue = responseValue; - } - - /** - * The id of the person who initiated the completion request - * - * @return - * The requestorId - */ - @JsonProperty("requestorId") - public String getRequestorId() { - return requestorId; - } - - /** - * The id of the person who initiated the completion request - * - * @param requestorId - * The requestorId - */ - @JsonProperty("requestorId") - public void setRequestorId(String requestorId) { - this.requestorId = requestorId; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public int hashCode() { - return new HashCodeBuilder().append(billingAccountNumber).append(callbackUrl).append(correlator).append(instanceName).append(orderNumber).append(orderVersion).append(productFamilyId).append(source).append(suppressRollback).append(responseValue).append(requestorId).append(additionalProperties).toHashCode(); - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RequestInfo) == false) { - return false; - } - RequestInfo rhs = ((RequestInfo) other); - return new EqualsBuilder().append(billingAccountNumber, rhs.billingAccountNumber).append(callbackUrl, rhs.callbackUrl).append(correlator, rhs.correlator).append(instanceName, rhs.instanceName).append(orderNumber, rhs.orderNumber).append(orderVersion, rhs.orderVersion).append(productFamilyId, rhs.productFamilyId).append(source, rhs.source).append(suppressRollback, rhs.suppressRollback).append(responseValue, rhs.responseValue).append(requestorId, rhs.requestorId).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestParameters.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestParameters.java deleted file mode 100644 index 63157e6e5..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RequestParameters.java +++ /dev/null @@ -1,102 +0,0 @@ - -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; - -import javax.annotation.Generated; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "subscriptionServiceType", - "userParams" -}) -public class RequestParameters { - - @JsonProperty("subscriptionServiceType") - private String subscriptionServiceType; - @JsonProperty("userParams") - private List userParams = new ArrayList(); - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * - * @return - * The subscriptionServiceType - */ - @JsonProperty("subscriptionServiceType") - public String getSubscriptionServiceType() { - return subscriptionServiceType; - } - - /** - * - * @param subscriptionServiceType - * The subscriptionServiceType - */ - @JsonProperty("subscriptionServiceType") - public void setSubscriptionServiceType(String subscriptionServiceType) { - this.subscriptionServiceType = subscriptionServiceType; - } - - /** - * - * @return - * The userParams - */ - @JsonProperty("userParams") - public List getUserParams() { - return userParams; - } - - /** - * - * @param userParams - * The userParams - */ - @JsonProperty("userParams") - public void setUserParams(List userParams) { - this.userParams = userParams; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public int hashCode() { - return new HashCodeBuilder().append(subscriptionServiceType).append(userParams).append(additionalProperties).toHashCode(); - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof RequestParameters) == false) { - return false; - } - RequestParameters rhs = ((RequestParameters) other); - return new EqualsBuilder().append(subscriptionServiceType, rhs.subscriptionServiceType).append(userParams, rhs.userParams).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RestObject.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/RestObject.java deleted file mode 100644 index 1734d25f4..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/RestObject.java +++ /dev/null @@ -1,123 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * VID - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * 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.opencomp.vid.model.mso; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.google.common.base.MoreObjects; - -import javax.ws.rs.core.Response; -import java.text.DateFormat; -import java.text.SimpleDateFormat; - -/** - * The Class RestObject. - * - * @param the generic type - */ -public class RestObject { - - final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS"); - - final static ObjectMapper objectMapper = new ObjectMapper(); - - /** - * Generic version of the RestObject class. - * - */ - // T stands for "Type" - private T t; - - // The string source of t, if available - private String rawT; - - /** The status code. */ - private int statusCode= 0; - - public RestObject() { - } - - public RestObject(Response cres, Class tClass) { - - String rawEntity = null; - try { - cres.bufferEntity(); - rawEntity = cres.readEntity(String.class); - T t = (T) objectMapper.readValue(rawEntity, tClass); - this.set(t); - } - catch ( Exception e ) { - try { - this.setRaw(rawEntity); - } catch (Exception e2) { - } - } - - int status = cres.getStatus(); - this.setStatusCode (status); - } - - - /** - * Sets the. - * - * @param t the t - */ - public void set(T t) { this.t = t; } - - /** - * Gets the. - * - * @return the t - */ - public T get() { return t; } - - /** - * Sets the status code. - * - * @param v the new status code - */ - public void setStatusCode(int v) { this.statusCode = v; } - - /** - * Gets the status code. - * - * @return the status code - */ - public int getStatusCode() { return this.statusCode; } - - public String getRaw() { - return rawT; - } - - public void setRaw(String rawT) { - this.rawT = rawT; - } - - @Override - public String toString() { - return MoreObjects.toStringHelper(this) - .add("t", t) - .add("rawT", rawT) - .add("statusCode", statusCode) - .toString(); - } -} - diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/SubscriberInfo.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/SubscriberInfo.java deleted file mode 100644 index 2f176f775..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/SubscriberInfo.java +++ /dev/null @@ -1,146 +0,0 @@ - -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; - -import javax.annotation.Generated; -import java.util.HashMap; -import java.util.Map; - - -/** - * fields providing information about the subscriber associated with the request - * - */ -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "globalSubscriberId", - "subscriberCommonSiteId", - "subscriberName" -}) -public class SubscriberInfo { - - /** - * global Customer Id understood by A&AI - * - */ - @JsonProperty("globalSubscriberId") - private String globalSubscriberId; - /** - * id representing the location of the subscriber - * - */ - @JsonProperty("subscriberCommonSiteId") - private String subscriberCommonSiteId; - /** - * name of the customer or subscriber - * - */ - @JsonProperty("subscriberName") - private String subscriberName; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * global Customer Id understood by A&AI - * - * @return - * The globalSubscriberId - */ - @JsonProperty("globalSubscriberId") - public String getGlobalSubscriberId() { - return globalSubscriberId; - } - - /** - * global Customer Id understood by A&AI - * - * @param globalSubscriberId - * The globalSubscriberId - */ - @JsonProperty("globalSubscriberId") - public void setGlobalSubscriberId(String globalSubscriberId) { - this.globalSubscriberId = globalSubscriberId; - } - - /** - * id representing the location of the subscriber - * - * @return - * The subscriberCommonSiteId - */ - @JsonProperty("subscriberCommonSiteId") - public String getSubscriberCommonSiteId() { - return subscriberCommonSiteId; - } - - /** - * id representing the location of the subscriber - * - * @param subscriberCommonSiteId - * The subscriberCommonSiteId - */ - @JsonProperty("subscriberCommonSiteId") - public void setSubscriberCommonSiteId(String subscriberCommonSiteId) { - this.subscriberCommonSiteId = subscriberCommonSiteId; - } - - /** - * name of the customer or subscriber - * - * @return - * The subscriberName - */ - @JsonProperty("subscriberName") - public String getSubscriberName() { - return subscriberName; - } - - /** - * name of the customer or subscriber - * - * @param subscriberName - * The subscriberName - */ - @JsonProperty("subscriberName") - public void setSubscriberName(String subscriberName) { - this.subscriberName = subscriberName; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public int hashCode() { - return new HashCodeBuilder().append(globalSubscriberId).append(subscriberCommonSiteId).append(subscriberName).append(additionalProperties).toHashCode(); - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof SubscriberInfo) == false) { - return false; - } - SubscriberInfo rhs = ((SubscriberInfo) other); - return new EqualsBuilder().append(globalSubscriberId, rhs.globalSubscriberId).append(subscriberCommonSiteId, rhs.subscriberCommonSiteId).append(subscriberName, rhs.subscriberName).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} diff --git a/vid-automation/src/test/java/org/opencomp/vid/model/mso/UserParam.java b/vid-automation/src/test/java/org/opencomp/vid/model/mso/UserParam.java deleted file mode 100644 index ab449c2a9..000000000 --- a/vid-automation/src/test/java/org/opencomp/vid/model/mso/UserParam.java +++ /dev/null @@ -1,100 +0,0 @@ - -package org.opencomp.vid.model.mso; - -import com.fasterxml.jackson.annotation.*; -import org.apache.commons.lang3.builder.EqualsBuilder; -import org.apache.commons.lang3.builder.HashCodeBuilder; -import org.apache.commons.lang3.builder.ToStringBuilder; - -import javax.annotation.Generated; -import java.util.HashMap; -import java.util.Map; - -@JsonInclude(JsonInclude.Include.NON_NULL) -@Generated("org.jsonschema2pojo") -@JsonPropertyOrder({ - "name", - "value" -}) -public class UserParam { - - @JsonProperty("name") - private String name; - @JsonProperty("value") - private String value; - @JsonIgnore - private Map additionalProperties = new HashMap(); - - /** - * - * @return - * The name - */ - @JsonProperty("name") - public String getName() { - return name; - } - - /** - * - * @param name - * The name - */ - @JsonProperty("name") - public void setName(String name) { - this.name = name; - } - - /** - * - * @return - * The value - */ - @JsonProperty("value") - public String getValue() { - return value; - } - - /** - * - * @param value - * The value - */ - @JsonProperty("value") - public void setValue(String value) { - this.value = value; - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @JsonAnyGetter - public Map getAdditionalProperties() { - return this.additionalProperties; - } - - @JsonAnySetter - public void setAdditionalProperty(String name, Object value) { - this.additionalProperties.put(name, value); - } - - @Override - public int hashCode() { - return new HashCodeBuilder().append(name).append(value).append(additionalProperties).toHashCode(); - } - - @Override - public boolean equals(Object other) { - if (other == this) { - return true; - } - if ((other instanceof UserParam) == false) { - return false; - } - UserParam rhs = ((UserParam) other); - return new EqualsBuilder().append(name, rhs.name).append(value, rhs.value).append(additionalProperties, rhs.additionalProperties).isEquals(); - } - -} -- cgit 1.2.3-korg