Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / rest / SubscriberInfo.java
1
2 package org.onap.vid.mso.rest;
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
13 /**
14  * fields providing information about the subscriber associated with the request
15  * 
16  */
17 @JsonInclude(JsonInclude.Include.NON_NULL)
18 @JsonPropertyOrder({
19     "globalSubscriberId",
20     "subscriberCommonSiteId",
21     "subscriberName"
22 })
23 public class SubscriberInfo {
24
25     /**
26      * global Customer Id understood by A&AI
27      * 
28      */
29     @JsonProperty("globalSubscriberId")
30     private String globalSubscriberId;
31     /**
32      * id representing the location of the subscriber
33      * 
34      */
35     @JsonProperty("subscriberCommonSiteId")
36     private String subscriberCommonSiteId;
37     /**
38      * name of the customer or subscriber
39      * 
40      */
41     @JsonProperty("subscriberName")
42     private String subscriberName;
43     @JsonIgnore
44     private Map<String, Object> additionalProperties = new HashMap<>();
45
46     /**
47      * global Customer Id understood by A&AI
48      * 
49      * @return
50      *     The globalSubscriberId
51      */
52     @JsonProperty("globalSubscriberId")
53     public String getGlobalSubscriberId() {
54         return globalSubscriberId;
55     }
56
57     /**
58      * global Customer Id understood by A&AI
59      * 
60      * @param globalSubscriberId
61      *     The globalSubscriberId
62      */
63     @JsonProperty("globalSubscriberId")
64     public void setGlobalSubscriberId(String globalSubscriberId) {
65         this.globalSubscriberId = globalSubscriberId;
66     }
67
68     /**
69      * id representing the location of the subscriber
70      * 
71      * @return
72      *     The subscriberCommonSiteId
73      */
74     @JsonProperty("subscriberCommonSiteId")
75     public String getSubscriberCommonSiteId() {
76         return subscriberCommonSiteId;
77     }
78
79     /**
80      * id representing the location of the subscriber
81      * 
82      * @param subscriberCommonSiteId
83      *     The subscriberCommonSiteId
84      */
85     @JsonProperty("subscriberCommonSiteId")
86     public void setSubscriberCommonSiteId(String subscriberCommonSiteId) {
87         this.subscriberCommonSiteId = subscriberCommonSiteId;
88     }
89
90     /**
91      * name of the customer or subscriber
92      * 
93      * @return
94      *     The subscriberName
95      */
96     @JsonProperty("subscriberName")
97     public String getSubscriberName() {
98         return subscriberName;
99     }
100
101     /**
102      * name of the customer or subscriber
103      * 
104      * @param subscriberName
105      *     The subscriberName
106      */
107     @JsonProperty("subscriberName")
108     public void setSubscriberName(String subscriberName) {
109         this.subscriberName = subscriberName;
110     }
111
112     @Override
113     public String toString() {
114         return ToStringBuilder.reflectionToString(this);
115     }
116
117     @JsonAnyGetter
118     public Map<String, Object> getAdditionalProperties() {
119         return this.additionalProperties;
120     }
121
122     @JsonAnySetter
123     public void setAdditionalProperty(String name, Object value) {
124         this.additionalProperties.put(name, value);
125     }
126
127     @Override
128     public int hashCode() {
129         return new HashCodeBuilder().append(globalSubscriberId).append(subscriberCommonSiteId).append(subscriberName).append(additionalProperties).toHashCode();
130     }
131
132     @Override
133     public boolean equals(Object other) {
134         if (other == this) {
135             return true;
136         }
137         if (!(other instanceof SubscriberInfo)) {
138             return false;
139         }
140         SubscriberInfo rhs = ((SubscriberInfo) other);
141         return new EqualsBuilder().append(globalSubscriberId, rhs.globalSubscriberId).append(subscriberCommonSiteId, rhs.subscriberCommonSiteId).append(subscriberName, rhs.subscriberName).append(additionalProperties, rhs.additionalProperties).isEquals();
142     }
143
144 }