Replaced all tabs with spaces in java and pom.xml
[so.git] / bpmn / so-bpmn-tasks / src / main / java / org / onap / so / client / sdnc / beans / SDNCRequest.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 - 2018 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.client.sdnc.beans;
22
23 import java.io.Serializable;
24 import java.time.Duration;
25 import java.util.UUID;
26 import org.onap.so.client.sdnc.endpoint.SDNCTopology;
27 import org.apache.commons.lang3.builder.HashCodeBuilder;
28 import org.apache.commons.lang3.builder.EqualsBuilder;
29
30 public class SDNCRequest implements Serializable {
31
32     /**
33      * 
34      */
35     private static final long serialVersionUID = 4679678988657593282L;
36     private String timeOut = "PT1H";
37     private SDNCTopology topology;
38     private String CorrelationValue = UUID.randomUUID().toString();
39     private String CorrelationName = "SDNCCallback";
40     private Object SDNCPayload;
41
42
43     public String getTimeOut() {
44         return timeOut;
45     }
46
47     public void setTimeOut(String timeOut) {
48         this.timeOut = timeOut;
49     }
50
51     public SDNCTopology getTopology() {
52         return topology;
53     }
54
55     public void setTopology(SDNCTopology topology) {
56         this.topology = topology;
57     }
58
59     public String getCorrelationValue() {
60         return CorrelationValue;
61     }
62
63     public void setCorrelationValue(String correlationValue) {
64         CorrelationValue = correlationValue;
65     }
66
67     public String getCorrelationName() {
68         return CorrelationName;
69     }
70
71     public void setCorrelationName(String correlationName) {
72         CorrelationName = correlationName;
73     }
74
75     public Object getSDNCPayload() {
76         return SDNCPayload;
77     }
78
79     public void setSDNCPayload(Object sDNCPayload) {
80         SDNCPayload = sDNCPayload;
81     }
82
83     @Override
84     public boolean equals(final Object other) {
85         if (!(other instanceof SDNCRequest)) {
86             return false;
87         }
88         SDNCRequest castOther = (SDNCRequest) other;
89         return new EqualsBuilder().append(CorrelationValue, castOther.CorrelationValue)
90                 .append(CorrelationName, castOther.CorrelationName).isEquals();
91     }
92
93     @Override
94     public int hashCode() {
95         return new HashCodeBuilder().append(CorrelationValue).append(CorrelationName).toHashCode();
96     }
97
98 }