6d62fff9f892d4cc84766c909e185a84364e397b
[ccsdk/sli/adaptors.git] / netbox-client / provider / src / main / java / org / onap / ccsdk / sli / adaptors / netbox / model / IPAddress.java
1 /*
2  * Copyright (C) 2018 Bell Canada.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package org.onap.ccsdk.sli.adaptors.netbox.model;
17
18 import java.util.Objects;
19
20 public class IPAddress extends Identifiable {
21
22     private Status.Values status;
23     private String address;
24
25     public void setStatus(Status.Values status) {
26         this.status = status;
27     }
28
29     public void setAddress(String address) {
30         this.address = address;
31     }
32
33     public Status.Values getStatus() {
34         return status;
35     }
36
37     public String getAddress() {
38         return address;
39     }
40
41     @Override
42     public boolean equals(Object o) {
43         if (this == o) {
44             return true;
45         }
46         if (o == null || getClass() != o.getClass()) {
47             return false;
48         }
49         IPAddress ipAddress = (IPAddress) o;
50         return Objects.equals(status, ipAddress.status) &&
51             Objects.equals(address, ipAddress.address);
52     }
53
54     @Override
55     public int hashCode() {
56         return Objects.hash(status, address);
57     }
58 }