2 * Copyright (c) 2014, 2015 Red Hat, Inc. and others. All rights reserved.
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
9 package org.opendaylight.neutron.northbound.api;
11 import org.opendaylight.neutron.spi.NeutronFirewallRule;
13 import javax.xml.bind.annotation.XmlAccessType;
14 import javax.xml.bind.annotation.XmlAccessorType;
15 import javax.xml.bind.annotation.XmlElement;
16 import javax.xml.bind.annotation.XmlRootElement;
17 import java.util.List;
21 @XmlAccessorType(XmlAccessType.NONE)
23 public class NeutronFirewallRuleRequest
24 implements INeutronRequest<NeutronFirewallRule> {
26 * See OpenStack Network API v2.0 Reference for description of
27 * http://docs.openstack.org/api/openstack-network/2.0/content/
31 @XmlElement(name="firewall_rule")
32 NeutronFirewallRule singletonFirewallRule;
34 @XmlElement(name="firewall_rules")
35 List<NeutronFirewallRule> bulkRequest;
37 NeutronFirewallRuleRequest() {
40 NeutronFirewallRuleRequest(List<NeutronFirewallRule> bulk) {
42 singletonFirewallRule = null;
45 NeutronFirewallRuleRequest(NeutronFirewallRule group) {
46 singletonFirewallRule = group;
50 public List<NeutronFirewallRule> getBulk() {
55 public NeutronFirewallRule getSingleton() {
56 return singletonFirewallRule;
60 public boolean isSingleton() {
61 return (singletonFirewallRule != null);