com.softlayer.api.service.hardware.component.partition.OperatingSystem 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.hardware.component.partition;
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.component.partition.Template;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Hardware_Component_Partition_OperatingSystem data type contains general information relating to a single SoftLayer Operating System Partition Template.
*
* @see SoftLayer_Hardware_Component_Partition_OperatingSystem
*/
@ApiType("SoftLayer_Hardware_Component_Partition_OperatingSystem")
public class OperatingSystem extends Entity {
/**
* Information regarding an operating system's [[SoftLayer_Hardware_Component_Partition_Template|Partition Templates]].
*/
@ApiProperty
protected List partitionTemplates;
public List getPartitionTemplates() {
if (partitionTemplates == null) {
partitionTemplates = new ArrayList();
}
return partitionTemplates;
}
/**
* A partition template operating system's description. Typically the title of the Operating System.
*/
@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;
}
/**
* A partition template operating system's id.
*/
@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;
}
/**
* Information about the kinds of partition templates assigned to this operating system.
*/
@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;
}
/**
* A count of information regarding an operating system's [[SoftLayer_Hardware_Component_Partition_Template|Partition Templates]].
*/
@ApiProperty
protected Long partitionTemplateCount;
public Long getPartitionTemplateCount() {
return partitionTemplateCount;
}
public void setPartitionTemplateCount(Long partitionTemplateCount) {
this.partitionTemplateCount = partitionTemplateCount;
}
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 SoftLayer Operating System Partition Template is defined in the '''SoftLayer_Hardware_Component_Partition_OperatingSystem''' service. SoftLayer Operating System Partition Templates indicate which operating system a partition template may be used with to configure a hard drive.
*
* @see SoftLayer_Hardware_Component_Partition_OperatingSystem
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Hardware_Component_Partition_OperatingSystem")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* @see SoftLayer_Hardware_Component_Partition_OperatingSystem::getAllObjects
*/
@ApiMethod
public List getAllObjects();
/**
* The '''getByDescription''' method retrieves all possible partition templates based on the description (required parameter) entered when calling the method. The description is typically the operating system's name. Current recognized values include 'linux', 'windows', 'freebsd', and 'Debian'.
*
* @see SoftLayer_Hardware_Component_Partition_OperatingSystem::getByDescription
*/
@ApiMethod
public OperatingSystem getByDescription(String description);
/**
* getObject retrieves the SoftLayer_Hardware_Component_Partition_OperatingSystem object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Hardware_Component_Partition_OperatingSystem service.s
*
* @see SoftLayer_Hardware_Component_Partition_OperatingSystem::getObject
*/
@ApiMethod(instanceRequired = true)
public OperatingSystem getObject();
/**
* Information regarding an operating system's [[SoftLayer_Hardware_Component_Partition_Template|Partition Templates]].
*
* @see SoftLayer_Hardware_Component_Partition_OperatingSystem::getPartitionTemplates
*/
@ApiMethod(instanceRequired = true)
public List getPartitionTemplates();
}
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#getAllObjects}
*/
public Future> getAllObjects();
public Future> getAllObjects(ResponseHandler> callback);
/**
* Async version of {@link Service#getByDescription}
*/
public Future getByDescription(String description);
public Future> getByDescription(String description, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getPartitionTemplates}
*/
public Future> getPartitionTemplates();
/**
* Async callback version of {@link Service#getPartitionTemplates}
*/
public Future> getPartitionTemplates(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Template.Mask partitionTemplates() {
return withSubMask("partitionTemplates", Template.Mask.class);
}
public Mask description() {
withLocalProperty("description");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask notes() {
withLocalProperty("notes");
return this;
}
public Mask partitionTemplateCount() {
withLocalProperty("partitionTemplateCount");
return this;
}
}
}