com.softlayer.api.service.software.VirtualLicense 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
package com.softlayer.api.service.software;
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.billing.Item;
import com.softlayer.api.service.hardware.Server;
import com.softlayer.api.service.network.Subnet;
import com.softlayer.api.service.network.subnet.IpAddress;
import com.softlayer.api.service.software.Description;
import java.util.concurrent.Future;
/**
* SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed".
*
* @see SoftLayer_Software_VirtualLicense
*/
@ApiType("SoftLayer_Software_VirtualLicense")
public class VirtualLicense extends Entity {
/**
* The customer account this Virtual License belongs to.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The billing item for a software virtual license.
*/
@ApiProperty
protected Item billingItem;
public Item getBillingItem() {
return billingItem;
}
public void setBillingItem(Item billingItem) {
this.billingItem = billingItem;
}
/**
* The hardware record to which the software virtual license is assigned.
*/
@ApiProperty
protected Server hostHardware;
public Server getHostHardware() {
return hostHardware;
}
public void setHostHardware(Server hostHardware) {
this.hostHardware = hostHardware;
}
/**
* The IP Address record associated with a virtual license.
*/
@ApiProperty
protected IpAddress ipAddressRecord;
public IpAddress getIpAddressRecord() {
return ipAddressRecord;
}
public void setIpAddressRecord(IpAddress ipAddressRecord) {
this.ipAddressRecord = ipAddressRecord;
}
/**
* The SoftLayer_Software_Description that this virtual license is for.
*/
@ApiProperty
protected Description softwareDescription;
public Description getSoftwareDescription() {
return softwareDescription;
}
public void setSoftwareDescription(Description softwareDescription) {
this.softwareDescription = softwareDescription;
}
/**
* The subnet this Virtual License's IP address belongs to.
*/
@ApiProperty
protected Subnet subnet;
public Subnet getSubnet() {
return subnet;
}
public void setSubnet(Subnet subnet) {
this.subnet = subnet;
}
/**
* The ID of the SoftLayer Account to which this Virtual License belongs to.
*/
@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 ID of the SoftLayer Hardware Server record to which this Virtual License belongs.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long hostHardwareId;
public Long getHostHardwareId() {
return hostHardwareId;
}
public void setHostHardwareId(Long hostHardwareId) {
hostHardwareIdSpecified = true;
this.hostHardwareId = hostHardwareId;
}
protected boolean hostHardwareIdSpecified;
public boolean isHostHardwareIdSpecified() {
return hostHardwareIdSpecified;
}
public void unsetHostHardwareId() {
hostHardwareId = null;
hostHardwareIdSpecified = false;
}
/**
* An ID number for this Virtual License instance.
*/
@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 specific IP address this Virtual License belongs to.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String ipAddress;
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
ipAddressSpecified = true;
this.ipAddress = ipAddress;
}
protected boolean ipAddressSpecified;
public boolean isIpAddressSpecified() {
return ipAddressSpecified;
}
public void unsetIpAddress() {
ipAddress = null;
ipAddressSpecified = false;
}
/**
* The License Key for this specific Virtual License.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String key;
public String getKey() {
return key;
}
public void setKey(String key) {
keySpecified = true;
this.key = key;
}
protected boolean keySpecified;
public boolean isKeySpecified() {
return keySpecified;
}
public void unsetKey() {
key = null;
keySpecified = false;
}
/**
* A "notes" string attached to this specific Virtual License.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String notes;
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
notesSpecified = true;
this.notes = notes;
}
protected boolean notesSpecified;
public boolean isNotesSpecified() {
return notesSpecified;
}
public void unsetNotes() {
notes = null;
notesSpecified = false;
}
/**
* The Software Description ID this Virtual License is for.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long softwareDescriptionId;
public Long getSoftwareDescriptionId() {
return softwareDescriptionId;
}
public void setSoftwareDescriptionId(Long softwareDescriptionId) {
softwareDescriptionIdSpecified = true;
this.softwareDescriptionId = softwareDescriptionId;
}
protected boolean softwareDescriptionIdSpecified;
public boolean isSoftwareDescriptionIdSpecified() {
return softwareDescriptionIdSpecified;
}
public void unsetSoftwareDescriptionId() {
softwareDescriptionId = null;
softwareDescriptionIdSpecified = false;
}
/**
* The ID of the SoftLayer Network Subnet this Virtual License belongs to.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long subnetId;
public Long getSubnetId() {
return subnetId;
}
public void setSubnetId(Long subnetId) {
subnetIdSpecified = true;
this.subnetId = subnetId;
}
protected boolean subnetIdSpecified;
public boolean isSubnetIdSpecified() {
return subnetIdSpecified;
}
public void unsetSubnetId() {
subnetId = null;
subnetIdSpecified = false;
}
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());
}
/**
* SoftLayer_Software_VirtualLicense is the application class that handles a special type of Software License. Most software licenses are licensed to a specific hardware ID; virtual licenses are designed for virtual machines and therefore are assigned to an IP Address. Not all software packages can be "virtual licensed".
*
* SoftLayer_Software_VirtualLicense's service allows you to retrieve the hard-copy license file for a virtual license, if one exists for your license instance.
*
* You can also retrieve the subnet that the IP to which a software virtual license is licensed upon exists in, as well as the software description that this virtual license is for.
*
* @see SoftLayer_Software_VirtualLicense
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Software_VirtualLicense")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Attempt to retrieve the file associated with a virtual license, if such a file exists. If there is no file for this virtual license, calling this method will either throw an exception or return false.
*
* @see SoftLayer_Software_VirtualLicense::getLicenseFile
*/
@ApiMethod(instanceRequired = true)
public byte[] getLicenseFile();
/**
* getObject retrieves the SoftLayer_Software_VirtualLicense object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Software_VirtualLicense service. You can only retrieve Virtual Licenses assigned to your account number.
*
* @see SoftLayer_Software_VirtualLicense::getObject
*/
@ApiMethod(instanceRequired = true)
public VirtualLicense getObject();
/**
* The customer account this Virtual License belongs to.
*
* @see SoftLayer_Software_VirtualLicense::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The billing item for a software virtual license.
*
* @see SoftLayer_Software_VirtualLicense::getBillingItem
*/
@ApiMethod(instanceRequired = true)
public Item getBillingItem();
/**
* The hardware record to which the software virtual license is assigned.
*
* @see SoftLayer_Software_VirtualLicense::getHostHardware
*/
@ApiMethod(instanceRequired = true)
public Server getHostHardware();
/**
* The IP Address record associated with a virtual license.
*
* @see SoftLayer_Software_VirtualLicense::getIpAddressRecord
*/
@ApiMethod(instanceRequired = true)
public IpAddress getIpAddressRecord();
/**
* The SoftLayer_Software_Description that this virtual license is for.
*
* @see SoftLayer_Software_VirtualLicense::getSoftwareDescription
*/
@ApiMethod(instanceRequired = true)
public Description getSoftwareDescription();
/**
* The subnet this Virtual License's IP address belongs to.
*
* @see SoftLayer_Software_VirtualLicense::getSubnet
*/
@ApiMethod(instanceRequired = true)
public Subnet getSubnet();
}
public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#getLicenseFile}
*/
public Future getLicenseFile();
public Future> getLicenseFile(ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAccount}
*/
public Future getAccount();
/**
* Async callback version of {@link Service#getAccount}
*/
public Future> getAccount(ResponseHandler callback);
/**
* Async version of {@link Service#getBillingItem}
*/
public Future- getBillingItem();
/**
* Async callback version of {@link Service#getBillingItem}
*/
public Future> getBillingItem(ResponseHandler
- callback);
/**
* Async version of {@link Service#getHostHardware}
*/
public Future
getHostHardware();
/**
* Async callback version of {@link Service#getHostHardware}
*/
public Future> getHostHardware(ResponseHandler callback);
/**
* Async version of {@link Service#getIpAddressRecord}
*/
public Future getIpAddressRecord();
/**
* Async callback version of {@link Service#getIpAddressRecord}
*/
public Future> getIpAddressRecord(ResponseHandler callback);
/**
* Async version of {@link Service#getSoftwareDescription}
*/
public Future getSoftwareDescription();
/**
* Async callback version of {@link Service#getSoftwareDescription}
*/
public Future> getSoftwareDescription(ResponseHandler callback);
/**
* Async version of {@link Service#getSubnet}
*/
public Future getSubnet();
/**
* Async callback version of {@link Service#getSubnet}
*/
public Future> getSubnet(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.Account.Mask account() {
return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
}
public com.softlayer.api.service.billing.Item.Mask billingItem() {
return withSubMask("billingItem", com.softlayer.api.service.billing.Item.Mask.class);
}
public com.softlayer.api.service.hardware.Server.Mask hostHardware() {
return withSubMask("hostHardware", com.softlayer.api.service.hardware.Server.Mask.class);
}
public com.softlayer.api.service.network.subnet.IpAddress.Mask ipAddressRecord() {
return withSubMask("ipAddressRecord", com.softlayer.api.service.network.subnet.IpAddress.Mask.class);
}
public Description.Mask softwareDescription() {
return withSubMask("softwareDescription", Description.Mask.class);
}
public com.softlayer.api.service.network.Subnet.Mask subnet() {
return withSubMask("subnet", com.softlayer.api.service.network.Subnet.Mask.class);
}
public Mask accountId() {
withLocalProperty("accountId");
return this;
}
public Mask hostHardwareId() {
withLocalProperty("hostHardwareId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask ipAddress() {
withLocalProperty("ipAddress");
return this;
}
public Mask key() {
withLocalProperty("key");
return this;
}
public Mask notes() {
withLocalProperty("notes");
return this;
}
public Mask softwareDescriptionId() {
withLocalProperty("softwareDescriptionId");
return this;
}
public Mask subnetId() {
withLocalProperty("subnetId");
return this;
}
}
}