153ee78cb00509d0a134f4cacc5276d5041c63b4
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / adapters / nwrest / CreateNetworkRequest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 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.so.adapters.nwrest;
22
23
24
25 import java.util.HashMap;
26 import java.util.List;
27 import java.util.Map;
28
29 import javax.xml.bind.annotation.XmlRootElement;
30
31 import org.onap.so.entity.MsoRequest;
32 import org.onap.so.openstack.beans.Subnet;
33
34 import com.fasterxml.jackson.annotation.JsonIgnore;
35 import com.fasterxml.jackson.annotation.JsonProperty;
36 import com.fasterxml.jackson.annotation.JsonRootName;
37
38
39 /* README
40  Map<String, String> elements when marshalled to XML produce a list of <entry><key>${MsoUtils.xmlEscape(key)}</key><value>${MsoUtils.xmlEscape(value)}</value></entry> elements.
41  When marshalling to JSON they create a list of "${key}" : "${value}" pairs with no extra wrappers.
42 */
43 @JsonRootName("createNetworkRequest")
44 @XmlRootElement(name = "createNetworkRequest")
45 public class CreateNetworkRequest extends NetworkRequestCommon {
46         /**
47          * 
48          */
49         private static final long serialVersionUID = -8984362978831333521L;
50         private String cloudSiteId;
51         private String tenantId;
52         private String networkId;
53         private String networkName;
54         private String networkType;
55         private String networkTypeVersion;
56         private String modelCustomizationUuid;
57         private String networkTechnology = "NEUTRON";
58         private List<Subnet> subnets;
59         private ProviderVlanNetwork providerVlanNetwork;
60         private ContrailNetwork contrailNetwork;
61         private Boolean failIfExists = false;
62         private Boolean backout = true;
63         private Map<String,String> networkParams = new HashMap<>();
64         private MsoRequest msoRequest = new MsoRequest();
65         private boolean contrailRequest;
66
67         public CreateNetworkRequest() {
68                 super();
69         }
70
71         public String getCloudSiteId() {
72                 return cloudSiteId;
73         }
74
75         public void setCloudSiteId(String cloudSiteId) {
76                 this.cloudSiteId = cloudSiteId;
77         }
78
79         public String getTenantId() {
80                 return tenantId;
81         }
82
83         public void setTenantId(String tenantId) {
84                 this.tenantId = tenantId;
85         }
86
87         public String getNetworkId() {
88                 return networkId;
89         }
90
91         public void setNetworkId(String networkId) {
92                 this.networkId = networkId;
93         }
94
95         public String getNetworkName() {
96                 return networkName;
97         }
98
99         public void setNetworkName(String networkName) {
100                 this.networkName = networkName;
101         }
102
103         public String getNetworkType() {
104                 return networkType;
105         }
106
107         public void setNetworkType(String networkType) {
108                 this.networkType = networkType;
109         }
110
111         public String getModelCustomizationUuid() {
112                 return this.modelCustomizationUuid;
113         }
114
115         public void setModelCustomizationUuid(String modelCustomizationUuid) {
116                 this.modelCustomizationUuid = modelCustomizationUuid;
117         }
118
119         public String getNetworkTypeVersion() {
120                 return networkTypeVersion;
121         }
122
123         public void setNetworkTypeVersion(String networkTypeVersion) {
124                 this.networkTypeVersion = networkTypeVersion;
125         }
126
127         public String getNetworkTechnology() {
128                 return networkTechnology;
129         }
130
131         public void setNetworkTechnology(String networkTechnology) {
132                 this.networkTechnology = networkTechnology;
133         }
134
135         public List<Subnet> getSubnets() {
136                 return subnets;
137         }
138
139         public void setSubnets(List<Subnet> subnets) {
140                 this.subnets = subnets;
141         }
142
143         public ProviderVlanNetwork getProviderVlanNetwork() {
144                 return providerVlanNetwork;
145         }
146
147         public void setProviderVlanNetwork(ProviderVlanNetwork providerVlanNetwork) {
148                 this.providerVlanNetwork = providerVlanNetwork;
149         }
150
151         public ContrailNetwork getContrailNetwork() {
152                 return contrailNetwork;
153         }
154
155         public void setContrailNetwork(ContrailNetwork contrailNetwork) {
156                 this.contrailNetwork = contrailNetwork;
157         }
158
159         public Boolean getFailIfExists() {
160                 return failIfExists;
161         }
162
163         public void setFailIfExists(Boolean failIfExists) {
164                 this.failIfExists = failIfExists;
165         }
166
167         public Boolean getBackout() {
168                 return backout;
169         }
170
171         public void setBackout(Boolean backout) {
172                 this.backout = backout;
173         }
174
175         public Map<String, String> getNetworkParams() {
176                 return networkParams;
177         }
178
179         public void setNetworkParams(Map<String, String> networkParams) {
180                 this.networkParams = networkParams;
181         }
182
183         public MsoRequest getMsoRequest() {
184                 return msoRequest;
185         }
186
187         public void setMsoRequest(MsoRequest msoRequest) {
188                 this.msoRequest = msoRequest;
189         }
190
191         public boolean isContrailRequest() {
192                 return this.contrailRequest;
193         }
194         
195         public void setContrailRequest(boolean contrailRequest) {
196                 this.contrailRequest = contrailRequest;
197         }
198         
199 }