// Copyright 2012 Citrix Systems, Inc. Licensed under the
// Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. Citrix Systems, Inc.
// reserves all rights not expressly granted by 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.
//
// Automatically generated by addcopyright.py at 04/03/2012
package com.cloud.api.response;
import java.util.List;
import com.cloud.api.ApiConstants;
import com.cloud.utils.IdentityProxy;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused")
public class PhysicalNetworkResponse extends BaseResponse{
@SerializedName(ApiConstants.ID) @Param(description="the uuid of the physical network")
private String id;
@SerializedName(ApiConstants.NAME) @Param(description="name of the physical network")
private String name;
@SerializedName(ApiConstants.BROADCAST_DOMAIN_RANGE) @Param(description="Broadcast domain range of the physical network")
private String broadcastDomainRange;
@SerializedName(ApiConstants.ZONE_ID) @Param(description="zone id of the physical network")
private IdentityProxy zoneId = new IdentityProxy("data_center");
@SerializedName(ApiConstants.STATE) @Param(description="state of the physical network")
private String state;
@SerializedName(ApiConstants.VLAN) @Param(description="the vlan of the physical network")
private String vlan;
@SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain id of the physical network owner")
private IdentityProxy domainId = new IdentityProxy("domain");
@SerializedName(ApiConstants.TAGS) @Param(description="comma separated tag")
private String tags;
@SerializedName(ApiConstants.ISOLATION_METHODS) @Param(description="isolation methods")
private String isolationMethods;
@SerializedName(ApiConstants.NETWORK_SPEED) @Param(description="the speed of the physical network")
private String networkSpeed;
public void setId(String uuid) {
this.id = uuid;
}
public void setZoneId(Long zoneId) {
this.zoneId.setValue(zoneId);
}
public void setState(String state) {
this.state = state;
}
public void setDomainId(Long domainId) {
this.domainId.setValue(domainId);
}
public void setVlan(String vlan) {
this.vlan = vlan;
}
public void setTags(List<String> tags) {
if (tags == null || tags.size() == 0) {
return;
}
StringBuilder buf = new StringBuilder();
for (String tag : tags) {
buf.append(tag).append(",");
}
this.tags = buf.delete(buf.length()-1, buf.length()).toString();
}
public void setBroadcastDomainRange(String broadcastDomainRange) {
this.broadcastDomainRange = broadcastDomainRange;
}
public void setNetworkSpeed(String networkSpeed) {
this.networkSpeed = networkSpeed;
}
public void setIsolationMethods(List<String> isolationMethods) {
if (isolationMethods == null || isolationMethods.size() == 0) {
return;
}
StringBuilder buf = new StringBuilder();
for (String isolationMethod : isolationMethods) {
buf.append(isolationMethod).append(",");
}
this.isolationMethods = buf.delete(buf.length()-1, buf.length()).toString();
}
public void setName(String name) {
this.name = name;
}
}