org.onap migration
[vid.git] / vid-app-common / src / main / java / org / onap / vid / model / ServiceInstanceSearchResult.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 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.model;
22
23 public class ServiceInstanceSearchResult {
24
25         private String serviceInstanceId;
26
27         private String globalCustomerId;
28
29         private String serviceType;
30
31         private String serviceInstanceName;
32
33         private String subscriberName;
34
35         private String aaiModelInvariantId;
36
37         private String aaiModelVersionId;
38
39         private boolean isPermitted;
40
41         public ServiceInstanceSearchResult(){
42
43         }
44         public ServiceInstanceSearchResult(String serviceInstanceId, String globalCustomerId, String serviceType,
45                                                                            String serviceInstanceName, String subscriberName, String aaiModelInvariantId,
46                                                                            String aaiModelVersionId, boolean isPermitted) {
47                 this.serviceInstanceId = serviceInstanceId;
48                 this.globalCustomerId = globalCustomerId;
49                 this.serviceType = serviceType;
50                 this.serviceInstanceName = serviceInstanceName;
51                 this.subscriberName = subscriberName;
52                 this.aaiModelInvariantId = aaiModelInvariantId;
53                 this.aaiModelVersionId = aaiModelVersionId;
54                 this.isPermitted = isPermitted;
55         }
56
57         public String getServiceInstanceId() {
58                 return serviceInstanceId;
59         }
60
61         public void setServiceInstanceId(String serviceInstanceId) {
62                 this.serviceInstanceId = serviceInstanceId;
63         }
64
65         public String getGlobalCustomerId() {
66                 return globalCustomerId;
67         }
68
69         public void setGlobalCustomerId(String globalCustomerId) {
70                 this.globalCustomerId = globalCustomerId;
71         }
72
73         public String getServiceType() {
74                 return serviceType;
75         }
76
77         public void setServiceType(String serviceType) {
78                 this.serviceType = serviceType;
79         }
80
81         public String getServiceInstanceName() {
82                 return serviceInstanceName;
83         }
84
85         public void setServiceInstanceName(String serviceInstanceName) {
86                 this.serviceInstanceName = serviceInstanceName;
87         }
88
89         public String getSubscriberName() {
90                 return subscriberName;
91         }
92
93         public void setSubscriberName(String subscriberName) {
94                 this.subscriberName = subscriberName;
95         }
96
97         public String getAaiModelInvariantId() {
98                 return aaiModelInvariantId;
99         }
100
101         public void setAaiModelInvariantId(String aaiModelInvariantId) {
102                 this.aaiModelInvariantId = aaiModelInvariantId;
103         }
104
105         public String getAaiModelVersionId() {
106                 return aaiModelVersionId;
107         }
108
109         public void setAaiModelVersionId(String aaiModelVersionId) {
110                 this.aaiModelVersionId = aaiModelVersionId;
111         }
112
113         public boolean getIsPermitted() {
114                 return isPermitted;
115         }
116
117         public void setIsPermitted(boolean isPermitted) {
118                 this.isPermitted = isPermitted;
119         }
120
121         @Override
122         public boolean equals(Object other){
123                 if (other instanceof ServiceInstanceSearchResult) {
124                         ServiceInstanceSearchResult serviceInstanceSearchResultOther = (ServiceInstanceSearchResult) other;
125                         if (this.getServiceInstanceId().equals(serviceInstanceSearchResultOther.getServiceInstanceId())) {
126                                 return true;
127                         }
128                 }
129                 return false;
130
131         }
132
133         @Override
134         public int hashCode() {
135                 int result = 17;
136                 result = 31 * result + serviceInstanceId.hashCode();
137                 return result;
138         }
139 }