/*
- * Copyright (C) 2014 Red Hat, Inc.
+ * Copyright (c) 2014, 2015 Red Hat, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
package org.opendaylight.neutron.northbound.api;
-import org.opendaylight.neutron.spi.NeutronFirewallRule;
-
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import java.util.List;
-
+import org.opendaylight.neutron.spi.NeutronFirewallRule;
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
-
-public class NeutronFirewallRuleRequest {
+@SuppressFBWarnings("URF_UNREAD_FIELD")
+public final class NeutronFirewallRuleRequest implements INeutronRequest<NeutronFirewallRule> {
/**
- * See OpenStack Network API v2.0 Reference for description of
+ * See OpenStack Network API v2.0 Reference for description of the following link.
* http://docs.openstack.org/api/openstack-network/2.0/content/
*
- * Deprecated as all Neutron FWaaS is experimental and so doesn't meet
- * the scope of neutron northbound
- *
- * @deprecated
*/
- @XmlElement(name="firewall_rule")
- NeutronFirewallRule singletonFirewallRule;
+ @XmlElement(name = "firewall_rule")
+ NeutronFirewallRule singleton;
- @XmlElement(name="firewall_rules")
+ @XmlElement(name = "firewall_rules")
List<NeutronFirewallRule> bulkRequest;
NeutronFirewallRuleRequest() {
NeutronFirewallRuleRequest(List<NeutronFirewallRule> bulk) {
bulkRequest = bulk;
- singletonFirewallRule = null;
}
NeutronFirewallRuleRequest(NeutronFirewallRule group) {
- singletonFirewallRule = group;
- }
-
- public List<NeutronFirewallRule> getBulk() {
- return bulkRequest;
- }
-
- public NeutronFirewallRule getSingleton() {
- return singletonFirewallRule;
- }
-
- public boolean isSingleton() {
- return (singletonFirewallRule != null);
+ singleton = group;
}
}