Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-adapters-rest-interface / src / main / java / org / onap / so / openstack / beans / NetworkInfo.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
24
25 import java.util.ArrayList;
26 import java.util.List;
27
28 /*
29  * This Java bean class relays Network details (including status) to ActiveVOS processes.
30  *
31  * This bean is returned by all Network-specific adapter operations (create, query, delete)
32  */
33
34 public class NetworkInfo {
35     // Set defaults for everything
36     private String name = "";
37     private String id = "";
38     private NetworkStatus status = NetworkStatus.UNKNOWN;
39     private String provider = "";
40     private List<Integer> vlans = new ArrayList<>();
41     private List<String> subnets = new ArrayList<>();
42     private String shared = "";
43
44     public NetworkInfo() {}
45
46     public NetworkInfo(String name, NetworkStatus status) {
47         this.name = name;
48         this.id = name; // Don't have an ID, so just use name
49         this.status = status;
50     }
51
52     public String getName() {
53         return name;
54     }
55
56     public void setName(String name) {
57         this.name = name;
58     }
59
60     public String getId() {
61         return id;
62     }
63
64     public void setId(String id) {
65         this.id = id;
66     }
67
68     public NetworkStatus getStatus() {
69         return status;
70     }
71
72     public void setStatus(NetworkStatus status) {
73         this.status = status;
74     }
75
76     public String getProvider() {
77         return provider;
78     }
79
80     public void setProvider(String provider) {
81         this.provider = provider;
82     }
83
84     public List<Integer> getVlans() {
85         return vlans;
86     }
87
88     public void setVlans(List<Integer> vlans) {
89         this.vlans = vlans;
90     }
91
92     public List<String> getSubnets() {
93         return subnets;
94     }
95
96     public void setSubnets(List<String> subnets) {
97         this.subnets = subnets;
98     }
99
100     public String getShared() {
101         return shared;
102     }
103
104     public void setShared(String shared) {
105         this.shared = shared;
106     }
107
108     @Override
109     public String toString() {
110         return "NetworkInfo{" + "name='" + name + '\'' + ", id='" + id + '\'' + ", status=" + status + ", provider='"
111                 + provider + '\'' + ", vlans=" + vlans + ", subnets=" + subnets + '}';
112     }
113 }
114