Fix for Penetration test _ Session and cookie management
[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 data class VidNotions(@get:JsonInclude(JsonInclude.Include.NON_NULL)
29                  val instantiationUI: InstantiationUI,
30                  val modelCategory: ModelCategory,
31                  val viewEditUI: InstantiationUI,
32                  val instantiationType: InstantiationType) {
33     enum class InstantiationUI {
34         NETWORK_WITH_PROPERTY_NETWORK_TECHNOLOGY_EQUALS_STANDARD_SRIOV_OR_OVS,
35         SERVICE_WITH_FABRIC_CONFIGURATION,
36         LEGACY,
37         SERVICE_UUID_IS_1ffce89f_ef3f_4cbb_8b37_82134590c5de,
38         ANY_ALACARTE_NEW_UI,
39         MACRO_SERVICE,
40         SERVICE_WITH_VNF_GROUPING,
41         TRANSPORT_SERVICE,
42         SERVICE_WITH_COLLECTION_RESOURCE,
43         A_LA_CARTE_VNF_SERVICE_ROLE,
44         INFRASTRUCTURE_VPN,
45         ANY_ALACARTE_WHICH_NOT_EXCLUDED,
46         ;
47
48         @JsonValue
49         fun toLowerCamel(): String {
50             return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, this.name)
51         }
52
53     }
54
55     enum class ModelCategory {
56         @JsonProperty("5G Provider Network")
57         IS_5G_PROVIDER_NETWORK_MODEL,
58         @JsonProperty("5G Fabric Configuration")
59         IS_5G_FABRIC_CONFIGURATION_MODEL,
60         Transport,
61         SERVICE_WITH_COLLECTION_RESOURCE,
62         INFRASTRUCTURE_VPN,
63         PORT_MIRRORING,
64         VLAN_TAGGING,
65         @JsonProperty("other")
66         OTHER
67     }
68
69     enum class InstantiationType {
70         Macro,
71         ALaCarte,
72         ClientConfig
73     }
74 }