Update license headers
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / model / RequestParameters.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 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.vid.mso.model;
22
23 import com.fasterxml.jackson.annotation.*;
24 import org.apache.commons.lang.builder.EqualsBuilder;
25 import org.apache.commons.lang.builder.HashCodeBuilder;
26 import org.apache.commons.lang.builder.ToStringBuilder;
27
28 import java.util.ArrayList;
29 import java.util.HashMap;
30 import java.util.List;
31 import java.util.Map;
32
33 @JsonInclude(JsonInclude.Include.NON_NULL)
34 @JsonPropertyOrder({
35     "subscriptionServiceType",
36     "testApi",
37     "userParams"
38 })
39 public class RequestParameters {
40
41     @JsonProperty("subscriptionServiceType")
42     private String subscriptionServiceType;
43     @JsonProperty("testApi")
44     private String testApi;
45     @JsonProperty("userParams")
46     private List<UserParam> userParams = new ArrayList<>();
47     @JsonIgnore
48     private Map<String, Object> additionalProperties = new HashMap<>();
49
50     /**
51      * 
52      * @return
53      *     The subscriptionServiceType
54      */
55     @JsonProperty("subscriptionServiceType")
56     public String getSubscriptionServiceType() {
57         return subscriptionServiceType;
58     }
59
60     /**
61      * 
62      * @param subscriptionServiceType
63      *     The subscriptionServiceType
64      */
65     @JsonProperty("subscriptionServiceType")
66     public void setSubscriptionServiceType(String subscriptionServiceType) {
67         this.subscriptionServiceType = subscriptionServiceType;
68     }
69
70     /**
71      * 
72      * @return
73      *     The testApi
74      */
75     @JsonProperty("testApi")
76     public String getTestApi() {
77         return testApi;
78     }
79
80     /**
81      * 
82      * @param testApi
83      *     The testApi
84      */
85     @JsonProperty("testApi")
86     public void setTestApi(String testApi) {
87         this.testApi = testApi;
88     }
89
90     /**
91      * 
92      * @return
93      *     The userParams
94      */
95     @JsonProperty("userParams")
96     public List<UserParam> getUserParams() {
97         return userParams;
98     }
99
100     /**
101      * 
102      * @param userParams
103      *     The userParams
104      */
105     @JsonProperty("userParams")
106     public void setUserParams(List<UserParam> userParams) {
107         this.userParams = userParams;
108     }
109
110     @Override
111     public String toString() {
112         return ToStringBuilder.reflectionToString(this);
113     }
114
115     @JsonAnyGetter
116     public Map<String, Object> getAdditionalProperties() {
117         return this.additionalProperties;
118     }
119
120     @JsonAnySetter
121     public void setAdditionalProperty(String name, Object value) {
122         this.additionalProperties.put(name, value);
123     }
124
125     @Override
126     public int hashCode() {
127         return new HashCodeBuilder().append(subscriptionServiceType).append(testApi).append(userParams).append(additionalProperties).toHashCode();
128     }
129
130     @Override
131     public boolean equals(Object other) {
132         if (other == this) {
133             return true;
134         }
135         if (!(other instanceof RequestParameters)) {
136             return false;
137         }
138         RequestParameters rhs = ((RequestParameters) other);
139         return new EqualsBuilder().append(subscriptionServiceType, rhs.subscriptionServiceType).append(testApi, rhs.testApi).append(userParams, rhs.userParams).append(additionalProperties, rhs.additionalProperties).isEquals();
140     }
141
142 }