blob: 8404ea039ad8b9a7a8b5717d9bc97e791405285b [file] [log] [blame]
/*
* Copyright 2016 Open Networking Laboratory
*
* 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.onosproject.openstackrouting;
/**
* An Openstack Neutron Router Interface Model.
*/
public final class OpenstackRouterInterface {
private String id;
private String tenantId;
private String subnetId;
private String portId;
private OpenstackRouterInterface(String id, String tenantId,
String subnetId, String portId) {
this.id = id;
this.tenantId = tenantId;
this.subnetId = subnetId;
this.portId = portId;
}
/**
* Returns Router Interface ID.
*
* @return router interface ID
*/
public String id() {
return id;
}
/**
* Returns tenant ID.
*
* @return tenant ID
*/
public String tenantId() {
return tenantId;
}
/**
* Returns subnet ID.
*
* @return subnet ID
*/
public String subnetId() {
return subnetId;
}
/**
* Returns port ID.
*
* @return port ID
*/
public String portId() {
return portId;
}
/**
* An Openstack Router Interface Builder class.
*/
public static final class Builder {
private String id;
private String tenantId;
private String subnetId;
private String portId;
/**
* Sets Router Interface ID.
*
* @param id router interface ID
* @return Builder object
*/
public Builder id(String id) {
this.id = id;
return this;
}
/**
* Sets tenant ID.
*
* @param tenantId tenant ID
* @return Builder object
*/
public Builder tenantId(String tenantId) {
this.tenantId = tenantId;
return this;
}
/**
* Sets subnet ID.
*
* @param subnetId subnet ID
* @return Builder object
*/
public Builder subnetId(String subnetId) {
this.subnetId = subnetId;
return this;
}
/**
* Sets port ID.
*
* @param portId port ID
* @return Builder object
*/
public Builder portId(String portId) {
this.portId = portId;
return this;
}
/**
* Builds an Openstack Router Interface object.
*
* @return OpenstackRouterInterface object
*/
public OpenstackRouterInterface build() {
return new OpenstackRouterInterface(id, tenantId, subnetId, portId);
}
}
}