6473ab23e377352e221b498d832526eace8d99e2
[dcaegen2/services.git] / components / slice-analysis-ms / src / main / java / org / onap / slice / analysis / ms / models / CUModel.java
1 /*******************************************************************************
2  *  ============LICENSE_START=======================================================
3  *  slice-analysis-ms
4  *  ================================================================================
5  *   Copyright (C) 2020 Wipro Limited.
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
22 package org.onap.slice.analysis.ms.models;
23
24 import java.util.List;
25
26 /**
27  * Model class for CU model
28  */
29 public class CUModel {
30
31         private String gNBCUName;
32     private String nearRTRICId;
33     private List<CellCUList> cellCUList;
34
35     public String getgNBCUName() {
36                 return gNBCUName;
37         }
38
39         public void setgNBCUName(String gNBCUName) {
40                 this.gNBCUName = gNBCUName;
41         }
42
43         public String getNearRTRICId() {
44                 return nearRTRICId;
45         }
46
47         public void setNearRTRICId(String nearRTRICId) {
48                 this.nearRTRICId = nearRTRICId;
49         }
50
51         public List<CellCUList> getCellCUList() {
52         return cellCUList;
53     }
54
55     public void setCellCUList(List<CellCUList> cellCUList) {
56         this.cellCUList = cellCUList;
57     }
58     
59     @Override
60         public String toString() {
61                 return "CUModel [gNBCUName=" + gNBCUName + ", nearRTRICId=" + nearRTRICId + ", cellCUList=" + cellCUList + "]";
62         }
63
64         @Override
65         public int hashCode() {
66                 final int prime = 31;
67                 int result = 1;
68                 result = prime * result + ((cellCUList == null) ? 0 : cellCUList.hashCode());
69                 result = prime * result + ((gNBCUName == null) ? 0 : gNBCUName.hashCode());
70                 result = prime * result + ((nearRTRICId == null) ? 0 : nearRTRICId.hashCode());
71                 return result;
72         }
73
74         @Override
75         public boolean equals(Object obj) {
76                 if (this == obj)
77                         return true;
78                 if (obj == null)
79                         return false;
80                 if (getClass() != obj.getClass())
81                         return false;
82                 CUModel other = (CUModel) obj;
83                 if (cellCUList == null) {
84                         if (other.cellCUList != null)
85                                 return false;
86                 } else if (!cellCUList.equals(other.cellCUList))
87                         return false;
88                 if (gNBCUName == null) {
89                         if (other.gNBCUName != null)
90                                 return false;
91                 } else if (!gNBCUName.equals(other.gNBCUName))
92                         return false;
93                 if (nearRTRICId == null) {
94                         if (other.nearRTRICId != null)
95                                 return false;
96                 } else if (!nearRTRICId.equals(other.nearRTRICId))
97                         return false;
98                 return true;
99         }
100
101 }