135b298cfc1dee8492d6d47695bb064d238a6614
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / AppNameIdIsAdmin.java
1 /*-
2  * ================================================================================
3  * ECOMP Portal
4  * ================================================================================
5  * Copyright (C) 2017 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  * ================================================================================
19  */
20 package org.openecomp.portalapp.portal.transport;
21
22 public class AppNameIdIsAdmin {
23
24         public Long id;
25
26         public String appName;
27
28         public Boolean isAdmin;
29
30         public Boolean restrictedApp;
31
32         public Long getId() {
33                 return id;
34         }
35
36         public void setId(Long id) {
37                 this.id = id;
38         }
39
40         public String getAppName() {
41                 return appName;
42         }
43
44         public void setAppName(String appName) {
45                 this.appName = appName;
46         }
47
48         public Boolean getIsAdmin() {
49                 return isAdmin;
50         }
51
52         public void setIsAdmin(Boolean isAdmin) {
53                 this.isAdmin = isAdmin;
54         }
55
56         public Boolean getRestrictedApp() {
57                 return restrictedApp;
58         }
59
60         public void setRestrictedApp(Boolean restrictedApp) {
61                 this.restrictedApp = restrictedApp;
62         }
63
64         @Override
65         public int hashCode() {
66                 final int prime = 31;
67                 int result = 1;
68                 result = prime * result + ((appName == null) ? 0 : appName.hashCode());
69                 result = prime * result + ((id == null) ? 0 : id.hashCode());
70                 result = prime * result + ((isAdmin == null) ? 0 : isAdmin.hashCode());
71                 result = prime * result + ((restrictedApp == null) ? 0 : restrictedApp.hashCode());
72                 return result;
73         }
74
75         @Override
76         public boolean equals(Object obj) {
77                 if (this == obj)
78                         return true;
79                 if (obj == null)
80                         return false;
81                 if (getClass() != obj.getClass())
82                         return false;
83                 AppNameIdIsAdmin other = (AppNameIdIsAdmin) obj;
84                 if (appName == null) {
85                         if (other.appName != null)
86                                 return false;
87                 } else if (!appName.equals(other.appName))
88                         return false;
89                 if (id == null) {
90                         if (other.id != null)
91                                 return false;
92                 } else if (!id.equals(other.id))
93                         return false;
94                 if (isAdmin == null) {
95                         if (other.isAdmin != null)
96                                 return false;
97                 } else if (!isAdmin.equals(other.isAdmin))
98                         return false;
99                 if (restrictedApp == null) {
100                         if (other.restrictedApp != null)
101                                 return false;
102                 } else if (!restrictedApp.equals(other.restrictedApp))
103                         return false;
104                 return true;
105         }
106
107         @Override
108         public String toString() {
109                 return "AppNameIdIsAdmin [id=" + id + ", appName=" + appName + ", isAdmin=" + isAdmin + ", restrictedApp="
110                                 + restrictedApp + "]";
111         }
112         
113         
114 }