Containerization feature of SO
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / adapters / vnfrest / VfModuleRollback.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.vnfrest;
22
23
24 import javax.xml.bind.annotation.XmlRootElement;
25
26 import org.onap.so.entity.MsoRequest;
27 import org.onap.so.openstack.beans.VnfRollback;
28
29 import com.fasterxml.jackson.annotation.JsonRootName;
30
31 @JsonRootName("VfModuleRollback")
32 @XmlRootElement(name = "VfModuleRollback")
33 public class VfModuleRollback {
34         private String vnfId;
35         private String vfModuleId;
36         private String vfModuleStackId;
37         private boolean vfModuleCreated = false;
38         private String tenantId;
39         private String cloudSiteId;
40         private MsoRequest msoRequest;
41         private String messageId;
42         private String mode = "HEAT";  // default
43
44         public VfModuleRollback() {
45         }
46
47         public VfModuleRollback(VnfRollback vrb, String vfModuleId, String vfModuleStackId, String messageId)
48         {
49                 this.vnfId = vrb.getVnfId();
50                 this.vfModuleId = vfModuleId;
51                 this.vfModuleStackId = vfModuleStackId;
52                 this.vfModuleCreated = vrb.getVnfCreated();
53                 this.tenantId = vrb.getTenantId();
54                 this.cloudSiteId = vrb.getCloudSiteId();
55                 this.msoRequest = vrb.getMsoRequest();
56                 this.messageId = messageId;
57                 this.mode = vrb.getMode();
58         }
59
60         public VfModuleRollback(String vnfId, String vfModuleId,
61                         String vfModuleStackId, boolean vfModuleCreated, String tenantId,
62                         String cloudSiteId,
63                         MsoRequest msoRequest,
64                         String messageId) {
65                 super();
66                 this.vnfId = vnfId;
67                 this.vfModuleId = vfModuleId;
68                 this.vfModuleStackId = vfModuleStackId;
69                 this.vfModuleCreated = vfModuleCreated;
70                 this.tenantId = tenantId;
71                 this.cloudSiteId = cloudSiteId;
72                 this.msoRequest = msoRequest;
73                 this.messageId = messageId;
74         }
75
76         public String getVnfId() {
77                 return vnfId;
78         }
79         public void setVnfId(String vnfId) {
80                 this.vnfId = vnfId;
81         }
82         public String getVfModuleId() {
83                 return vfModuleId;
84         }
85         public void setVfModuleId(String vfModuleId) {
86                 this.vfModuleId = vfModuleId;
87         }
88         public String getVfModuleStackId() {
89                 return vfModuleStackId;
90         }
91         public void setVfModuleStackId(String vfModuleStackId) {
92                 this.vfModuleStackId = vfModuleStackId;
93         }
94         public boolean isVfModuleCreated() {
95                 return vfModuleCreated;
96         }
97         public void setVfModuleCreated(boolean vfModuleCreated) {
98                 this.vfModuleCreated = vfModuleCreated;
99         }
100         public String getTenantId() {
101                 return tenantId;
102         }
103         public void setTenantId(String tenantId) {
104                 this.tenantId = tenantId;
105         }
106         public String getCloudSiteId() {
107                 return cloudSiteId;
108         }
109         public void setCloudSiteId(String cloudSiteId) {
110                 this.cloudSiteId = cloudSiteId;
111         }
112         public MsoRequest getMsoRequest() {
113                 return msoRequest;
114         }
115         public void setMsoRequest(MsoRequest msoRequest) {
116                 this.msoRequest = msoRequest;
117         }
118         public String getMessageId() {
119                 return messageId;
120         }
121         public void setMessageId(String messageId) {
122                 this.messageId = messageId;
123         }
124         public String getMode() {
125                 return mode;
126         }
127         public void setMode(String mode) {
128                 this.mode = mode;
129         }
130 }