Deprecate ByteBufUtils.macAddressToBytes()
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / sal / convertor / match / data / MatchResponseConvertorData.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 package org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.data;
10
11 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.VersionDatapathIdConvertorData;
12 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.EthernetMatchBuilder;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv4MatchBuilder;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.Icmpv6MatchBuilder;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.IpMatchBuilder;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.ProtocolMatchFieldsBuilder;
18 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.TcpFlagsMatchBuilder;
19 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.VlanMatchBuilder;
20 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.ArpMatchBuilder;
21 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchArbitraryBitMaskBuilder;
22 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv4MatchBuilder;
23 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchArbitraryBitMaskBuilder;
24 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder;
25 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.TunnelIpv4MatchBuilder;
26 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.SctpMatchBuilder;
27 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.TcpMatchBuilder;
28 import org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder;
29 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
30
31 /**
32  * Convertor data used in
33  * {@link org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.match.MatchResponseConvertor}
34  * containing Openflow version, datapath ID and various builders, because match response convertor cases depends
35  * on each other and requires shared builders.
36  */
37 public class MatchResponseConvertorData extends VersionDatapathIdConvertorData {
38     private MatchBuilder matchBuilder;
39     private EthernetMatchBuilder ethernetMatchBuilder;
40     private VlanMatchBuilder vlanMatchBuilder;
41     private IpMatchBuilder ipMatchBuilder;
42     private TcpMatchBuilder tcpMatchBuilder;
43     private UdpMatchBuilder udpMatchBuilder;
44     private SctpMatchBuilder sctpMatchBuilder;
45     private Icmpv4MatchBuilder icmpv4MatchBuilder;
46     private Icmpv6MatchBuilder icmpv6MatchBuilder;
47     private Ipv4MatchBuilder ipv4MatchBuilder;
48     private Ipv4MatchArbitraryBitMaskBuilder ipv4MatchArbitraryBitMaskBuilder;
49     private Ipv6MatchArbitraryBitMaskBuilder ipv6MatchArbitraryBitMaskBuilder;
50     private ArpMatchBuilder arpMatchBuilder;
51     private Ipv6MatchBuilder ipv6MatchBuilder;
52     private ProtocolMatchFieldsBuilder protocolMatchFieldsBuilder;
53     private TunnelIpv4MatchBuilder tunnelIpv4MatchBuilder;
54     private TcpFlagsMatchBuilder tcpFlagsMatchBuilder;
55     private Class<? extends MatchField> oxmMatchField;
56
57     /**
58      * Instantiates a new Match convertor data.
59      *
60      * @param version the version
61      */
62     public MatchResponseConvertorData(short version) {
63         super(version);
64     }
65
66     /**
67      * Gets match builder.
68      *
69      * @return the match builder
70      */
71     public MatchBuilder getMatchBuilder() {
72         return matchBuilder;
73     }
74
75     /**
76      * Sets match builder.
77      *
78      * @param matchBuilder the match builder
79      */
80     public void setMatchBuilder(MatchBuilder matchBuilder) {
81         this.matchBuilder = matchBuilder;
82     }
83
84     /**
85      * Gets ethernet match builder.
86      *
87      * @return the ethernet match builder
88      */
89     public EthernetMatchBuilder getEthernetMatchBuilder() {
90         return ethernetMatchBuilder;
91     }
92
93     /**
94      * Sets ethernet match builder.
95      *
96      * @param ethernetMatchBuilder the ethernet match builder
97      */
98     public void setEthernetMatchBuilder(EthernetMatchBuilder ethernetMatchBuilder) {
99         this.ethernetMatchBuilder = ethernetMatchBuilder;
100     }
101
102     /**
103      * Gets vlan match builder.
104      *
105      * @return the vlan match builder
106      */
107     public VlanMatchBuilder getVlanMatchBuilder() {
108         return vlanMatchBuilder;
109     }
110
111     /**
112      * Sets vlan match builder.
113      *
114      * @param vlanMatchBuilder the vlan match builder
115      */
116     public void setVlanMatchBuilder(VlanMatchBuilder vlanMatchBuilder) {
117         this.vlanMatchBuilder = vlanMatchBuilder;
118     }
119
120     /**
121      * Gets ip match builder.
122      *
123      * @return the ip match builder
124      */
125     public IpMatchBuilder getIpMatchBuilder() {
126         return ipMatchBuilder;
127     }
128
129     /**
130      * Sets ip match builder.
131      *
132      * @param ipMatchBuilder the ip match builder
133      */
134     public void setIpMatchBuilder(IpMatchBuilder ipMatchBuilder) {
135         this.ipMatchBuilder = ipMatchBuilder;
136     }
137
138     /**
139      * Gets tcp match builder.
140      *
141      * @return the tcp match builder
142      */
143     public TcpMatchBuilder getTcpMatchBuilder() {
144         return tcpMatchBuilder;
145     }
146
147     /**
148      * Sets tcp match builder.
149      *
150      * @param tcpMatchBuilder the tcp match builder
151      */
152     public void setTcpMatchBuilder(TcpMatchBuilder tcpMatchBuilder) {
153         this.tcpMatchBuilder = tcpMatchBuilder;
154     }
155
156     /**
157      * Gets udp match builder.
158      *
159      * @return the udp match builder
160      */
161     public UdpMatchBuilder getUdpMatchBuilder() {
162         return udpMatchBuilder;
163     }
164
165     /**
166      * Sets udp match builder.
167      *
168      * @param udpMatchBuilder the udp match builder
169      */
170     public void setUdpMatchBuilder(UdpMatchBuilder udpMatchBuilder) {
171         this.udpMatchBuilder = udpMatchBuilder;
172     }
173
174     /**
175      * Gets sctp match builder.
176      *
177      * @return the sctp match builder
178      */
179     public SctpMatchBuilder getSctpMatchBuilder() {
180         return sctpMatchBuilder;
181     }
182
183     /**
184      * Sets sctp match builder.
185      *
186      * @param sctpMatchBuilder the sctp match builder
187      */
188     public void setSctpMatchBuilder(SctpMatchBuilder sctpMatchBuilder) {
189         this.sctpMatchBuilder = sctpMatchBuilder;
190     }
191
192     /**
193      * Gets icmpv 4 match builder.
194      *
195      * @return the icmpv 4 match builder
196      */
197     public Icmpv4MatchBuilder getIcmpv4MatchBuilder() {
198         return icmpv4MatchBuilder;
199     }
200
201     /**
202      * Sets icmpv 4 match builder.
203      *
204      * @param icmpv4MatchBuilder the icmpv 4 match builder
205      */
206     public void setIcmpv4MatchBuilder(Icmpv4MatchBuilder icmpv4MatchBuilder) {
207         this.icmpv4MatchBuilder = icmpv4MatchBuilder;
208     }
209
210     /**
211      * Gets icmpv 6 match builder.
212      *
213      * @return the icmpv 6 match builder
214      */
215     public Icmpv6MatchBuilder getIcmpv6MatchBuilder() {
216         return icmpv6MatchBuilder;
217     }
218
219     /**
220      * Sets icmpv 6 match builder.
221      *
222      * @param icmpv6MatchBuilder the icmpv 6 match builder
223      */
224     public void setIcmpv6MatchBuilder(Icmpv6MatchBuilder icmpv6MatchBuilder) {
225         this.icmpv6MatchBuilder = icmpv6MatchBuilder;
226     }
227
228     /**
229      * Gets ipv 4 match builder.
230      *
231      * @return the ipv 4 match builder
232      */
233     public Ipv4MatchBuilder getIpv4MatchBuilder() {
234         return ipv4MatchBuilder;
235     }
236
237     /**
238      * Sets ipv 4 match builder.
239      *
240      * @param ipv4MatchBuilder the ipv 4 match builder
241      */
242     public void setIpv4MatchBuilder(Ipv4MatchBuilder ipv4MatchBuilder) {
243         this.ipv4MatchBuilder = ipv4MatchBuilder;
244     }
245
246     /**
247      * Gets ipv 4 match arbitrary bit mask builder.
248      *
249      * @return the ipv 4 match arbitrary bit mask builder
250      */
251     public Ipv4MatchArbitraryBitMaskBuilder getIpv4MatchArbitraryBitMaskBuilder() {
252         return ipv4MatchArbitraryBitMaskBuilder;
253     }
254
255     /**
256      * Sets ipv 4 match arbitrary bit mask builder.
257      *
258      * @param ipv4MatchArbitraryBitMaskBuilder the ipv 4 match arbitrary bit mask builder
259      */
260     public void setIpv4MatchArbitraryBitMaskBuilder(Ipv4MatchArbitraryBitMaskBuilder ipv4MatchArbitraryBitMaskBuilder) {
261         this.ipv4MatchArbitraryBitMaskBuilder = ipv4MatchArbitraryBitMaskBuilder;
262     }
263
264     /**
265      * Gets ipv 6 match arbitrary bit mask builder.
266      *
267      * @return the ipv 6 match arbitrary bit mask builder
268      */
269     public Ipv6MatchArbitraryBitMaskBuilder getIpv6MatchArbitraryBitMaskBuilder() {
270         return ipv6MatchArbitraryBitMaskBuilder;
271     }
272
273     /**
274      * Sets ipv 6 match arbitrary bit mask builder.
275      *
276      * @param ipv6MatchArbitraryBitMaskBuilder the ipv 6 match arbitrary bit mask builder
277      */
278     public void setIpv6MatchArbitraryBitMaskBuilder(Ipv6MatchArbitraryBitMaskBuilder ipv6MatchArbitraryBitMaskBuilder) {
279         this.ipv6MatchArbitraryBitMaskBuilder = ipv6MatchArbitraryBitMaskBuilder;
280     }
281
282     /**
283      * Gets arp match builder.
284      *
285      * @return the arp match builder
286      */
287     public ArpMatchBuilder getArpMatchBuilder() {
288         return arpMatchBuilder;
289     }
290
291     /**
292      * Sets arp match builder.
293      *
294      * @param arpMatchBuilder the arp match builder
295      */
296     public void setArpMatchBuilder(ArpMatchBuilder arpMatchBuilder) {
297         this.arpMatchBuilder = arpMatchBuilder;
298     }
299
300     /**
301      * Gets ipv 6 match builder.
302      *
303      * @return the ipv 6 match builder
304      */
305     public Ipv6MatchBuilder getIpv6MatchBuilder() {
306         return ipv6MatchBuilder;
307     }
308
309     /**
310      * Sets ipv 6 match builder.
311      *
312      * @param ipv6MatchBuilder the ipv 6 match builder
313      */
314     public void setIpv6MatchBuilder(Ipv6MatchBuilder ipv6MatchBuilder) {
315         this.ipv6MatchBuilder = ipv6MatchBuilder;
316     }
317
318     /**
319      * Gets protocol match fields builder.
320      *
321      * @return the protocol match fields builder
322      */
323     public ProtocolMatchFieldsBuilder getProtocolMatchFieldsBuilder() {
324         return protocolMatchFieldsBuilder;
325     }
326
327     /**
328      * Sets protocol match fields builder.
329      *
330      * @param protocolMatchFieldsBuilder the protocol match fields builder
331      */
332     public void setProtocolMatchFieldsBuilder(ProtocolMatchFieldsBuilder protocolMatchFieldsBuilder) {
333         this.protocolMatchFieldsBuilder = protocolMatchFieldsBuilder;
334     }
335
336     /**
337      * Gets tunnel ipv 4 match builder.
338      *
339      * @return the tunnel ipv 4 match builder
340      */
341     public TunnelIpv4MatchBuilder getTunnelIpv4MatchBuilder() {
342         return tunnelIpv4MatchBuilder;
343     }
344
345     /**
346      * Sets tunnel ipv 4 match builder.
347      *
348      * @param tunnelIpv4MatchBuilder the tunnel ipv 4 match builder
349      */
350     public void setTunnelIpv4MatchBuilder(TunnelIpv4MatchBuilder tunnelIpv4MatchBuilder) {
351         this.tunnelIpv4MatchBuilder = tunnelIpv4MatchBuilder;
352     }
353
354     /**
355      * Sets tcp flags match builder.
356      *
357      * @param tcpFlagsMatchBuilder the tcp flags match builder
358      */
359     public void setTcpFlagsMatchBuilder(TcpFlagsMatchBuilder tcpFlagsMatchBuilder) {
360         this.tcpFlagsMatchBuilder = tcpFlagsMatchBuilder;
361     }
362
363     /**
364      * Gets tcp flags match builder.
365      *
366      * @return the tcp flags match builder
367      */
368     public TcpFlagsMatchBuilder getTcpFlagsMatchBuilder() {
369         return tcpFlagsMatchBuilder;
370     }
371
372     /**
373      * Sets oxm match field.
374      *
375      * @param oxmMatchField the oxm match field
376      */
377     public void setOxmMatchField(Class<? extends MatchField> oxmMatchField) {
378         this.oxmMatchField = oxmMatchField;
379     }
380
381     /**
382      * Gets oxm match field.
383      *
384      * @return the oxm match field
385      */
386     public Class<? extends MatchField> getOxmMatchField() {
387         return oxmMatchField;
388     }
389 }