7f06bfe2f71deb8b70e8a471ded5a69402bf46e6
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / VidNotions.kt
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.vid.model
22
23 import com.fasterxml.jackson.annotation.JsonInclude
24 import com.fasterxml.jackson.annotation.JsonProperty
25 import com.fasterxml.jackson.annotation.JsonValue
26 import com.google.common.base.CaseFormat
27
28 class VidNotions(@get:JsonInclude(JsonInclude.Include.NON_NULL)
29                  val instantiationUI: InstantiationUI, val modelCategory: ModelCategory, val viewEditUI: InstantiationUI) {
30     enum class InstantiationUI {
31         NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS,
32         SERVICE_WITH_FABRIC_CONFIGURATION,
33         LEGACY,
34         SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de,
35         ANY_ALACARTE_NEW_UI,
36         MACRO_SERVICE,
37         SERVICE_WITH_VNF_GROUPING;
38
39         @JsonValue
40         fun toLowerCamel(): String {
41             return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, this.name)
42         }
43
44     }
45
46     enum class ModelCategory {
47         @JsonProperty("5G Provider Network")
48         IS_5G_PROVIDER_NETWORK_MODEL,
49         @JsonProperty("5G Fabric Configuration")
50         IS_5G_FABRIC_CONFIGURATION_MODEL,
51         @JsonProperty("other")
52         OTHER
53     }
54 }