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