Merge "Add retrieval of vmIds and vServerIds for APPC"
[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.util.UUID;
25 import org.onap.so.client.sdnc.endpoint.SDNCTopology;
26 import org.apache.commons.lang3.builder.HashCodeBuilder;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28
29 public class SDNCRequest implements Serializable {
30
31     /**
32      * 
33      */
34     private static final long serialVersionUID = 4679678988657593282L;
35     private String timeOut = "PT1H";
36     private SDNCTopology topology;
37     private String correlationValue = UUID.randomUUID().toString();
38     private String correlationName = "SDNCCallback";
39     private Object sdncPayload;
40
41
42     public String getTimeOut() {
43         return timeOut;
44     }
45
46     public void setTimeOut(String timeOut) {
47         this.timeOut = timeOut;
48     }
49
50     public SDNCTopology getTopology() {
51         return topology;
52     }
53
54     public void setTopology(SDNCTopology topology) {
55         this.topology = topology;
56     }
57
58     public String getCorrelationValue() {
59         return correlationValue;
60     }
61
62     public void setCorrelationValue(String correlationValue) {
63         this.correlationValue = correlationValue;
64     }
65
66     public String getCorrelationName() {
67         return correlationName;
68     }
69
70     public void setCorrelationName(String correlationName) {
71         this.correlationName = correlationName;
72     }
73
74     public Object getSDNCPayload() {
75         return sdncPayload;
76     }
77
78     public void setSDNCPayload(Object sDNCPayload) {
79         this.sdncPayload = sDNCPayload;
80     }
81
82     @Override
83     public boolean equals(final Object other) {
84         if (!(other instanceof SDNCRequest)) {
85             return false;
86         }
87         SDNCRequest castOther = (SDNCRequest) other;
88         return new EqualsBuilder().append(correlationValue, castOther.correlationValue)
89                 .append(correlationName, castOther.correlationName).isEquals();
90     }
91
92     @Override
93     public int hashCode() {
94         return new HashCodeBuilder().append(correlationValue).append(correlationName).toHashCode();
95     }
96
97 }