All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.opendaylight.neutron.spi.NeutronSFCPortChain Maven / Gradle / Ivy

There is a newer version: 0.16.4
Show newest version
/*
 * Copyright (c) 2016 Brocade Communications Systems, 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,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 */
package org.opendaylight.neutron.spi;

import java.util.List;
import java.util.Map;
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 javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
public final class NeutronSFCPortChain extends NeutronBaseAttributes {
    private static final long serialVersionUID = 1L;

    // See OpenStack Networking SFC (networking-sfc) Port Chain API v1.0 Reference
    // for description of annotated attributes

    @XmlElement(name = "port_pair_groups")
    List portPairGroupsUUID;

    @XmlElement(name = "flow_classifiers")
    List flowClassifiersUUID;

    @XmlElement(name = "chain_parameters")
    @XmlJavaTypeAdapter(NeutronResourceMapPropertyAdapter.class)
    Map chainParameters;

    public NeutronSFCPortChain() {
    }

    public List getPortPairGroupsUUID() {
        return portPairGroupsUUID;
    }

    public void setPortPairGroupsUUID(List portPairGroupsUUID) {
        this.portPairGroupsUUID = portPairGroupsUUID;
    }

    public List getFlowClassifiersUUID() {
        return flowClassifiersUUID;
    }

    public void setFlowClassifiersUUID(List flowClassifiersUUID) {
        this.flowClassifiersUUID = flowClassifiersUUID;
    }

    public Map getChainParameters() {
        return chainParameters;
    }

    public void setChainParameters(Map chainParameters) {
        this.chainParameters = chainParameters;
    }

    @Override
    protected boolean extractField(String field, NeutronSFCPortChain ans) {
        switch (field) {
            case "port_pair_groups":
                ans.setPortPairGroupsUUID(this.getPortPairGroupsUUID());
                break;
            case "flow_classifiers":
                ans.setFlowClassifiersUUID(this.getFlowClassifiersUUID());
                break;
            case "chain_parameters":
                ans.setChainParameters(this.getChainParameters());
                break;
            default:
                return super.extractField(field, ans);
        }
        return true;
    }

    @Override
    public String toString() {
        return "NeutronSFCPortChain[" + "tenantID='" + getTenantID() + '\'' + ", name='" + name + '\''
                + ", portPairGroupsUUID=" + portPairGroupsUUID + ", flowClassifiersUUID='" + flowClassifiersUUID + '\''
                + ", chainParameters=" + chainParameters + ']';
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy