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