847fdcbb99198fcede06da6803e6b6adface16be
[portal/ric-dashboard.git] / dashboard / webapp-backend / src / main / java / org / oransc / ric / portal / dashboard / model / StatsDetailsTransport.java
1 /*-
2  * ========================LICENSE_START=================================
3  * O-RAN-SC
4  * %%
5  * Copyright (C) 2020 AT&T Intellectual Property
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 package org.oransc.ric.portal.dashboard.model;
21
22 public class StatsDetailsTransport implements IDashboardResponse {
23
24         private int appId;
25         private String appName;
26         private String metricUrl;
27
28         public StatsDetailsTransport(int appId, String appName, String metricUrl) {
29                 this.appId = appId;
30                 this.appName = appName;
31                 this.metricUrl = metricUrl;
32         }
33
34         public int getAppId() {
35                 return appId;
36         }
37
38         public void setAppId(int appId) {
39                 this.appId = appId;
40         }
41
42         public StatsDetailsTransport() {
43         }
44
45         public String getAppName() {
46                 return appName;
47         }
48
49         public void setAppName(String appName) {
50                 this.appName = appName;
51         }
52
53         public String getMetricUrl() {
54                 return metricUrl;
55         }
56
57         public void setMetricUrl(String metricUrl) {
58                 this.metricUrl = metricUrl;
59         }
60
61         @Override
62         public String toString() {
63                 return this.getClass().getName() + "[appId=" + getAppId() + ", appName=" + getAppName() + ", metricUrl="
64                                 + getMetricUrl() + "]";
65         }
66
67         @Override
68         public boolean equals(Object obj) {
69                 if (this == obj)
70                         return true;
71                 if (obj == null)
72                         return false;
73                 if (getClass() != obj.getClass())
74                         return false;
75                 StatsDetailsTransport other = (StatsDetailsTransport) obj;
76                 return appId == other.appId;
77         }
78 }