2 * ============LICENSE_START=======================================================
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
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.policy.appc;
23 import java.io.Serializable;
24 import java.util.HashMap;
27 public class Request implements Serializable{
29 private static final long serialVersionUID = -3912323643990646431L;
31 public CommonHeader CommonHeader;
33 public String TargetID;
34 public String ObjectID;
35 public Map<String, Object> Payload = new HashMap<String, Object>();
41 public CommonHeader getCommonHeader() {
45 public Map<String, Object> getPayload() {
50 public int hashCode() {
53 result = prime * result + ((Action == null) ? 0 : Action.hashCode());
54 result = prime * result + ((CommonHeader == null) ? 0 : CommonHeader.hashCode());
55 result = prime * result + ((ObjectID == null) ? 0 : ObjectID.hashCode());
56 result = prime * result + ((Payload == null) ? 0 : Payload.hashCode());
57 result = prime * result + ((TargetID == null) ? 0 : TargetID.hashCode());
62 public boolean equals(Object obj) {
67 if (getClass() != obj.getClass())
69 Request other = (Request) obj;
71 if (other.Action != null)
73 } else if (!Action.equals(other.Action))
75 if (CommonHeader == null) {
76 if (other.CommonHeader != null)
78 } else if (!CommonHeader.equals(other.CommonHeader))
80 if (ObjectID == null) {
81 if (other.ObjectID != null)
83 } else if (!ObjectID.equals(other.ObjectID))
85 if (Payload == null) {
86 if (other.Payload != null)
88 } else if (!Payload.equals(other.Payload))
90 if (TargetID == null) {
91 if (other.TargetID != null)
93 } else if (!TargetID.equals(other.TargetID))
99 public String toString() {
100 return "Request [CommonHeader=" + CommonHeader + ", Action=" + Action + ", TargetID=" + TargetID + ", ObjectID="
101 + ObjectID + ", Payload=" + Payload + "]";