Update license header in appc-flow-controller file
[appc.git] / appc-config / appc-flow-controller / provider / src / main / java / org / onap / appc / flow / controller / data / PrecheckOption.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
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  *
19  * ============LICENSE_END=========================================================
20  */
21 package org.onap.appc.flow.controller.data;
22
23 import com.fasterxml.jackson.annotation.JsonProperty;
24
25 public class PrecheckOption {
26
27
28     @JsonProperty("pre-transaction-id")
29     private int pTransactionID;
30
31     @JsonProperty("param-name")
32     private String paramName;
33
34
35     @JsonProperty("param-value")
36     private String paramValue;
37
38     @JsonProperty("rule")
39     private String rule;
40
41     public int getpTransactionID() {
42         return pTransactionID;
43     }
44
45     public void setpTransactionID(int pTransactionID) {
46         this.pTransactionID = pTransactionID;
47     }
48
49     public String getParamName() {
50         return paramName;
51     }
52
53     public void setParamName(String paramName) {
54         this.paramName = paramName;
55     }
56
57     public String getParamValue() {
58         return paramValue;
59     }
60
61     public void setParamValue(String paramValue) {
62         this.paramValue = paramValue;
63     }
64
65     @Override
66     public String toString() {
67         return "PrecheckOption [pTransactionID=" + pTransactionID + ", paramName=" + paramName + ", paramValue="
68                 + paramValue + ", rule=" + rule + "]";
69     }
70
71     public String getRule() {
72         return rule;
73     }
74
75     public void setRule(String rule) {
76         this.rule = rule;
77     }
78
79     @Override
80     public int hashCode() {
81         final int prime = 31;
82         int result = 1;
83         result = prime * result + this.pTransactionID;
84         result = prime * result + this.paramName.hashCode();
85         result = prime * result + this.paramValue.hashCode();
86         result = prime * result + this.rule.hashCode();
87         return result;
88     }
89
90     @Override
91     public boolean equals(Object obj) {
92         if (this == obj)
93             return true;
94         if (obj == null)
95             return false;
96         if (getClass() != obj.getClass())
97             return false;
98         PrecheckOption other = (PrecheckOption) obj;
99         if (pTransactionID != other.pTransactionID)
100             return false;
101         if (paramName == null) {
102             if (other.paramName != null)
103                 return false;
104         } else if (!paramName.equals(other.paramName))
105             return false;
106         if (paramValue == null) {
107             if (other.paramValue != null)
108                 return false;
109         } else if (!paramValue.equals(other.paramValue))
110             return false;
111         if (rule != other.rule)
112             return false;
113         return true;
114     }
115 }