com.softlayer.api.service.virtual.Host Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
The newest version!
package com.softlayer.api.service.virtual;
import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.hardware.Server;
import com.softlayer.api.service.metric.tracking.Object;
import com.softlayer.api.service.virtual.Guest;
import com.softlayer.api.service.virtual.host.PciDevice;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* The virtual host represents the platform on which virtual guests reside. At times a virtual host has no allocations on the physical server, however with many modern platforms it is a virtual machine with small CPU and Memory allocations that runs in the Control Domain.
*
* @see SoftLayer_Virtual_Host
*/
@ApiType("SoftLayer_Virtual_Host")
public class Host extends Entity {
/**
* The account which a virtual host belongs to.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* Boolean flag indicating whether this virtualization platform gets billed per guest rather than at a fixed rate.
*/
@ApiProperty
protected Boolean billedPerGuestFlag;
public Boolean getBilledPerGuestFlag() {
return billedPerGuestFlag;
}
public void setBilledPerGuestFlag(Boolean billedPerGuestFlag) {
this.billedPerGuestFlag = billedPerGuestFlag;
}
/**
* Boolean flag indicating whether this virtualization platform gets billed per memory usage rather than at a fixed rate.
*/
@ApiProperty
protected Boolean billedPerMemoryUsageFlag;
public Boolean getBilledPerMemoryUsageFlag() {
return billedPerMemoryUsageFlag;
}
public void setBilledPerMemoryUsageFlag(Boolean billedPerMemoryUsageFlag) {
this.billedPerMemoryUsageFlag = billedPerMemoryUsageFlag;
}
/**
* The guests associated with a virtual host.
*/
@ApiProperty
protected List guests;
public List getGuests() {
if (guests == null) {
guests = new ArrayList();
}
return guests;
}
/**
* The hardware record which a virtual host resides on.
*/
@ApiProperty
protected Server hardware;
public Server getHardware() {
return hardware;
}
public void setHardware(Server hardware) {
this.hardware = hardware;
}
/**
* The metric tracking object for this virtual host.
*/
@ApiProperty
protected Object metricTrackingObject;
public Object getMetricTrackingObject() {
return metricTrackingObject;
}
public void setMetricTrackingObject(Object metricTrackingObject) {
this.metricTrackingObject = metricTrackingObject;
}
@ApiProperty
protected List pciDevices;
public List getPciDevices() {
if (pciDevices == null) {
pciDevices = new ArrayList();
}
return pciDevices;
}
/**
* A virtual host's associated account id
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long accountId;
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
accountIdSpecified = true;
this.accountId = accountId;
}
protected boolean accountIdSpecified;
public boolean isAccountIdSpecified() {
return accountIdSpecified;
}
public void unsetAccountId() {
accountId = null;
accountIdSpecified = false;
}
/**
* The date a virtual host was created.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar createDate;
public GregorianCalendar getCreateDate() {
return createDate;
}
public void setCreateDate(GregorianCalendar createDate) {
createDateSpecified = true;
this.createDate = createDate;
}
protected boolean createDateSpecified;
public boolean isCreateDateSpecified() {
return createDateSpecified;
}
public void unsetCreateDate() {
createDate = null;
createDateSpecified = false;
}
/**
* A virtual host's description.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String description;
public String getDescription() {
return description;
}
public void setDescription(String description) {
descriptionSpecified = true;
this.description = description;
}
protected boolean descriptionSpecified;
public boolean isDescriptionSpecified() {
return descriptionSpecified;
}
public void unsetDescription() {
description = null;
descriptionSpecified = false;
}
/**
* The enabled flag specifies whether a virtual host can run guests.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long enabledFlag;
public Long getEnabledFlag() {
return enabledFlag;
}
public void setEnabledFlag(Long enabledFlag) {
enabledFlagSpecified = true;
this.enabledFlag = enabledFlag;
}
protected boolean enabledFlagSpecified;
public boolean isEnabledFlagSpecified() {
return enabledFlagSpecified;
}
public void unsetEnabledFlag() {
enabledFlag = null;
enabledFlagSpecified = false;
}
/**
* A hardware device which a virtual host resides.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long hardwareId;
public Long getHardwareId() {
return hardwareId;
}
public void setHardwareId(Long hardwareId) {
hardwareIdSpecified = true;
this.hardwareId = hardwareId;
}
protected boolean hardwareIdSpecified;
public boolean isHardwareIdSpecified() {
return hardwareIdSpecified;
}
public void unsetHardwareId() {
hardwareId = null;
hardwareIdSpecified = false;
}
/**
* Unique ID for a virtual host.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
idSpecified = true;
this.id = id;
}
protected boolean idSpecified;
public boolean isIdSpecified() {
return idSpecified;
}
public void unsetId() {
id = null;
idSpecified = false;
}
/**
* The date a virtual host was last modified.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar modifyDate;
public GregorianCalendar getModifyDate() {
return modifyDate;
}
public void setModifyDate(GregorianCalendar modifyDate) {
modifyDateSpecified = true;
this.modifyDate = modifyDate;
}
protected boolean modifyDateSpecified;
public boolean isModifyDateSpecified() {
return modifyDateSpecified;
}
public void unsetModifyDate() {
modifyDate = null;
modifyDateSpecified = false;
}
/**
* A virtual host's name.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String name;
public String getName() {
return name;
}
public void setName(String name) {
nameSpecified = true;
this.name = name;
}
protected boolean nameSpecified;
public boolean isNameSpecified() {
return nameSpecified;
}
public void unsetName() {
name = null;
nameSpecified = false;
}
/**
* The amount of memory physically available for a virtual host.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long physicalMemoryCapacity;
public Long getPhysicalMemoryCapacity() {
return physicalMemoryCapacity;
}
public void setPhysicalMemoryCapacity(Long physicalMemoryCapacity) {
physicalMemoryCapacitySpecified = true;
this.physicalMemoryCapacity = physicalMemoryCapacity;
}
protected boolean physicalMemoryCapacitySpecified;
public boolean isPhysicalMemoryCapacitySpecified() {
return physicalMemoryCapacitySpecified;
}
public void unsetPhysicalMemoryCapacity() {
physicalMemoryCapacity = null;
physicalMemoryCapacitySpecified = false;
}
/**
* Unique ID for a virtual host's record on a virtualization platform.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String uuid;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
uuidSpecified = true;
this.uuid = uuid;
}
protected boolean uuidSpecified;
public boolean isUuidSpecified() {
return uuidSpecified;
}
public void unsetUuid() {
uuid = null;
uuidSpecified = false;
}
/**
* A count of the guests associated with a virtual host.
*/
@ApiProperty
protected Long guestCount;
public Long getGuestCount() {
return guestCount;
}
public void setGuestCount(Long guestCount) {
this.guestCount = guestCount;
}
/**
* A count of
*/
@ApiProperty
protected Long pciDeviceCount;
public Long getPciDeviceCount() {
return pciDeviceCount;
}
public void setPciDeviceCount(Long pciDeviceCount) {
this.pciDeviceCount = pciDeviceCount;
}
public Service asService(ApiClient client) {
return service(client, id);
}
public static Service service(ApiClient client) {
return client.createService(Service.class, null);
}
public static Service service(ApiClient client, Long id) {
return client.createService(Service.class, id == null ? null : id.toString());
}
/**
* The virtual host service provides a common interface to any virtualization platform supported by SoftLayer. Interaction with various third party APIs is not needed when implementing this service to administer your hosts.
*
* @see SoftLayer_Virtual_Host
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Virtual_Host")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Query a virtualization platform directly to retrieve details regarding a guest.
*
* @see SoftLayer_Virtual_Host::getLiveGuestByUuid
*/
@ApiMethod(instanceRequired = true)
public Guest getLiveGuestByUuid(String uuid);
/**
* Query a virtualization platform directly to retrieve a list of known guests.
*
* @see SoftLayer_Virtual_Host::getLiveGuestList
*/
@ApiMethod(instanceRequired = true)
public List getLiveGuestList();
/**
* Query a virtualization platform directly to retrieve recent metric data for a guest.
*
* @see SoftLayer_Virtual_Host::getLiveGuestRecentMetricData
*/
@ApiMethod(instanceRequired = true)
public List