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.controller.networkconfig.neutron.northbound;
12 import org.opendaylight.controller.networkconfig.neutron.NeutronSecurityGroup;
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 NeutronSecurityGroupRequest {
26 * See OpenStack Network API v2.0 Reference for a
27 * description of annotated attributes and operations
30 @XmlElement (name = "security_group")
31 NeutronSecurityGroup singletonSecurityGroup;
33 @XmlElement (name = "security_groups")
34 List<NeutronSecurityGroup> bulkRequest;
36 NeutronSecurityGroupRequest() {
39 NeutronSecurityGroupRequest(List<NeutronSecurityGroup> bulk) {
41 singletonSecurityGroup = null;
44 NeutronSecurityGroupRequest(NeutronSecurityGroup group) {
45 singletonSecurityGroup = group;
48 public List<NeutronSecurityGroup> getBulk() {
52 public NeutronSecurityGroup getSingleton() {
53 return singletonSecurityGroup;
56 public boolean isSingleton() {
57 return (singletonSecurityGroup != null);