2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 package org.onap.vid.model;
23 import com.fasterxml.jackson.annotation.JsonProperty;
24 import org.apache.commons.lang3.StringUtils;
25 import org.onap.vid.roles.WithPermissionPropertiesSubscriberAndServiceType;
27 public class ServiceInstanceSearchResult implements WithPermissionPropertiesSubscriberAndServiceType {
29 private final String SUBSCRIBER_ID_FRONTEND_ALIAS = "globalCustomerId";
31 private String serviceInstanceId;
33 private String subscriberId;
35 private String serviceType;
37 private String serviceInstanceName;
39 private String subscriberName;
41 private String aaiModelInvariantId;
43 private String aaiModelVersionId;
45 private boolean isPermitted;
47 public ServiceInstanceSearchResult(){
50 public ServiceInstanceSearchResult(String serviceInstanceId, String subscriberId, String serviceType,
51 String serviceInstanceName, String subscriberName, String aaiModelInvariantId,
52 String aaiModelVersionId, boolean isPermitted) {
53 this.serviceInstanceId = serviceInstanceId;
54 this.subscriberId = subscriberId;
55 this.serviceType = serviceType;
56 this.serviceInstanceName = serviceInstanceName;
57 this.subscriberName = subscriberName;
58 this.aaiModelInvariantId = aaiModelInvariantId;
59 this.aaiModelVersionId = aaiModelVersionId;
60 this.isPermitted = isPermitted;
63 public String getServiceInstanceId() {
64 return serviceInstanceId;
67 public void setServiceInstanceId(String serviceInstanceId) {
68 this.serviceInstanceId = serviceInstanceId;
72 @JsonProperty(SUBSCRIBER_ID_FRONTEND_ALIAS)
73 public String getSubscriberId() {
77 public void setSubscriberId(String subscriberId) {
78 this.subscriberId = subscriberId;
82 public String getServiceType() {
86 public void setServiceType(String serviceType) {
87 this.serviceType = serviceType;
90 public String getServiceInstanceName() {
91 return serviceInstanceName;
94 public void setServiceInstanceName(String serviceInstanceName) {
95 this.serviceInstanceName = serviceInstanceName;
98 public String getSubscriberName() {
99 return subscriberName;
102 public void setSubscriberName(String subscriberName) {
103 this.subscriberName = subscriberName;
106 public String getAaiModelInvariantId() {
107 return aaiModelInvariantId;
110 public void setAaiModelInvariantId(String aaiModelInvariantId) {
111 this.aaiModelInvariantId = aaiModelInvariantId;
114 public String getAaiModelVersionId() {
115 return aaiModelVersionId;
118 public void setAaiModelVersionId(String aaiModelVersionId) {
119 this.aaiModelVersionId = aaiModelVersionId;
122 public boolean getIsPermitted() {
126 public void setIsPermitted(boolean isPermitted) {
127 this.isPermitted = isPermitted;
131 public boolean equals(Object o) {
135 if (o == null || getClass() != o.getClass()) {
139 ServiceInstanceSearchResult that = (ServiceInstanceSearchResult) o;
141 return StringUtils.equals(serviceInstanceId, that.serviceInstanceId);
145 public int hashCode() {
146 return serviceInstanceId != null ? serviceInstanceId.hashCode() : 0;