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

org.xlcloud.openstack.model.neutron.Port 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 = "port" )
@XmlAccessorType( XmlAccessType.NONE )
@JsonRootName( "port" )
@JsonIgnoreProperties( ignoreUnknown = true )
public class Port implements Serializable {

    private static final long serialVersionUID = 3354381998311969248L;

    @XmlAttribute
    private Status status;

    @XmlAttribute
    private String name;

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

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

    @XmlAttribute( name = "binding:vif_type" )
    @JsonProperty( "binding:vif_type" )
    private String bindingVifType;

    @XmlAttribute( name = "device_owner" )
    @JsonProperty( "device_owner" )
    private String deviceOwner;
    
    @XmlAttribute( name = "binding:capabilities" )
    @JsonProperty( "binding:capabilities" )
    private BindingCapabilities bindingCapabilities;
    
    @XmlAttribute( name = "mac_address" )
    @JsonProperty( "mac_address" )
    private String macAddress;
    
    @XmlElement( name = "fixed_ips", type = FixedIp.class )
    @JsonProperty( "fixed_ips" )
    private List fixedIps;
    
    @XmlAttribute
    private String id;
    
    @XmlElement( name = "security_groups", type = String.class )
    @JsonProperty( "security_groups" )
    private List securityGroups;

    @XmlAttribute( name = "device_id" )
    @JsonProperty( "device_id" )
    private String deviceId;
    
    /**
     * Gets the value of {@link #status}.
     * @return value of {@link #status}
     */
    public Status getStatus() {
        return status;
    }

    /**
     * Sets the value of {@link #status}.
     * @param status - value
     */
    public void setStatus(Status status) {
        this.status = status;
    }

    /**
     * Gets the value of {@link #name}.
     * @return value of {@link #name}
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of {@link #name}.
     * @param name - value
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Gets the value of {@link #adminStateUp}.
     * @return value of {@link #adminStateUp}
     */
    public boolean isAdminStateUp() {
        return adminStateUp;
    }

    /**
     * Sets the value of {@link #adminStateUp}.
     * @param adminStateUp - value
     */
    public void setAdminStateUp(boolean adminStateUp) {
        this.adminStateUp = adminStateUp;
    }

    /**
     * Gets the value of {@link #networkId}.
     * @return value of {@link #networkId}
     */
    public String getNetworkId() {
        return networkId;
    }
    
    /**
     * Sets the value of {@link #networkId}.
     * @param networkId - value
     */
    public void setNetworkId(String networkId) {
        this.networkId = networkId;
    }
    
    /**
     * Gets the value of {@link #tenantId}.
     * @return value of {@link #tenantId}
     */
    public String getTenantId() {
        return tenantId;
    }

    /**
     * Sets the value of {@link #tenantId}.
     * @param tenantId - value
     */
    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }
    
    /**
     * Gets the value of {@link #bindingVifType}.
     * @return value of {@link #bindingVifType}
     */
    public String getBindingVifType() {
        return bindingVifType;
    }

    /**
     * Sets the value of {@link #bindingVifType}.
     * @param bindingVifType - value
     */
    public void setBindingVifType(String bindingVifType) {
        this.bindingVifType = bindingVifType;
    }

    /**
     * Gets the value of {@link #deviceOwner}.
     * @return value of {@link #deviceOwner}
     */
    public String getDeviceOwner() {
        return deviceOwner;
    }

    /**
     * Sets the value of {@link #deviceOwner}.
     * @param deviceOwner - value
     */
    public void setDeviceOwner(String deviceOwner) {
        this.deviceOwner = deviceOwner;
    }
    
    /**
     * Gets the value of {@link #bindingCapabilities}.
     * @return value of {@link #bindingCapabilities}
     */
    public BindingCapabilities getBindingCapabilities() {
        return bindingCapabilities;
    }
    
    /**
     * Sets the value of {@link #bindingCapabilities}.
     * @param bindingCapabilities - value
     */
    public void setBindingCapabilities(BindingCapabilities bindingCapabilities) {
        this.bindingCapabilities = bindingCapabilities;
    }

    /**
     * Gets the value of {@link #macAddress}.
     * @return value of {@link #macAddress}
     */
    public String getMacAddress() {
        return macAddress;
    }

    /**
     * Sets the value of {@link #macAddress}.
     * @param macAddress - value
     */
    public void setMacAddress(String macAddress) {
        this.macAddress = macAddress;
    }

    /**
     * Gets the value of {@link #fixedIps}.
     * @return value of {@link #fixedIps}
     */
    public List getFixedIps() {
        return fixedIps;
    }
    
    /**
     * Sets the value of {@link #fixedIps}.
     * @param fixedIps - value
     */
    public void setFixedIps(List fixedIps) {
        this.fixedIps = fixedIps;
    }

    /**
     * Gets the value of {@link #id}.
     * @return value of {@link #id}
     */
    public String getId() {
        return id;
    }
    
    /**
     * Sets the value of {@link #id}.
     * @param id - value
     */
    public void setId(String id) {
        this.id = id;
    }
    
    /**
     * Gets the value of {@link #securityGroups}.
     * @return value of {@link #securityGroups}
     */
    public List getSecurityGroups() {
        return securityGroups;
    }

    /**
     * Sets the value of {@link #securityGroups}.
     * @param securityGroups - value
     */
    public void setSecurityGroups(List securityGroups) {
        this.securityGroups = securityGroups;
    }
    
    /**
     * Gets the value of {@link #deviceId}.
     * @return value of {@link #deviceId}
     */
    public String getDeviceId() {
        return deviceId;
    }
    
    /**
     * Sets the value of {@link #deviceId}.
     * @param deviceId - value
     */
    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
        return "Port [status=" + status + ", name=" + name + ", adminStateUp=" + adminStateUp + ", networkId=" + networkId + ", tenantId="
                + tenantId + ", bindingVifType=" + bindingVifType + ", deviceOwner=" + deviceOwner + ", bindingCapabilities="
                + bindingCapabilities + ", macAddress=" + macAddress + ", fixedIps=" + fixedIps + ", id=" + id + ", securityGroups="
                + securityGroups + ", deviceId=" + deviceId + "]";
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy