ca3a9c5a8d90c77ee02d1a1f2e8d9031d61b8ccb
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / Pool.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
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.so.openstack.beans;
22
23 import java.io.Serializable;
24 import org.apache.commons.lang3.builder.HashCodeBuilder;
25 import org.apache.commons.lang3.builder.EqualsBuilder;
26
27 public class Pool implements Serializable {
28
29         private String start;
30         private String end;
31         private static final long serialVersionUID = 768026109321305392L;
32
33         /**
34          * @return the start
35          */
36         public String getStart() {
37                 return start;
38         }
39         /**
40          * @param start the start to set
41          */
42         public void setStart(String start) {
43                 this.start = start;
44         }
45         /**
46          * @return the end
47          */
48         public String getEnd() {
49                 return end;
50         }
51         /**
52          * @param end the end to set
53          */
54         public void setEnd(String end) {
55                 this.end = end;
56         }
57
58         @Override
59         public String toString() {
60                 return "Allocation_pool [start=" + start + ", end=" + end + "]";
61         }
62         
63         @Override
64         public boolean equals(final Object other) {
65                 if (!(other instanceof Pool)) {
66                         return false;
67                 }
68                 Pool castOther = (Pool) other;
69                 return new EqualsBuilder().append(start, castOther.start).append(end, castOther.end).isEquals();
70         }
71         @Override
72         public int hashCode() {
73                 return new HashCodeBuilder().append(start).append(end).toHashCode();
74         }
75         
76
77 }