All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softlayer.api.service.hardware.component.partition.Template Maven / Gradle / Ivy

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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.hardware.component.partition.OperatingSystem;
import com.softlayer.api.service.hardware.component.partition.template.Partition;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Hardware_Component_Partition_Template data type contains general information relating to a single SoftLayer partition template.  Partition templates group 1 or more partition configurations that can be used to predefine how a hard drive's partitions will be configured. 
 *
 * @see SoftLayer_Hardware_Component_Partition_Template
 */
@ApiType("SoftLayer_Hardware_Component_Partition_Template")
public class Template extends Entity {

    /**
     * A partition template's associated [[SoftLayer_Account|Account]].
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    /**
     * An individual partition for a partition template. This is identical to 'partitionTemplatePartition' except this will sort unix partitions.
     */
    @ApiProperty
    protected List data;

    public List getData() {
        if (data == null) {
            data = new ArrayList();
        }
        return data;
    }

    @ApiProperty
    protected String expireDate;

    public String getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(String expireDate) {
        this.expireDate = expireDate;
    }

    /**
     * A partition template's associated [[SoftLayer_Hardware_Component_Partition_OperatingSystem|Operating System]].
     */
    @ApiProperty
    protected OperatingSystem partitionOperatingSystem;

    public OperatingSystem getPartitionOperatingSystem() {
        return partitionOperatingSystem;
    }

    public void setPartitionOperatingSystem(OperatingSystem partitionOperatingSystem) {
        this.partitionOperatingSystem = partitionOperatingSystem;
    }

    /**
     * An individual partition for a partition template.
     */
    @ApiProperty
    protected List partitionTemplatePartition;

    public List getPartitionTemplatePartition() {
        if (partitionTemplatePartition == null) {
            partitionTemplatePartition = new ArrayList();
        }
        return partitionTemplatePartition;
    }

    /**
     * A partition template's owner. The [[SoftLayer_Account|Account]] that a template was created by.
     */
    @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;
    }

    /**
     * A partition template'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;
    }

    /**
     * A partition template'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;
    }

    /**
     * A partition template's associated [[SoftLayer_Hardware_Component_Partition_OperatingSystem|Operating System]] Id.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long partitionOperatingSystemId;

    public Long getPartitionOperatingSystemId() {
        return partitionOperatingSystemId;
    }

    public void setPartitionOperatingSystemId(Long partitionOperatingSystemId) {
        partitionOperatingSystemIdSpecified = true;
        this.partitionOperatingSystemId = partitionOperatingSystemId;
    }

    protected boolean partitionOperatingSystemIdSpecified;

    public boolean isPartitionOperatingSystemIdSpecified() {
        return partitionOperatingSystemIdSpecified;
    }

    public void unsetPartitionOperatingSystemId() {
        partitionOperatingSystemId = null;
        partitionOperatingSystemIdSpecified = false;
    }

    /**
     * A partition template's status code. ACTIVE ,INACTIVE.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String statusCode;

    public String getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(String statusCode) {
        statusCodeSpecified = true;
        this.statusCode = statusCode;
    }

    protected boolean statusCodeSpecified;

    public boolean isStatusCodeSpecified() {
        return statusCodeSpecified;
    }

    public void unsetStatusCode() {
        statusCode = null;
        statusCodeSpecified = false;
    }

    /**
     * A partition template's Type. SYSTEM - template generated by softlayer.  CUSTOM - templates generated by SoftLayer customers.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String templateType;

    public String getTemplateType() {
        return templateType;
    }

    public void setTemplateType(String templateType) {
        templateTypeSpecified = true;
        this.templateType = templateType;
    }

    protected boolean templateTypeSpecified;

    public boolean isTemplateTypeSpecified() {
        return templateTypeSpecified;
    }

    public void unsetTemplateType() {
        templateType = null;
        templateTypeSpecified = false;
    }

    /**
     * A count of an individual partition for a partition template. This is identical to 'partitionTemplatePartition' except this will sort unix partitions.
     */
    @ApiProperty
    protected Long dataCount;

    public Long getDataCount() {
        return dataCount;
    }

    public void setDataCount(Long dataCount) {
        this.dataCount = dataCount;
    }

    /**
     * A count of an individual partition for a partition template.
     */
    @ApiProperty
    protected Long partitionTemplatePartitionCount;

    public Long getPartitionTemplatePartitionCount() {
        return partitionTemplatePartitionCount;
    }

    public void setPartitionTemplatePartitionCount(Long partitionTemplatePartitionCount) {
        this.partitionTemplatePartitionCount = partitionTemplatePartitionCount;
    }

    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 Partition Template is defined in the SoftLayer_Hardware_Component_Partition_Template service. The '''SoftLayer_Hardware_Component_Partition_Template''' service defines all SoftLayer Partition Templates that exist. SoftLayer Partition Templates group together several partitions that define a configuration of templates for a particular hard drive. 
     *
     * @see SoftLayer_Hardware_Component_Partition_Template
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Hardware_Component_Partition_Template")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * getObject retrieves the SoftLayer_Hardware_Component_Partition_Template object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Hardware_Component_Partition_Template service. You can only retrieve the partition templates that your account created or the templates predefined by SoftLayer. 
         *
         * @see SoftLayer_Hardware_Component_Partition_Template::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Template getObject();

        /**
         * A partition template's associated [[SoftLayer_Account|Account]].
         *
         * @see SoftLayer_Hardware_Component_Partition_Template::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * An individual partition for a partition template. This is identical to 'partitionTemplatePartition' except this will sort unix partitions.
         *
         * @see SoftLayer_Hardware_Component_Partition_Template::getData
         */
        @ApiMethod(instanceRequired = true)
        public List getData();

        /**
         * @see SoftLayer_Hardware_Component_Partition_Template::getExpireDate
         */
        @ApiMethod(instanceRequired = true)
        public String getExpireDate();

        /**
         * A partition template's associated [[SoftLayer_Hardware_Component_Partition_OperatingSystem|Operating System]].
         *
         * @see SoftLayer_Hardware_Component_Partition_Template::getPartitionOperatingSystem
         */
        @ApiMethod(instanceRequired = true)
        public OperatingSystem getPartitionOperatingSystem();

        /**
         * An individual partition for a partition template.
         *
         * @see SoftLayer_Hardware_Component_Partition_Template::getPartitionTemplatePartition
         */
        @ApiMethod(instanceRequired = true)
        public List getPartitionTemplatePartition();

    }

    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#getObject}
         */
        public Future