diff options
Diffstat (limited to 'common/src/main/java/org')
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java | 5 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/CustomerInfo.java | 45 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/NssInstance.java (renamed from common/src/main/java/org/onap/so/beans/nsmf/NSSI.java) | 40 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/OperationType.java | 59 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/OrchestrationStatusEnum.java | 36 | ||||
-rw-r--r-- | common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java | 6 |
6 files changed, 163 insertions, 28 deletions
diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java index ed82500210..b14cf7e94d 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ActDeActNssi.java @@ -20,16 +20,19 @@ package org.onap.so.beans.nsmf; +import java.io.Serializable; import java.util.List; import com.fasterxml.jackson.annotation.JsonInclude; @JsonInclude(JsonInclude.Include.NON_NULL) -public class ActDeActNssi { +public class ActDeActNssi implements Serializable { public final static String ACT_URL = "/api/rest/provMns/v1/NSS/%s" + "/activation"; public final static String DE_ACT_URL = "/api/rest/provMns/v1/NSS/%s" + "/deactivation"; + private static final long serialVersionUID = 7597630091910711349L; + private String nsiId; private String nssiId; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/CustomerInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/CustomerInfo.java new file mode 100644 index 0000000000..6381d5b6e2 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/CustomerInfo.java @@ -0,0 +1,45 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.so.beans.nsmf; + +import lombok.Builder; +import lombok.Data; +import java.io.Serializable; + +@Data +@Builder +public class CustomerInfo implements Serializable { + private static final long serialVersionUID = -8749985097619384358L; + + private String globalSubscriberId; + + private String serviceInstanceId; + + private String subscriptionServiceType; + + private String operationId; + + private OperationType operationType; + + private String nsiId; + + private String snssai; + +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NSSI.java b/common/src/main/java/org/onap/so/beans/nsmf/NssInstance.java index a57458f2cf..396e8fce45 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/NSSI.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/NssInstance.java @@ -20,7 +20,15 @@ package org.onap.so.beans.nsmf; -public class NSSI { +import lombok.Builder; +import lombok.Data; +import java.io.Serializable; + +@Data +@Builder +public class NssInstance implements Serializable { + + private static final long serialVersionUID = -153484249182203537L; private String nssiId; @@ -28,33 +36,11 @@ public class NSSI { private String modelVersionId; - public NSSI(String nssiId, String modelInvariantId, String modelVersionId) { - this.nssiId = nssiId; - this.modelInvariantId = modelInvariantId; - this.modelVersionId = modelVersionId; - } - - public String getNssiId() { - return nssiId; - } - - public void setNssiId(String nssiId) { - this.nssiId = nssiId; - } - - public String getModelInvariantId() { - return modelInvariantId; - } + private NetworkType networkType; - public void setModelInvariantId(String modelInvariantId) { - this.modelInvariantId = modelInvariantId; - } + private OperationType operationType; - public String getModelVersionId() { - return modelVersionId; - } + private String snssai; - public void setModelVersionId(String modelVersionId) { - this.modelVersionId = modelVersionId; - } + private String serviceType; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/OperationType.java b/common/src/main/java/org/onap/so/beans/nsmf/OperationType.java new file mode 100644 index 0000000000..1ee56b5ca0 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/OperationType.java @@ -0,0 +1,59 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.so.beans.nsmf; + +import lombok.Getter; +import lombok.ToString; + +@Getter +@ToString +public enum OperationType { + /** + * allocate + */ + ALLOCATE("allocate"), + + DEALLOCATE("deallocate"), + + CREATE("create"), + + TERMINATE("terminate"), + + ACTIVATE("activation"), + + DEACTIVATE("deactivation"); + + private String type; + + + OperationType(String type) { + this.type = type; + } + + public static OperationType getOperationType(String value) { + for (OperationType operationType : OperationType.values()) { + if (operationType.type.equalsIgnoreCase(value)) { + return operationType; + } + } + return null; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/OrchestrationStatusEnum.java b/common/src/main/java/org/onap/so/beans/nsmf/OrchestrationStatusEnum.java new file mode 100644 index 0000000000..572a312265 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/OrchestrationStatusEnum.java @@ -0,0 +1,36 @@ +package org.onap.so.beans.nsmf; + +import lombok.Getter; +import lombok.ToString; + +@Getter +@ToString +public enum OrchestrationStatusEnum { + /** + * activated + */ + ACTIVATED("activated"), + + /** + * deactivated + */ + DEACTIVATED("deactivated"), + + ; + + private String value; + + + OrchestrationStatusEnum(String value) { + this.value = value; + } + + public static OrchestrationStatusEnum getStatus(String value) { + for (OrchestrationStatusEnum orchestrationStatus : OrchestrationStatusEnum.values()) { + if (orchestrationStatus.value.equalsIgnoreCase(value)) { + return orchestrationStatus; + } + } + return null; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java index f9848fca31..5146685058 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java @@ -20,11 +20,17 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; import java.io.Serializable; @JsonInclude(JsonInclude.Include.NON_NULL) @Data +@Builder +@NoArgsConstructor +@AllArgsConstructor public class ServiceInfo implements Serializable { private static final long serialVersionUID = 7895110339097615695L; |