// 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.server.api.response;
import com.cloud.api.ApiConstants;
import com.cloud.utils.IdentityProxy;
import com.cloud.api.response.BaseResponse;
import com.cloud.api.response.ControlledEntityResponse;
import com.cloud.serializer.Param;
import com.google.gson.annotations.SerializedName;
@SuppressWarnings("unused")
public class UsageRecordResponse extends BaseResponse implements ControlledEntityResponse{
@SerializedName(ApiConstants.ACCOUNT) @Param(description="the user account name")
private String accountName;
@SerializedName(ApiConstants.ACCOUNT_ID) @Param(description="the user account Id")
private IdentityProxy accountId = new IdentityProxy("account");
@SerializedName(ApiConstants.PROJECT_ID) @Param(description="the project id of the resource")
private IdentityProxy projectId = new IdentityProxy("projects");
@SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the resource")
private String projectName;
@SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain ID")
private IdentityProxy domainId = new IdentityProxy("domain");
@SerializedName(ApiConstants.DOMAIN) @Param(description="the domain the resource is associated with")
private String domainName;
@SerializedName(ApiConstants.ZONE_ID) @Param(description="the zone ID")
private IdentityProxy zoneId = new IdentityProxy("data_center");
@SerializedName(ApiConstants.DESCRIPTION) @Param(description="description of the usage record")
private String description;
@SerializedName("usage") @Param(description="usage in hours")
private String usage;
@SerializedName("usagetype") @Param(description="usage type ID")
private Integer usageType;
@SerializedName("rawusage") @Param(description="raw usage in hours")
private String rawUsage;
@SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @Param(description="virtual machine ID")
private IdentityProxy virtualMachineId = new IdentityProxy("vm_instance");
@SerializedName(ApiConstants.NAME) @Param(description="virtual machine name")
private String vmName;
@SerializedName("offeringid") @Param(description="offering ID")
private String offeringId;
@SerializedName(ApiConstants.TEMPLATE_ID) @Param(description="template ID")
private IdentityProxy templateId = new IdentityProxy("vm_template");
@SerializedName("usageid") @Param(description="id of the resource")
private String usageId;
@SerializedName(ApiConstants.TYPE) @Param(description="resource type")
private String type;
@SerializedName(ApiConstants.SIZE) @Param(description="resource size")
private Long size;
@SerializedName(ApiConstants.START_DATE) @Param(description="start date of the usage record")
private String startDate;
@SerializedName(ApiConstants.END_DATE) @Param(description="end date of the usage record")
private String endDate;
@SerializedName("issourcenat") @Param(description="True if the IPAddress is source NAT")
private Boolean isSourceNat;
@SerializedName(ApiConstants.IS_SYSTEM) @Param(description="True if the IPAddress is system IP - allocated during vm deploy or lb rule create")
private Boolean isSystem;
@SerializedName("networkid") @Param(description="id of the network")
private String networkId;
@SerializedName("isdefault") @Param(description="True if the resource is default")
private Boolean isDefault;
@Override
public void setAccountName(String accountName) {
this.accountName = accountName;
}
public void setAccountId(Long accountId) {
this.accountId.setValue(accountId);
}
@Override
public void setDomainId(Long domainId) {
this.domainId.setValue(domainId);
}
public void setZoneId(Long zoneId) {
this.zoneId.setValue(zoneId);
}
public void setDescription(String description) {
this.description = description;
}
public void setUsage(String usage) {
this.usage = usage;
}
public void setUsageType(Integer usageType) {
this.usageType = usageType;
}
public void setRawUsage(String rawUsage) {
this.rawUsage = rawUsage;
}
public void setVirtualMachineId(Long virtualMachineId) {
this.virtualMachineId.setValue(virtualMachineId);
}
public void setVmName(String vmName) {
this.vmName = vmName;
}
public void setOfferingId(String offeringId) {
this.offeringId = offeringId;
}
public void setTemplateId(Long templateId) {
this.templateId.setValue(templateId);
}
public void setUsageId(String usageId) {
this.usageId = usageId;
}
public void setType(String type) {
this.type = type;
}
public void setSize(Long size) {
this.size = size;
}
public void setStartDate(String startDate) {
this.startDate = startDate;
}
public void setEndDate(String endDate) {
this.endDate = endDate;
}
public void setSourceNat(Boolean isSourceNat) {
this.isSourceNat = isSourceNat;
}
public void setSystem(Boolean isSystem) {
this.isSystem = isSystem;
}
@Override
public void setProjectId(Long projectId) {
this.projectId.setValue(projectId);
}
@Override
public void setProjectName(String projectName) {
this.projectName = projectName;
}
@Override
public void setDomainName(String domainName) {
this.domainName = domainName;
}
public void setNetworkId(String networkId) {
this.networkId = networkId;
}
public void setDefault(Boolean isDefault) {
this.isDefault = isDefault;
}
}