com.softlayer.api.service.software.Component 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.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.Entity;
import com.softlayer.api.service.Hardware;
import com.softlayer.api.service.billing.Item;
import com.softlayer.api.service.software.Description;
import com.softlayer.api.service.software.License;
import com.softlayer.api.service.software.component.Password;
import com.softlayer.api.service.software.component.password.History;
import com.softlayer.api.service.virtual.Guest;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* A SoftLayer_Software_Component ties the installation of a specific piece of software onto a specific piece of hardware.
*
* SoftLayer_Software_Component works with SoftLayer_Software_License and SoftLayer_Software_Description to tie this all together.
*
* - SoftLayer_Software_Component is the installation of a specific piece of software onto a specific piece of hardware in accordance to a software license.
- SoftLayer_Software_License dictates when and how a specific piece of software may be installed onto a piece of hardware.
- SoftLayer_Software_Description describes a specific piece of software which can be installed onto hardware in accordance with it's license agreement.
*
* @see SoftLayer_Software_Component
*/
@ApiType("SoftLayer_Software_Component")
public class Component extends Entity {
/**
* The average amount of time that a software component takes to install.
*/
@ApiProperty
protected Long averageInstallationDuration;
public Long getAverageInstallationDuration() {
return averageInstallationDuration;
}
public void setAverageInstallationDuration(Long averageInstallationDuration) {
this.averageInstallationDuration = averageInstallationDuration;
}
/**
* The billing item for a software component.
*/
@ApiProperty
protected Item billingItem;
public Item getBillingItem() {
return billingItem;
}
public void setBillingItem(Item billingItem) {
this.billingItem = billingItem;
}
/**
* The hardware this Software Component is installed upon.
*/
@ApiProperty
protected Hardware hardware;
public Hardware getHardware() {
return hardware;
}
public void setHardware(Hardware hardware) {
this.hardware = hardware;
}
/**
* History Records for Software Passwords.
*/
@ApiProperty
protected List passwordHistory;
public List getPasswordHistory() {
if (passwordHistory == null) {
passwordHistory = new ArrayList();
}
return passwordHistory;
}
/**
* Username/Password pairs used for access to this Software Installation.
*/
@ApiProperty
protected List passwords;
public List getPasswords() {
if (passwords == null) {
passwords = new ArrayList();
}
return passwords;
}
/**
* The Software Description of this Software Component.
*/
@ApiProperty
protected Description softwareDescription;
public Description getSoftwareDescription() {
return softwareDescription;
}
public void setSoftwareDescription(Description softwareDescription) {
this.softwareDescription = softwareDescription;
}
/**
* The License this Software Component uses.
*/
@ApiProperty
protected License softwareLicense;
public License getSoftwareLicense() {
return softwareLicense;
}
public void setSoftwareLicense(License softwareLicense) {
this.softwareLicense = softwareLicense;
}
/**
* The virtual guest this software component is installed upon.
*/
@ApiProperty
protected Guest virtualGuest;
public Guest getVirtualGuest() {
return virtualGuest;
}
public void setVirtualGuest(Guest virtualGuest) {
this.virtualGuest = virtualGuest;
}
/**
* Hardware Identification Number for the server this Software Component is installed upon.
*/
@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;
}
/**
* An ID number identifying this Software Component (Software Installation)
*/
@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 manufacturer code that is needed to activate a license.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String manufacturerActivationCode;
public String getManufacturerActivationCode() {
return manufacturerActivationCode;
}
public void setManufacturerActivationCode(String manufacturerActivationCode) {
manufacturerActivationCodeSpecified = true;
this.manufacturerActivationCode = manufacturerActivationCode;
}
protected boolean manufacturerActivationCodeSpecified;
public boolean isManufacturerActivationCodeSpecified() {
return manufacturerActivationCodeSpecified;
}
public void unsetManufacturerActivationCode() {
manufacturerActivationCode = null;
manufacturerActivationCodeSpecified = false;
}
/**
* A license key for this specific installation of software, if it is needed.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String manufacturerLicenseInstance;
public String getManufacturerLicenseInstance() {
return manufacturerLicenseInstance;
}
public void setManufacturerLicenseInstance(String manufacturerLicenseInstance) {
manufacturerLicenseInstanceSpecified = true;
this.manufacturerLicenseInstance = manufacturerLicenseInstance;
}
protected boolean manufacturerLicenseInstanceSpecified;
public boolean isManufacturerLicenseInstanceSpecified() {
return manufacturerLicenseInstanceSpecified;
}
public void unsetManufacturerLicenseInstance() {
manufacturerLicenseInstance = null;
manufacturerLicenseInstanceSpecified = false;
}
/**
* A count of username/Password pairs used for access to this Software Installation.
*/
@ApiProperty
protected Long passwordCount;
public Long getPasswordCount() {
return passwordCount;
}
public void setPasswordCount(Long passwordCount) {
this.passwordCount = passwordCount;
}
/**
* A count of history Records for Software Passwords.
*/
@ApiProperty
protected Long passwordHistoryCount;
public Long getPasswordHistoryCount() {
return passwordHistoryCount;
}
public void setPasswordHistoryCount(Long passwordHistoryCount) {
this.passwordHistoryCount = passwordHistoryCount;
}
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());
}
/**
* Every installed piece of software is represented in the API as a "Software Component." This is the base class for software components, exposing basic functionality for software components. From any Software Component, through this service, you can get the hardware a component is installed upon, the license that this component is governed by, the current access passwords for a component, and the history of previous passwords for a component.
*
* @see SoftLayer_Software_Component
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Software_Component")
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 software component. If the software component does not support downloading license files an exception will be thrown.
*
* @see SoftLayer_Software_Component::getLicenseFile
*/
@ApiMethod(instanceRequired = true)
public String getLicenseFile();
/**
* getObject retrieves the SoftLayer_Software_Component object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Software_Component service.
*
* The best way to get software components is through getSoftwareComponents from the Hardware service.
*
* @see SoftLayer_Software_Component::getObject
*/
@ApiMethod(instanceRequired = true)
public Component getObject();
/**
* @see SoftLayer_Software_Component::getVendorSetUpConfiguration
*/
@ApiMethod(instanceRequired = true)
public String getVendorSetUpConfiguration();
/**
* The average amount of time that a software component takes to install.
*
* @see SoftLayer_Software_Component::getAverageInstallationDuration
*/
@ApiMethod(instanceRequired = true)
public Long getAverageInstallationDuration();
/**
* The billing item for a software component.
*
* @see SoftLayer_Software_Component::getBillingItem
*/
@ApiMethod(instanceRequired = true)
public Item getBillingItem();
/**
* The hardware this Software Component is installed upon.
*
* @see SoftLayer_Software_Component::getHardware
*/
@ApiMethod(instanceRequired = true)
public Hardware getHardware();
/**
* History Records for Software Passwords.
*
* @see SoftLayer_Software_Component::getPasswordHistory
*/
@ApiMethod(instanceRequired = true)
public List getPasswordHistory();
/**
* Username/Password pairs used for access to this Software Installation.
*
* @see SoftLayer_Software_Component::getPasswords
*/
@ApiMethod(instanceRequired = true)
public List getPasswords();
/**
* The Software Description of this Software Component.
*
* @see SoftLayer_Software_Component::getSoftwareDescription
*/
@ApiMethod(instanceRequired = true)
public Description getSoftwareDescription();
/**
* The License this Software Component uses.
*
* @see SoftLayer_Software_Component::getSoftwareLicense
*/
@ApiMethod(instanceRequired = true)
public License getSoftwareLicense();
/**
* The virtual guest this software component is installed upon.
*
* @see SoftLayer_Software_Component::getVirtualGuest
*/
@ApiMethod(instanceRequired = true)
public Guest getVirtualGuest();
}
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#getVendorSetUpConfiguration}
*/
public Future getVendorSetUpConfiguration();
public Future> getVendorSetUpConfiguration(ResponseHandler callback);
/**
* Async version of {@link Service#getAverageInstallationDuration}
*/
public Future getAverageInstallationDuration();
/**
* Async callback version of {@link Service#getAverageInstallationDuration}
*/
public Future> getAverageInstallationDuration(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#getHardware}
*/
public Future
getHardware();
/**
* Async callback version of {@link Service#getHardware}
*/
public Future> getHardware(ResponseHandler callback);
/**
* Async version of {@link Service#getPasswordHistory}
*/
public Future> getPasswordHistory();
/**
* Async callback version of {@link Service#getPasswordHistory}
*/
public Future> getPasswordHistory(ResponseHandler> callback);
/**
* Async version of {@link Service#getPasswords}
*/
public Future> getPasswords();
/**
* Async callback version of {@link Service#getPasswords}
*/
public Future> getPasswords(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#getSoftwareLicense}
*/
public Future getSoftwareLicense();
/**
* Async callback version of {@link Service#getSoftwareLicense}
*/
public Future> getSoftwareLicense(ResponseHandler callback);
/**
* Async version of {@link Service#getVirtualGuest}
*/
public Future getVirtualGuest();
/**
* Async callback version of {@link Service#getVirtualGuest}
*/
public Future> getVirtualGuest(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask averageInstallationDuration() {
withLocalProperty("averageInstallationDuration");
return this;
}
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.Mask hardware() {
return withSubMask("hardware", com.softlayer.api.service.Hardware.Mask.class);
}
public com.softlayer.api.service.software.component.password.History.Mask passwordHistory() {
return withSubMask("passwordHistory", com.softlayer.api.service.software.component.password.History.Mask.class);
}
public com.softlayer.api.service.software.component.Password.Mask passwords() {
return withSubMask("passwords", com.softlayer.api.service.software.component.Password.Mask.class);
}
public Description.Mask softwareDescription() {
return withSubMask("softwareDescription", Description.Mask.class);
}
public License.Mask softwareLicense() {
return withSubMask("softwareLicense", License.Mask.class);
}
public com.softlayer.api.service.virtual.Guest.Mask virtualGuest() {
return withSubMask("virtualGuest", com.softlayer.api.service.virtual.Guest.Mask.class);
}
public Mask hardwareId() {
withLocalProperty("hardwareId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask manufacturerActivationCode() {
withLocalProperty("manufacturerActivationCode");
return this;
}
public Mask manufacturerLicenseInstance() {
withLocalProperty("manufacturerLicenseInstance");
return this;
}
public Mask passwordCount() {
withLocalProperty("passwordCount");
return this;
}
public Mask passwordHistoryCount() {
withLocalProperty("passwordHistoryCount");
return this;
}
}
}