Merge "Replace String Literal with Constant"
[so.git] / adapters / mso-openstack-adapters / src / main / java / org / onap / so / adapters / network / ContrailSubnetPool.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.adapters.network;
22
23
24 import org.onap.so.openstack.beans.Pool;
25 import com.fasterxml.jackson.annotation.JsonProperty;
26
27 public class ContrailSubnetPool {
28
29     @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools_start")
30     private String start;
31
32     @JsonProperty("network_ipam_refs_data_ipam_subnets_allocation_pools_end")
33     private String end;
34
35     public ContrailSubnetPool() {
36         /* Empty constructor */
37     }
38
39     public String getStart() {
40         return start;
41     }
42
43     public void setStart(String start) {
44         this.start = start;
45     }
46
47     public String getEnd() {
48         return end;
49     }
50
51     public void setEnd(String end) {
52         this.end = end;
53     }
54
55     public void populateWith(Pool pool) {
56         if (pool != null) {
57             start = pool.getStart();
58             end = pool.getEnd();
59         }
60     }
61
62     @Override
63     public String toString() {
64         return "ContrailSubnetPool [start=" + start + ", end=" + end + "]";
65     }
66
67 }