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

org.xlcloud.openstack.model.neutron.Network Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2012 AMG.lab, a Bull Group Company
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.xlcloud.openstack.model.neutron;

import java.io.Serializable;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;

/**
 * @author Krzysztof Szafrański, AMG.net
 */
@XmlRootElement( name = "network" )
@XmlAccessorType( XmlAccessType.NONE )
@JsonRootName( "network" )
@JsonIgnoreProperties( ignoreUnknown = true )
public class Network implements Serializable {

    private static final long serialVersionUID = -7581334347876030813L;

    @XmlAttribute
    private Status status;

    @XmlElement( type = String.class )
    private List subnets;

    @XmlAttribute
    private String name;

    @XmlAttribute( name = "provider:physical_network" )
    @JsonProperty( "provider:physical_network" )
    private String providerPhysicalNetwork;

    @XmlAttribute( name = "admin_state_up" )
    @JsonProperty( "admin_state_up" )
    private boolean adminStateUp;

    @XmlAttribute( name = "tenant_id" )
    @JsonProperty( "tenant_id" )
    private String tenantId;

    @XmlAttribute( name = "provider:network_type" )
    @JsonProperty( "provider:network_type" )
    private String networkType;

    @XmlAttribute( name = "router:external" )
    @JsonProperty( "router:external" )
    private String routerExternal;

    @XmlAttribute
    private String id;

    @XmlAttribute
    private String shared;

    @XmlAttribute( name = "provider:segmentation_id" )
    @JsonProperty( "provider:segmentation_id" )
    private String providerSegmentationId;

    /**
     * @return the status
     */
    public Status getStatus() {
        return status;
    }

    /**
     * @param status
     *            the status to set
     */
    public void setStatus(Status status) {
        this.status = status;
    }

    /**
     * @return the subnets
     */
    public List getSubnets() {
        return subnets;
    }

    /**
     * @param subnets
     *            the subnets to set
     */
    public void setSubnets(List subnets) {
        this.subnets = subnets;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name
     *            the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the providerPhysicalNetwork
     */
    public String getProviderPhysicalNetwork() {
        return providerPhysicalNetwork;
    }

    /**
     * @param providerPhysicalNetwork
     *            the providerPhysicalNetwork to set
     */
    public void setProviderPhysicalNetwork(String providerPhysicalNetwork) {
        this.providerPhysicalNetwork = providerPhysicalNetwork;
    }

    /**
     * @return the adminStateUp
     */
    public boolean isAdminStateUp() {
        return adminStateUp;
    }

    /**
     * @param adminStateUp
     *            the adminStateUp to set
     */
    public void setAdminStateUp(boolean adminStateUp) {
        this.adminStateUp = adminStateUp;
    }

    /**
     * @return the tenantId
     */
    public String getTenantId() {
        return tenantId;
    }

    /**
     * @param tenantId
     *            the tenantId to set
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    /**
     * @return the netType
     */
    public String getNetworkType() {
        return networkType;
    }

    /**
     * @param networkType
     *            the networkType to set
     */
    public void setNetworkType(String networkType) {
        this.networkType = networkType;
    }

    /**
     * @return the routerExternal
     */
    public String getRouterExternal() {
        return routerExternal;
    }

    /**
     * @param routerExternal
     *            the routerExternal to set
     */
    public void setRouterExternal(String routerExternal) {
        this.routerExternal = routerExternal;
    }

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id
     *            the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * @return the shared
     */
    public String getShared() {
        return shared;
    }

    /**
     * @param shared
     *            the shared to set
     */
    public void setShared(String shared) {
        this.shared = shared;
    }

    /**
     * @return the providerSegmentationId
     */
    public String getProviderSegmentationId() {
        return providerSegmentationId;
    }

    /**
     * @param providerSegmentationId
     *            the providerSegmentationId to set
     */
    public void setProviderSegnmentationId(String providerSegmentationId) {
        this.providerSegmentationId = providerSegmentationId;
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
        return "Network [status=" + status + ", subnets=" + subnets + ", name=" + name + ", providerPhysicalNetwork="
                + providerPhysicalNetwork + ", adminStateUp=" + adminStateUp + ", tenantId=" + tenantId + ", networkType=" + networkType
                + ", routerExternal=" + routerExternal + ", id=" + id + ", shared=" + shared + ", providerSegmentationId="
                + providerSegmentationId + "]";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy