a6a988690cbc642427f35329784e48b54320afd2
[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 cloudOwner;
40         private String cloudSiteId;
41         private MsoRequest msoRequest;
42         private String messageId;
43         private String mode = "HEAT";  // default
44
45         public VfModuleRollback() {
46         }
47
48         public VfModuleRollback(VnfRollback vrb, String vfModuleId, String vfModuleStackId, String messageId)
49         {
50                 this.vnfId = vrb.getVnfId();
51                 this.vfModuleId = vfModuleId;
52                 this.vfModuleStackId = vfModuleStackId;
53                 this.vfModuleCreated = vrb.getVnfCreated();
54                 this.tenantId = vrb.getTenantId();
55                 this.cloudOwner = vrb.getCloudOwner();
56                 this.cloudSiteId = vrb.getCloudSiteId();
57                 this.msoRequest = vrb.getMsoRequest();
58                 this.messageId = messageId;
59                 this.mode = vrb.getMode();
60         }
61
62         public VfModuleRollback(String vnfId, String vfModuleId,
63                         String vfModuleStackId, boolean vfModuleCreated, String tenantId,
64                         String cloudOwner,
65                         String cloudSiteId,
66                         MsoRequest msoRequest,
67                         String messageId) {
68                 super();
69                 this.vnfId = vnfId;
70                 this.vfModuleId = vfModuleId;
71                 this.vfModuleStackId = vfModuleStackId;
72                 this.vfModuleCreated = vfModuleCreated;
73                 this.tenantId = tenantId;
74                 this.cloudOwner = cloudOwner;
75                 this.cloudSiteId = cloudSiteId;
76                 this.msoRequest = msoRequest;
77                 this.messageId = messageId;
78         }
79
80         public String getVnfId() {
81                 return vnfId;
82         }
83         public void setVnfId(String vnfId) {
84                 this.vnfId = vnfId;
85         }
86         public String getVfModuleId() {
87                 return vfModuleId;
88         }
89         public void setVfModuleId(String vfModuleId) {
90                 this.vfModuleId = vfModuleId;
91         }
92         public String getVfModuleStackId() {
93                 return vfModuleStackId;
94         }
95         public void setVfModuleStackId(String vfModuleStackId) {
96                 this.vfModuleStackId = vfModuleStackId;
97         }
98         public boolean isVfModuleCreated() {
99                 return vfModuleCreated;
100         }
101         public void setVfModuleCreated(boolean vfModuleCreated) {
102                 this.vfModuleCreated = vfModuleCreated;
103         }
104         public String getTenantId() {
105                 return tenantId;
106         }
107         public void setTenantId(String tenantId) {
108                 this.tenantId = tenantId;
109         }
110         public String getCloudSiteId() {
111                 return cloudSiteId;
112         }
113         public void setCloudSiteId(String cloudSiteId) {
114                 this.cloudSiteId = cloudSiteId;
115         }
116     public String getCloudOwner() {
117         return cloudOwner;
118     }
119     public void setCloudOwner(String cloudOwner) {
120         this.cloudOwner = cloudOwner;
121     }
122         public MsoRequest getMsoRequest() {
123                 return msoRequest;
124         }
125         public void setMsoRequest(MsoRequest msoRequest) {
126                 this.msoRequest = msoRequest;
127         }
128         public String getMessageId() {
129                 return messageId;
130         }
131         public void setMessageId(String messageId) {
132                 this.messageId = messageId;
133         }
134         public String getMode() {
135                 return mode;
136         }
137         public void setMode(String mode) {
138                 this.mode = mode;
139         }
140 }