b3f146fdbd12d41122c1251cd1c2dbedcb53107e
[appc.git] / appc-config / appc-flow-controller / provider / src / main / java / org / openecomp / appc / flow / controller / data / PrecheckOption.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APP-C
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
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.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     
66
67     @Override
68     public String toString() {
69         return "PrecheckOption [pTransactionID=" + pTransactionID + ", paramName=" + paramName + ", paramValue="
70                 + paramValue + ", rule=" + rule + "]";
71     }
72
73     
74     public String getRule() {
75         return rule;
76     }
77
78     public void setRule(String rule) {
79         this.rule = rule;
80     }
81
82          @Override
83                 public int hashCode() {
84                   final int prime = 31;
85                   int result = 1;
86                   result = prime * result + this.pTransactionID;
87                   result = prime * result + this.paramName.hashCode();
88                   result = prime * result + this.paramValue.hashCode();
89                   result = prime * result + this.rule.hashCode();
90                   return result;
91                 }
92                 
93     @Override
94     public boolean equals(Object obj) {
95         if (this == obj)
96             return true;
97         if (obj == null)
98             return false;
99         if (getClass() != obj.getClass())
100             return false;
101         PrecheckOption other = (PrecheckOption) obj;
102         if (pTransactionID != other.pTransactionID)
103             return false;
104         if (paramName == null) {
105             if (other.paramName != null)
106                 return false;
107         } else if (!paramName.equals(other.paramName))
108             return false;
109         if (paramValue == null) {
110             if (other.paramValue != null)
111                 return false;
112         } else if (!paramValue.equals(other.paramValue))
113             return false;
114         if (rule != other.rule)
115             return false;
116         return true;
117     }
118     
119     
120 }