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;
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;
30 public class SDNCRequest implements Serializable {
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;
43 public String getTimeOut() {
47 public void setTimeOut(String timeOut) {
48 this.timeOut = timeOut;
51 public SDNCTopology getTopology() {
55 public void setTopology(SDNCTopology topology) {
56 this.topology = topology;
59 public String getCorrelationValue() {
60 return CorrelationValue;
63 public void setCorrelationValue(String correlationValue) {
64 CorrelationValue = correlationValue;
67 public String getCorrelationName() {
68 return CorrelationName;
71 public void setCorrelationName(String correlationName) {
72 CorrelationName = correlationName;
75 public Object getSDNCPayload() {
79 public void setSDNCPayload(Object sDNCPayload) {
80 SDNCPayload = sDNCPayload;
84 public boolean equals(final Object other) {
85 if (!(other instanceof SDNCRequest)) {
88 SDNCRequest castOther = (SDNCRequest) other;
89 return new EqualsBuilder().append(CorrelationValue, castOther.CorrelationValue)
90 .append(CorrelationName, castOther.CorrelationName).isEquals();
94 public int hashCode() {
95 return new HashCodeBuilder().append(CorrelationValue).append(CorrelationName).toHashCode();