Containerization feature of SO
[so.git] / bpmn / MSOCommonBPMN / src / main / java / org / onap / so / bpmn / servicedecomposition / bbobjects / SriovVf.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.bpmn.servicedecomposition.bbobjects;
22
23 import java.io.Serializable;
24
25 import com.fasterxml.jackson.annotation.JsonProperty;
26 import com.fasterxml.jackson.annotation.JsonRootName;
27 import org.apache.commons.lang3.builder.EqualsBuilder;
28 import org.apache.commons.lang3.builder.HashCodeBuilder;
29 import org.onap.so.bpmn.servicedecomposition.ShallowCopy;
30
31 import javax.persistence.Id;
32
33 @JsonRootName("sriov-vf")
34 public class SriovVf implements Serializable, ShallowCopy<SriovVf>{
35
36         private static final long serialVersionUID = -7790331637399859914L;
37
38         @Id
39         @JsonProperty("pci-id")
40     private String pciId;
41         @JsonProperty("vf-vlan-filter")
42     private String vfVlanFilter;
43         @JsonProperty("vf-mac-filter")
44     private String vfMacFilter;
45         @JsonProperty("vf-vlan-strip")
46     private Boolean vfVlanStrip;
47         @JsonProperty("vf-vlan-anti-spoof-check")
48     private Boolean vfVlanAntiSpoofCheck;
49         @JsonProperty("vf-mac-anti-spoof-check")
50     private Boolean vfMacAntiSpoofCheck;
51         @JsonProperty("vf-mirrors")
52     private String vfMirrors;
53         @JsonProperty("vf-broadcast-allow")
54     private Boolean vfBroadcastAllow;
55         @JsonProperty("vf-unknown-multicast-allow")
56     private Boolean vfUnknownMulticastAllow;
57         @JsonProperty("vf-unknown-unicast-allow")
58     private Boolean vfUnknownUnicastAllow;
59         @JsonProperty("vf-insert-stag")
60     private Boolean vfInsertStag;
61         @JsonProperty("vf-link-status")
62     private String vfLinkStatus;
63         @JsonProperty("neutron-network-id")
64     private String neutronNetworkId;
65
66         public String getPciId() {
67                 return pciId;
68         }
69         public void setPciId(String pciId) {
70                 this.pciId = pciId;
71         }
72         public String getVfVlanFilter() {
73                 return vfVlanFilter;
74         }
75         public void setVfVlanFilter(String vfVlanFilter) {
76                 this.vfVlanFilter = vfVlanFilter;
77         }
78         public String getVfMacFilter() {
79                 return vfMacFilter;
80         }
81         public void setVfMacFilter(String vfMacFilter) {
82                 this.vfMacFilter = vfMacFilter;
83         }
84         public Boolean getVfVlanStrip() {
85                 return vfVlanStrip;
86         }
87         public void setVfVlanStrip(Boolean vfVlanStrip) {
88                 this.vfVlanStrip = vfVlanStrip;
89         }
90         public Boolean getVfVlanAntiSpoofCheck() {
91                 return vfVlanAntiSpoofCheck;
92         }
93         public void setVfVlanAntiSpoofCheck(Boolean vfVlanAntiSpoofCheck) {
94                 this.vfVlanAntiSpoofCheck = vfVlanAntiSpoofCheck;
95         }
96         public Boolean getVfMacAntiSpoofCheck() {
97                 return vfMacAntiSpoofCheck;
98         }
99         public void setVfMacAntiSpoofCheck(Boolean vfMacAntiSpoofCheck) {
100                 this.vfMacAntiSpoofCheck = vfMacAntiSpoofCheck;
101         }
102         public String getVfMirrors() {
103                 return vfMirrors;
104         }
105         public void setVfMirrors(String vfMirrors) {
106                 this.vfMirrors = vfMirrors;
107         }
108         public Boolean getVfBroadcastAllow() {
109                 return vfBroadcastAllow;
110         }
111         public void setVfBroadcastAllow(Boolean vfBroadcastAllow) {
112                 this.vfBroadcastAllow = vfBroadcastAllow;
113         }
114         public Boolean getVfUnknownMulticastAllow() {
115                 return vfUnknownMulticastAllow;
116         }
117         public void setVfUnknownMulticastAllow(Boolean vfUnknownMulticastAllow) {
118                 this.vfUnknownMulticastAllow = vfUnknownMulticastAllow;
119         }
120         public Boolean getVfUnknownUnicastAllow() {
121                 return vfUnknownUnicastAllow;
122         }
123         public void setVfUnknownUnicastAllow(Boolean vfUnknownUnicastAllow) {
124                 this.vfUnknownUnicastAllow = vfUnknownUnicastAllow;
125         }
126         public Boolean getVfInsertStag() {
127                 return vfInsertStag;
128         }
129         public void setVfInsertStag(Boolean vfInsertStag) {
130                 this.vfInsertStag = vfInsertStag;
131         }
132         public String getVfLinkStatus() {
133                 return vfLinkStatus;
134         }
135         public void setVfLinkStatus(String vfLinkStatus) {
136                 this.vfLinkStatus = vfLinkStatus;
137         }
138         public String getNeutronNetworkId() {
139                 return neutronNetworkId;
140         }
141         public void setNeutronNetworkId(String neutronNetworkId) {
142                 this.neutronNetworkId = neutronNetworkId;
143         }
144         @Override
145         public boolean equals(final Object other) {
146                 if (!(other instanceof SriovVf)) {
147                         return false;
148                 }
149                 SriovVf castOther = (SriovVf) other;
150                 return new EqualsBuilder().append(pciId, castOther.pciId).isEquals();
151         }
152         @Override
153         public int hashCode() {
154                 return new HashCodeBuilder().append(pciId).toHashCode();
155         }
156 }