2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.so.client.sdnc.beans;
23 import java.io.Serializable;
24 import java.time.Duration;
25 import java.util.UUID;
27 import org.onap.so.client.sdnc.endpoint.SDNCTopology;
28 import org.apache.commons.lang3.builder.HashCodeBuilder;
29 import org.apache.commons.lang3.builder.EqualsBuilder;
31 public class SDNCRequest implements Serializable{
36 private static final long serialVersionUID = 4679678988657593282L;
37 private String timeOut = "PT1H";
38 private SDNCTopology topology;
39 private String CorrelationValue = UUID.randomUUID().toString();
40 private String CorrelationName = "SDNCCallback";
41 private Object SDNCPayload;
44 public String getTimeOut() {
48 public void setTimeOut(String timeOut) {
49 this.timeOut = timeOut;
52 public SDNCTopology getTopology() {
56 public void setTopology(SDNCTopology topology) {
57 this.topology = topology;
60 public String getCorrelationValue() {
61 return CorrelationValue;
63 public void setCorrelationValue(String correlationValue) {
64 CorrelationValue = correlationValue;
66 public String getCorrelationName() {
67 return CorrelationName;
69 public void setCorrelationName(String correlationName) {
70 CorrelationName = correlationName;
72 public Object getSDNCPayload() {
75 public void setSDNCPayload(Object sDNCPayload) {
76 SDNCPayload = sDNCPayload;
80 public boolean equals(final Object other) {
81 if (!(other instanceof SDNCRequest)) {
84 SDNCRequest castOther = (SDNCRequest) other;
85 return new EqualsBuilder().append(CorrelationValue, castOther.CorrelationValue)
86 .append(CorrelationName, castOther.CorrelationName).isEquals();
90 public int hashCode() {
91 return new HashCodeBuilder().append(CorrelationValue).append(CorrelationName).toHashCode();