ea7ce582ad39824a11bbaae8e7a61bcf8b062c6c
[so.git] /
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
28 import com.fasterxml.jackson.annotation.JsonRootName;
29
30 @JsonRootName("VolumeGroupRollback")
31 @XmlRootElement(name = "VolumeGroupRollback")
32 public class VolumeGroupRollback {
33 //      “volumeGroupRollback”: {
34 //      “volumeGroupId”: “<A&AI_ VOLUME_GROUP_ID>”,
35 //      “volumeGroupStackId”: “<VOLUME_GROUP _STACK_ID>”,
36 //       “tenantId”: “<TENANT_ID>”,
37 //  "cloudOwnerId"" "<CLOUD_OWNER>",
38 //      “cloudSiteId”: “<CLOUD_CLLI>”,
39 //      “volumeGroupCreated”: TRUE|FALSE,
40 //      “msoRequest”: {
41 //              “requestId”: “<REQUEST_ID>”,
42 //              “serviceInstanceId”: “<SERVICE_INSTANCE_ID>”
43 //      }
44 //},
45
46         private String volumeGroupId;
47         private String volumeGroupStackId;
48         private String tenantId;
49         private String cloudOwnerId;
50         private String cloudSiteId;
51         private boolean volumeGroupCreated = false;
52         private MsoRequest msoRequest;
53         private String messageId;
54
55         public VolumeGroupRollback() {
56         }
57
58         public VolumeGroupRollback(VolumeGroupRollback vrb, String volumeGroupStackId, String messageId)
59         {
60                 this.volumeGroupId      = vrb.getVolumeGroupId();
61                 this.volumeGroupStackId = volumeGroupStackId;
62                 this.tenantId           = vrb.getTenantId();
63                 this.cloudOwnerId       = vrb.getCloudOwnerId();
64                 this.cloudSiteId        = vrb.getCloudSiteId();
65                 this.volumeGroupCreated = vrb.isVolumeGroupCreated();
66                 this.msoRequest         = vrb.getMsoRequest();
67                 this.messageId          = messageId;
68         }
69
70         public VolumeGroupRollback(
71                         String volumeGroupId,
72                         String volumeGroupStackId,
73                         boolean volumeGroupCreated,
74                         String tenantId,
75                         String cloudOwnerId,
76                         String cloudSiteId,
77                         MsoRequest msoRequest,
78                         String messageId)
79         {
80                 super();
81                 this.volumeGroupId = volumeGroupId;
82                 this.volumeGroupStackId = volumeGroupStackId;
83                 this.volumeGroupCreated = volumeGroupCreated;
84                 this.tenantId = tenantId;
85                 this.cloudOwnerId = cloudOwnerId;
86                 this.cloudSiteId = cloudSiteId;
87                 this.msoRequest = msoRequest;
88                 this.messageId = messageId;
89         }
90
91         public String getVolumeGroupId() {
92                 return volumeGroupId;
93         }
94         public void setVolumeGroupId(String volumeGroupId) {
95                 this.volumeGroupId = volumeGroupId;
96         }
97         public String getVolumeGroupStackId() {
98                 return volumeGroupStackId;
99         }
100         public void setVolumeGroupStackId(String volumeGroupStackId) {
101                 this.volumeGroupStackId = volumeGroupStackId;
102         }
103         public String getTenantId() {
104                 return tenantId;
105         }
106         public void setTenantId(String tenantId) {
107                 this.tenantId = tenantId;
108         }
109         public String getCloudSiteId() {
110                 return cloudSiteId;
111         }
112         public void setCloudSiteId(String cloudSiteId) {
113                 this.cloudSiteId = cloudSiteId;
114         }
115         public String getCloudOwnerId() {
116             return cloudOwnerId;
117         }
118         public void setCloudOwnerId(String cloudOwnerId) {
119             this.cloudOwnerId = cloudOwnerId;
120         }public boolean isVolumeGroupCreated() {
121                 return volumeGroupCreated;
122         }
123         public void setVolumeGroupCreated(boolean volumeGroupCreated) {
124                 this.volumeGroupCreated = volumeGroupCreated;
125         }
126         public MsoRequest getMsoRequest() {
127                 return msoRequest;
128         }
129         public void setMsoRequest(MsoRequest msoRequest) {
130                 this.msoRequest = msoRequest;
131         }
132         public String getMessageId() {
133                 return messageId;
134         }
135         public void setMessageId(String messageId) {
136                 this.messageId = messageId;
137         }
138 }