2 * Copyright (C) 2014 Red Hat, Inc.
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
10 package org.opendaylight.neutron.northbound.api;
12 import org.opendaylight.neutron.spi.NeutronSecurityRule;
14 import javax.xml.bind.annotation.XmlAccessType;
15 import javax.xml.bind.annotation.XmlAccessorType;
16 import javax.xml.bind.annotation.XmlElement;
17 import javax.xml.bind.annotation.XmlRootElement;
18 import java.util.List;
22 @XmlAccessorType(XmlAccessType.NONE)
24 public class NeutronSecurityRuleRequest {
26 * See OpenStack Network API v2.0 Reference for a
27 * description of annotated attributes and operations
30 @XmlElement(name="security_group_rule")
31 NeutronSecurityRule singletonSecurityRule;
33 @XmlElement(name="security_group_rules")
34 List<NeutronSecurityRule> bulkRequest;
36 NeutronSecurityRuleRequest() {
39 NeutronSecurityRuleRequest(List<NeutronSecurityRule> bulk) {
41 singletonSecurityRule = null;
44 NeutronSecurityRuleRequest(NeutronSecurityRule rule) {
45 singletonSecurityRule = rule;
48 public NeutronSecurityRule getSingleton() {
49 return singletonSecurityRule;
52 public boolean isSingleton() {
53 return (singletonSecurityRule != null);
55 public List<NeutronSecurityRule> getBulk() {