Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / VnfRollback.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.openstack.beans;
22
23 import org.onap.so.entity.MsoRequest;
24
25 /**
26  * Javabean representing the rollback criteria following a "Create VNF" operation. This structure can be passed back to
27  * the "Rollback VNF" operation to undo the effects of the create.
28  *
29  *
30  */
31 public class VnfRollback {
32     private String vnfId;
33     private String tenantId;
34     private String cloudOwner;
35     private String cloudSiteId;
36     private boolean tenantCreated = false;
37     private boolean vnfCreated = false;
38     private MsoRequest msoRequest;
39     private String volumeGroupName;
40     private String volumeGroupId;
41     private String requestType;
42     private String volumeGroupHeatStackId;
43     private String baseGroupHeatStackId;
44     private boolean isBase = false;
45     private String vfModuleStackId;
46     private String modelCustomizationUuid; // NOTE: this is the vfModule's modelCustomizationUuid
47     private String mode = "HEAT";
48
49     public VnfRollback() {}
50
51     /**
52      * For backwards compatibility... orchestration mode defaults to HEAT
53      *
54      * @param vnfId
55      * @param tenantId
56      * @param cloudOwner
57      * @param cloudSiteId
58      * @param tenantCreated
59      * @param vnfCreated
60      * @param msoRequest
61      * @param volumeGroupName
62      * @param volumeGroupId
63      * @param requestType
64      * @param modelCustomizationUuid
65      */
66     public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
67             boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
68             String modelCustomizationUuid) {
69         super();
70         this.vnfId = vnfId;
71         this.tenantId = tenantId;
72         this.cloudOwner = cloudOwner;
73         this.cloudSiteId = cloudSiteId;
74         this.tenantCreated = tenantCreated;
75         this.vnfCreated = vnfCreated;
76         this.msoRequest = msoRequest;
77         this.volumeGroupName = volumeGroupName;
78         this.volumeGroupId = volumeGroupId;
79         this.requestType = requestType;
80         this.modelCustomizationUuid = modelCustomizationUuid;
81     }
82
83     /**
84      *
85      * @param vnfId
86      * @param tenantId
87      * @param cloudOwner
88      * @param cloudSiteId
89      * @param tenantCreated
90      * @param vnfCreated
91      * @param msoRequest
92      * @param volumeGroupName
93      * @param volumeGroupId
94      * @param requestType
95      * @param modelCustomizationUuid
96      */
97     public VnfRollback(String vnfId, String tenantId, String cloudOwner, String cloudSiteId, boolean tenantCreated,
98             boolean vnfCreated, MsoRequest msoRequest, String volumeGroupName, String volumeGroupId, String requestType,
99             String modelCustomizationUuid, String orchestrationMode) {
100         super();
101         this.vnfId = vnfId;
102         this.tenantId = tenantId;
103         this.cloudOwner = cloudOwner;
104         this.cloudSiteId = cloudSiteId;
105         this.tenantCreated = tenantCreated;
106         this.vnfCreated = vnfCreated;
107         this.msoRequest = msoRequest;
108         this.volumeGroupName = volumeGroupName;
109         this.volumeGroupId = volumeGroupId;
110         this.requestType = requestType;
111         this.modelCustomizationUuid = modelCustomizationUuid;
112         this.mode = orchestrationMode;
113     }
114
115     public String getVnfId() {
116         return vnfId;
117     }
118
119     public void setVnfId(String vnfId) {
120         this.vnfId = vnfId;
121     }
122
123     public String getTenantId() {
124         return tenantId;
125     }
126
127     public void setTenantId(String tenantId) {
128         this.tenantId = tenantId;
129     }
130
131     public String getCloudSiteId() {
132         return cloudSiteId;
133     }
134
135     public void setCloudSiteId(String cloudId) {
136         this.cloudSiteId = cloudId;
137     }
138
139     public String getCloudOwner() {
140         return cloudOwner;
141     }
142
143     public void setCloudOwner(String cloudOwner) {
144         this.cloudOwner = cloudOwner;
145     }
146
147     public boolean getTenantCreated() {
148         return tenantCreated;
149     }
150
151     public void setTenantCreated(boolean tenantCreated) {
152         this.tenantCreated = tenantCreated;
153     }
154
155     public boolean getVnfCreated() {
156         return vnfCreated;
157     }
158
159     public void setVnfCreated(boolean vnfCreated) {
160         this.vnfCreated = vnfCreated;
161     }
162
163     public MsoRequest getMsoRequest() {
164         return msoRequest;
165     }
166
167     public void setMsoRequest(MsoRequest msoRequest) {
168         this.msoRequest = msoRequest;
169     }
170
171     public String getVolumeGroupName() {
172         return this.volumeGroupName;
173     }
174
175     public void setVolumeGroupName(String volumeGroupName) {
176         this.volumeGroupName = volumeGroupName;
177     }
178
179     public String getVolumeGroupId() {
180         return this.volumeGroupId;
181     }
182
183     public void setVolumeGroupId(String volumeGroupId) {
184         this.volumeGroupId = volumeGroupId;
185     }
186
187     public String getRequestType() {
188         return this.requestType;
189     }
190
191     public void setRequestType(String requestType) {
192         this.requestType = requestType;
193     }
194
195     public String getVolumeGroupHeatStackId() {
196         return this.volumeGroupHeatStackId;
197     }
198
199     public void setVolumeGroupHeatStackId(String volumeGroupHeatStackId) {
200         this.volumeGroupHeatStackId = volumeGroupHeatStackId;
201     }
202
203     public String getBaseGroupHeatStackId() {
204         return this.baseGroupHeatStackId;
205     }
206
207     public void setBaseGroupHeatStackId(String baseGroupHeatStackId) {
208         this.baseGroupHeatStackId = baseGroupHeatStackId;
209     }
210
211     public boolean isBase() {
212         return this.isBase;
213     }
214
215     public void setIsBase(boolean isBase) {
216         this.isBase = isBase;
217     }
218
219     public String getVfModuleStackId() {
220         return this.vfModuleStackId;
221     }
222
223     public void setVfModuleStackId(String vfModuleStackId) {
224         this.vfModuleStackId = vfModuleStackId;
225     }
226
227     public String getModelCustomizationUuid() {
228         return this.modelCustomizationUuid;
229     }
230
231     public void setModelCustomizationUuid(String modelCustomizationUuid) {
232         this.modelCustomizationUuid = modelCustomizationUuid;
233     }
234
235     public String getMode() {
236         return this.mode;
237     }
238
239     public void setMode(String mode) {
240         this.mode = mode;
241     }
242
243     @Override
244     public String toString() {
245         return "VnfRollback: owner=" + cloudOwner + ", cloud=" + cloudSiteId + ", tenant=" + tenantId + ", vnf=" + vnfId
246                 + ", tenantCreated=" + tenantCreated + ", vnfCreated=" + vnfCreated + ", requestType = " + requestType
247                 + ", modelCustomizationUuid=" + this.modelCustomizationUuid + ", mode=" + mode;
248     }
249 }