AT&T 1712 and 1802 release code
[so.git] / common / src / main / java / org / openecomp / mso / serviceinstancebeans / RequestInfo.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.serviceinstancebeans;
22
23 import java.io.Serializable;
24
25 import com.fasterxml.jackson.annotation.JsonInclude;
26 import com.fasterxml.jackson.annotation.JsonInclude.Include;
27 import com.fasterxml.jackson.annotation.JsonProperty;
28 import com.fasterxml.jackson.annotation.JsonRootName;
29 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
30 import com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion;
31
32 @JsonRootName(value = "requestInfo")
33 @JsonInclude(Include.NON_DEFAULT)
34 public class RequestInfo implements Serializable {
35
36         private static final long serialVersionUID = -1370946827136030181L;
37         @JsonProperty("billingAccountNumber")
38         protected String billingAccountNumber;
39         @JsonProperty("callbackUrl")
40         protected String callbackUrl;
41         @JsonProperty("correlator")
42     protected String correlator;
43         @JsonProperty("orderNumber")
44     protected String orderNumber;
45         @JsonProperty("productFamilyId")
46     protected String productFamilyId;
47         @JsonProperty("orderVersion")
48     protected Integer orderVersion;
49     @JsonSerialize(include=Inclusion.ALWAYS)
50         @JsonProperty("source")
51     protected String source;
52         @JsonProperty("instanceName")
53     protected String instanceName;
54         @JsonProperty("suppressRollback")
55     @JsonSerialize(include=Inclusion.ALWAYS)
56     protected boolean suppressRollback;
57         @JsonProperty("requestorId")
58     protected String requestorId;
59
60     /**
61      * Gets the value of the callbackUrl property.
62      *
63      * @return
64      *     possible object is
65      *     {@link String }
66      *
67      */
68     public String getCallbackUrl() {
69         return callbackUrl;
70     }
71
72     /**
73      * Sets the value of the callbackUrl property.
74      *
75      * @param value
76      *     allowed object is
77      *     {@link String }
78      *
79      */
80     public void setCallbackUrl(String value) {
81         this.callbackUrl = value;
82     }
83
84     /**
85      * Gets the value of the correlator property.
86      *
87      * @return
88      *     possible object is
89      *     {@link String }
90      *
91      */
92     public String getCorrelator() {
93         return correlator;
94     }
95
96     /**
97      * Sets the value of the correlator property.
98      *
99      * @param value
100      *     allowed object is
101      *     {@link String }
102      *
103      */
104     public void setCorrelator(String value) {
105         this.correlator = value;
106     }
107
108     /**
109      * Gets the value of the orderNumber property.
110      *
111      * @return
112      *     possible object is
113      *     {@link String }
114      *
115      */
116     public String getOrderNumber() {
117         return orderNumber;
118     }
119
120     /**
121      * Sets the value of the orderNumber property.
122      *
123      * @param value
124      *     allowed object is
125      *     {@link String }
126      *
127      */
128     public void setOrderNumber(String value) {
129         this.orderNumber = value;
130     }
131
132     /**
133      * Gets the value of the orderVersion property.
134      *
135      * @return
136      *     possible object is
137      *     {@link Integer }
138      *
139      */
140     public Integer getOrderVersion() {
141         return orderVersion;
142     }
143
144     /**
145      * Sets the value of the orderVersion property.
146      *
147      * @param value
148      *     allowed object is
149      *     {@link Integer }
150      *
151      */
152     public void setOrderVersion(Integer value) {
153         this.orderVersion = value;
154     }
155
156     /**
157      * Gets the value of the source property.
158      *
159      * @return
160      *     possible object is
161      *     {@link String }
162      *
163      */
164     public String getSource() {
165         if(null == source || source.isEmpty()){
166                 source = "VID";
167         }
168         return source;
169     }
170
171     /**
172      * Sets the value of the source property.
173      *
174      * @param value
175      *     allowed object is
176      *     {@link String }
177      *
178      */
179     public void setSource(String value) {
180         this.source = value;
181     }
182
183         public String getInstanceName() {
184                 return instanceName;
185         }
186
187         public void setInstanceName(String instanceName) {
188                 this.instanceName = instanceName;
189         }
190
191         public String getBillingAccountNumber() {
192                 return billingAccountNumber;
193         }
194
195         public void setBillingAccountNumber(String billingAccountNumber) {
196                 this.billingAccountNumber = billingAccountNumber;
197         }
198
199         public String getProductFamilyId() {
200                 return productFamilyId;
201         }
202
203         public void setProductFamilyId(String productFamilyId) {
204                 this.productFamilyId = productFamilyId;
205         }
206
207         /**
208          * Required for Marshalers to send the fields.
209          * @return
210          */
211         public boolean getSuppressRollback() {
212                 return suppressRollback;
213         }
214
215         public void setSuppressRollback(boolean suppressRollback) {
216                 this.suppressRollback = suppressRollback;
217         }
218
219         public String getRequestorId() {
220                 return requestorId;
221         }
222
223         public void setRequestorId(String requestorId) {
224                 this.requestorId = requestorId;
225         }
226
227         @Override
228         public String toString() {
229                 return "RequestInfo [billingAccountNumber=" + billingAccountNumber
230                                 + ", callbackUrl=" + callbackUrl + ", correlator=" + correlator
231                                 + ", orderNumber=" + orderNumber + ", productFamilyId="
232                                 + productFamilyId + ", orderVersion=" + orderVersion
233                                 + ", source=" + source + ", instanceName=" + instanceName
234                                 + ", suppressRollback=" + suppressRollback + ", requestorId="
235                                 + requestorId + "]";
236         }
237
238
239 }