Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / model / UserParam.java
1
2 package org.onap.vid.mso.model;
3
4 import com.fasterxml.jackson.annotation.*;
5 import org.apache.commons.lang.builder.EqualsBuilder;
6 import org.apache.commons.lang.builder.HashCodeBuilder;
7 import org.apache.commons.lang.builder.ToStringBuilder;
8
9 import java.util.HashMap;
10 import java.util.Map;
11
12 @JsonInclude(JsonInclude.Include.NON_NULL)
13 @JsonPropertyOrder({
14     "name",
15     "value"
16 })
17 public class UserParam {
18
19     @JsonProperty("name")
20     private String name;
21     @JsonProperty("value")
22     private String value;
23     @JsonIgnore
24     private Map<String, Object> additionalProperties = new HashMap<>();
25
26     /**
27      * 
28      * @return
29      *     The name
30      */
31     @JsonProperty("name")
32     public String getName() {
33         return name;
34     }
35
36     /**
37      * 
38      * @param name
39      *     The name
40      */
41     @JsonProperty("name")
42     public void setName(String name) {
43         this.name = name;
44     }
45
46     /**
47      * 
48      * @return
49      *     The value
50      */
51     @JsonProperty("value")
52     public String getValue() {
53         return value;
54     }
55
56     /**
57      * 
58      * @param value
59      *     The value
60      */
61     @JsonProperty("value")
62     public void setValue(String value) {
63         this.value = value;
64     }
65
66     @Override
67     public String toString() {
68         return ToStringBuilder.reflectionToString(this);
69     }
70
71     @JsonAnyGetter
72     public Map<String, Object> getAdditionalProperties() {
73         return this.additionalProperties;
74     }
75
76     @JsonAnySetter
77     public void setAdditionalProperty(String name, Object value) {
78         this.additionalProperties.put(name, value);
79     }
80
81     @Override
82     public int hashCode() {
83         return new HashCodeBuilder().append(name).append(value).append(additionalProperties).toHashCode();
84     }
85
86     @Override
87     public boolean equals(Object other) {
88         if (other == this) {
89             return true;
90         }
91         if (!(other instanceof UserParam)) {
92             return false;
93         }
94         UserParam rhs = ((UserParam) other);
95         return new EqualsBuilder().append(name, rhs.name).append(value, rhs.value).append(additionalProperties, rhs.additionalProperties).isEquals();
96     }
97
98 }