Merge "Change the copyright to 2018"
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / openecomp / mso / openstack / beans / NetworkRollback.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.openecomp.mso.openstack.beans;
22
23
24 import java.util.List;
25
26 import org.openecomp.mso.entity.MsoRequest;
27
28 import com.fasterxml.jackson.annotation.JsonInclude;
29 import com.fasterxml.jackson.annotation.JsonInclude.Include;
30
31 /**
32  * Javabean representing the rollback criteria following a "Create Network"
33  * or "Update Network" operation.  This structure can be passed back to the
34  * "Rollback Network" operation to undo the effects of the create/update.
35  *
36  * Once a network is created, the only possible update through MSO is to
37  * the set of VLANs supported by the network.  The vlans attribute of the
38  * rollback object contains the previous VLANs before update.
39  *
40  *
41  */
42 @JsonInclude(Include.NON_EMPTY)
43 public class NetworkRollback {
44         private String networkId;
45         private String neutronNetworkId;
46         private String networkStackId;
47         private String tenantId;
48         private String cloudId;
49         private String networkType;
50         private String modelCustomizationUuid;
51         private boolean networkCreated = false;
52         // Previous values for updates
53         private String networkName = null;
54         private String physicalNetwork = null;
55         private List<Integer> vlans = null;
56         private MsoRequest msoRequest;
57
58         public String getNetworkId() {
59                 return networkId;
60         }
61         public void setNetworkId(String networkId) {
62                 this.networkId = networkId;
63         }
64
65         public String getNeutronNetworkId() {
66                 return neutronNetworkId;
67         }
68         public void setNeutronNetworkId(String neutronNetworkId) {
69                 this.neutronNetworkId = neutronNetworkId;
70         }
71
72         public String getNetworkStackId() {
73                 return networkStackId;
74         }
75         public void setNetworkStackId(String networkStackId) {
76                 this.networkStackId = networkStackId;
77         }
78         public String getTenantId() {
79                 return tenantId;
80         }
81         public void setTenantId(String tenantId) {
82                 this.tenantId = tenantId;
83         }
84
85         public String getCloudId() {
86                 return cloudId;
87         }
88         public void setCloudId(String cloudId) {
89                 this.cloudId = cloudId;
90         }
91
92         public String getNetworkType() {
93                 return networkType;
94         }
95         public void setNetworkType(String networkType) {
96                 this.networkType = networkType;
97         }
98
99         public String getModelCustomizationUuid() {
100                 return this.modelCustomizationUuid;
101         }
102
103         public void setModelCustomizationUuid(String modelCustomizationUuid) {
104                 this.modelCustomizationUuid = modelCustomizationUuid;
105         }
106
107         public boolean getNetworkCreated() {
108                 return networkCreated;
109         }
110         public void setNetworkCreated(boolean networkCreated) {
111                 this.networkCreated = networkCreated;
112         }
113
114         public String getNetworkName() {
115                 return networkName;
116         }
117         public void setNetworkName(String networkName) {
118                 this.networkName = networkName;
119         }
120
121         public String getPhysicalNetwork() {
122                 return physicalNetwork;
123         }
124         public void setPhysicalNetwork(String physicalNetwork) {
125                 this.physicalNetwork = physicalNetwork;
126         }
127
128         public List<Integer> getVlans () {
129                 return vlans;
130         }
131         public void setVlans (List<Integer> vlans) {
132                 this.vlans = vlans;
133         }
134
135         public MsoRequest getMsoRequest() {
136                 return msoRequest;
137         }
138         public void setMsoRequest (MsoRequest msoRequest) {
139                 this.msoRequest = msoRequest;
140         }
141
142         @Override
143         public String toString() {
144                 return "NetworkRollback [networkId=" + networkId
145                                 + ", neutronNetworkId=" + neutronNetworkId + ", networkStackId="
146                                 + networkStackId + ", tenantId=" + tenantId + ", cloudId="
147                                 + cloudId + ", networkType=" + networkType
148                                 + ", networkCreated=" + networkCreated + ", networkName=" + networkName
149                                 + ", physicalNetwork=" + physicalNetwork + "]";
150         }
151
152 }