com.softlayer.api.service.product.pkg.Preset 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.product.pkg;
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.configuration.storage.group.template.Group;
import com.softlayer.api.service.product.Package;
import com.softlayer.api.service.product.item.Category;
import com.softlayer.api.service.product.item.Price;
import com.softlayer.api.service.product.pkg.order.Configuration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* Package presets are used to simplify ordering by eliminating the need for price ids when submitting orders.
*
* Orders submitted without prices or a preset id defined will use the “DEFAULT” preset for the package id. The default package presets include the base options required for a package configuration.
*
* Orders submitted with a preset id defined will use the prices included in the package preset. Prices submitted on an order with a preset id will replace the prices included in the package preset for that prices category. If the package preset has a fixed configuration flag (fixedConfigurationFlag) set then the prices included in the preset configuration cannot be replaced by prices submitted on the order. The only exception to the fixed configuration flag would be if a price submitted on the order is an account-restricted price for the same product item.
*
* @see SoftLayer_Product_Package_Preset
*/
@ApiType("SoftLayer_Product_Package_Preset")
public class Preset extends Entity {
@ApiProperty
protected Long availableStorageUnits;
public Long getAvailableStorageUnits() {
return availableStorageUnits;
}
public void setAvailableStorageUnits(Long availableStorageUnits) {
this.availableStorageUnits = availableStorageUnits;
}
/**
* The item categories that are included in this package preset configuration.
*/
@ApiProperty
protected List categories;
public List getCategories() {
if (categories == null) {
categories = new ArrayList();
}
return categories;
}
/**
* The preset configuration (category and price).
*/
@ApiProperty
protected List configuration;
public List getConfiguration() {
if (configuration == null) {
configuration = new ArrayList();
}
return configuration;
}
/**
* A package preset with this flag set will not allow the price's defined in the preset configuration to be overriden during order placement.
*/
@ApiProperty
protected Boolean fixedConfigurationFlag;
public Boolean getFixedConfigurationFlag() {
return fixedConfigurationFlag;
}
public void setFixedConfigurationFlag(Boolean fixedConfigurationFlag) {
this.fixedConfigurationFlag = fixedConfigurationFlag;
}
/**
* The lowest server prices related to this package preset.
*/
@ApiProperty
protected Price lowestPresetServerPrice;
public Price getLowestPresetServerPrice() {
return lowestPresetServerPrice;
}
public void setLowestPresetServerPrice(Price lowestPresetServerPrice) {
this.lowestPresetServerPrice = lowestPresetServerPrice;
}
/**
* The package this preset belongs to.
*/
@ApiProperty("package")
protected Package presetPackage;
public Package getPresetPackage() {
return presetPackage;
}
public void setPresetPackage(Package presetPackage) {
this.presetPackage = presetPackage;
}
/**
* The item categories associated with a package preset, including information detailing which item categories are required as part of a SoftLayer product order.
*/
@ApiProperty
protected List packageConfiguration;
public List getPackageConfiguration() {
if (packageConfiguration == null) {
packageConfiguration = new ArrayList();
}
return packageConfiguration;
}
/**
* The item prices that are included in this package preset configuration.
*/
@ApiProperty
protected List prices;
public List getPrices() {
if (prices == null) {
prices = new ArrayList();
}
return prices;
}
/**
* Describes how all disks in this preset will be configured.
*/
@ApiProperty
protected List storageGroupTemplateArrays;
public List getStorageGroupTemplateArrays() {
if (storageGroupTemplateArrays == null) {
storageGroupTemplateArrays = new ArrayList();
}
return storageGroupTemplateArrays;
}
/**
* A description of the package preset.
*/
@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 preset's internal identifier. Everything regarding a SoftLayer_Product_Package_Preset is tied back to this 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;
}
/**
* The status of the package preset.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String isActive;
public String getIsActive() {
return isActive;
}
public void setIsActive(String isActive) {
isActiveSpecified = true;
this.isActive = isActive;
}
protected boolean isActiveSpecified;
public boolean isIsActiveSpecified() {
return isActiveSpecified;
}
public void unsetIsActive() {
isActive = null;
isActiveSpecified = false;
}
/**
* The key name of the package preset. For the base configuration of a package the preset key name is "DEFAULT".
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String keyName;
public String getKeyName() {
return keyName;
}
public void setKeyName(String keyName) {
keyNameSpecified = true;
this.keyName = keyName;
}
protected boolean keyNameSpecified;
public boolean isKeyNameSpecified() {
return keyNameSpecified;
}
public void unsetKeyName() {
keyName = null;
keyNameSpecified = false;
}
/**
* The name of the package preset.
*/
@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 package id for the package this preset belongs to.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long packageId;
public Long getPackageId() {
return packageId;
}
public void setPackageId(Long packageId) {
packageIdSpecified = true;
this.packageId = packageId;
}
protected boolean packageIdSpecified;
public boolean isPackageIdSpecified() {
return packageIdSpecified;
}
public void unsetPackageId() {
packageId = null;
packageIdSpecified = false;
}
/**
* A count of the item categories that are included in this package preset configuration.
*/
@ApiProperty
protected Long categoryCount;
public Long getCategoryCount() {
return categoryCount;
}
public void setCategoryCount(Long categoryCount) {
this.categoryCount = categoryCount;
}
/**
* A count of the preset configuration (category and price).
*/
@ApiProperty
protected Long configurationCount;
public Long getConfigurationCount() {
return configurationCount;
}
public void setConfigurationCount(Long configurationCount) {
this.configurationCount = configurationCount;
}
/**
* A count of the item categories associated with a package preset, including information detailing which item categories are required as part of a SoftLayer product order.
*/
@ApiProperty
protected Long packageConfigurationCount;
public Long getPackageConfigurationCount() {
return packageConfigurationCount;
}
public void setPackageConfigurationCount(Long packageConfigurationCount) {
this.packageConfigurationCount = packageConfigurationCount;
}
/**
* A count of the item prices that are included in this package preset configuration.
*/
@ApiProperty
protected Long priceCount;
public Long getPriceCount() {
return priceCount;
}
public void setPriceCount(Long priceCount) {
this.priceCount = priceCount;
}
/**
* A count of describes how all disks in this preset will be configured.
*/
@ApiProperty
protected Long storageGroupTemplateArrayCount;
public Long getStorageGroupTemplateArrayCount() {
return storageGroupTemplateArrayCount;
}
public void setStorageGroupTemplateArrayCount(Long storageGroupTemplateArrayCount) {
this.storageGroupTemplateArrayCount = storageGroupTemplateArrayCount;
}
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());
}
/**
* @see SoftLayer_Product_Package_Preset
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Product_Package_Preset")
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_Product_Package_Preset::getObject
*/
@ApiMethod(instanceRequired = true)
public Preset getObject();
/**
* @see SoftLayer_Product_Package_Preset::getAvailableStorageUnits
*/
@ApiMethod(instanceRequired = true)
public Long getAvailableStorageUnits();
/**
* The item categories that are included in this package preset configuration.
*
* @see SoftLayer_Product_Package_Preset::getCategories
*/
@ApiMethod(instanceRequired = true)
public List getCategories();
/**
* The preset configuration (category and price).
*
* @see SoftLayer_Product_Package_Preset::getConfiguration
*/
@ApiMethod(instanceRequired = true)
public List getConfiguration();
/**
* A package preset with this flag set will not allow the price's defined in the preset configuration to be overriden during order placement.
*
* @see SoftLayer_Product_Package_Preset::getFixedConfigurationFlag
*/
@ApiMethod(instanceRequired = true)
public Boolean getFixedConfigurationFlag();
/**
* The lowest server prices related to this package preset.
*
* @see SoftLayer_Product_Package_Preset::getLowestPresetServerPrice
*/
@ApiMethod(instanceRequired = true)
public Price getLowestPresetServerPrice();
/**
* The package this preset belongs to.
*
* @see SoftLayer_Product_Package_Preset::getPresetPackage
*/
@ApiMethod(instanceRequired = true)
public Package getPresetPackage();
/**
* The item categories associated with a package preset, including information detailing which item categories are required as part of a SoftLayer product order.
*
* @see SoftLayer_Product_Package_Preset::getPackageConfiguration
*/
@ApiMethod(instanceRequired = true)
public List getPackageConfiguration();
/**
* The item prices that are included in this package preset configuration.
*
* @see SoftLayer_Product_Package_Preset::getPrices
*/
@ApiMethod(instanceRequired = true)
public List getPrices();
/**
* Describes how all disks in this preset will be configured.
*
* @see SoftLayer_Product_Package_Preset::getStorageGroupTemplateArrays
*/
@ApiMethod(instanceRequired = true)
public List getStorageGroupTemplateArrays();
}
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 getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAvailableStorageUnits}
*/
public Future getAvailableStorageUnits();
/**
* Async callback version of {@link Service#getAvailableStorageUnits}
*/
public Future> getAvailableStorageUnits(ResponseHandler callback);
/**
* Async version of {@link Service#getCategories}
*/
public Future> getCategories();
/**
* Async callback version of {@link Service#getCategories}
*/
public Future> getCategories(ResponseHandler> callback);
/**
* Async version of {@link Service#getConfiguration}
*/
public Future> getConfiguration();
/**
* Async callback version of {@link Service#getConfiguration}
*/
public Future> getConfiguration(ResponseHandler> callback);
/**
* Async version of {@link Service#getFixedConfigurationFlag}
*/
public Future getFixedConfigurationFlag();
/**
* Async callback version of {@link Service#getFixedConfigurationFlag}
*/
public Future> getFixedConfigurationFlag(ResponseHandler callback);
/**
* Async version of {@link Service#getLowestPresetServerPrice}
*/
public Future getLowestPresetServerPrice();
/**
* Async callback version of {@link Service#getLowestPresetServerPrice}
*/
public Future> getLowestPresetServerPrice(ResponseHandler callback);
/**
* Async version of {@link Service#getPresetPackage}
*/
public Future getPresetPackage();
/**
* Async callback version of {@link Service#getPresetPackage}
*/
public Future> getPresetPackage(ResponseHandler callback);
/**
* Async version of {@link Service#getPackageConfiguration}
*/
public Future> getPackageConfiguration();
/**
* Async callback version of {@link Service#getPackageConfiguration}
*/
public Future> getPackageConfiguration(ResponseHandler> callback);
/**
* Async version of {@link Service#getPrices}
*/
public Future> getPrices();
/**
* Async callback version of {@link Service#getPrices}
*/
public Future> getPrices(ResponseHandler> callback);
/**
* Async version of {@link Service#getStorageGroupTemplateArrays}
*/
public Future> getStorageGroupTemplateArrays();
/**
* Async callback version of {@link Service#getStorageGroupTemplateArrays}
*/
public Future> getStorageGroupTemplateArrays(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask availableStorageUnits() {
withLocalProperty("availableStorageUnits");
return this;
}
public com.softlayer.api.service.product.item.Category.Mask categories() {
return withSubMask("categories", com.softlayer.api.service.product.item.Category.Mask.class);
}
public com.softlayer.api.service.product.pkg.preset.Configuration.Mask configuration() {
return withSubMask("configuration", com.softlayer.api.service.product.pkg.preset.Configuration.Mask.class);
}
public Mask fixedConfigurationFlag() {
withLocalProperty("fixedConfigurationFlag");
return this;
}
public com.softlayer.api.service.product.item.Price.Mask lowestPresetServerPrice() {
return withSubMask("lowestPresetServerPrice", com.softlayer.api.service.product.item.Price.Mask.class);
}
public com.softlayer.api.service.product.Package.Mask presetPackage() {
return withSubMask("presetPackage", com.softlayer.api.service.product.Package.Mask.class);
}
public com.softlayer.api.service.product.pkg.order.Configuration.Mask packageConfiguration() {
return withSubMask("packageConfiguration", com.softlayer.api.service.product.pkg.order.Configuration.Mask.class);
}
public com.softlayer.api.service.product.item.Price.Mask prices() {
return withSubMask("prices", com.softlayer.api.service.product.item.Price.Mask.class);
}
public com.softlayer.api.service.configuration.storage.group.template.Group.Mask storageGroupTemplateArrays() {
return withSubMask("storageGroupTemplateArrays", com.softlayer.api.service.configuration.storage.group.template.Group.Mask.class);
}
public Mask description() {
withLocalProperty("description");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask isActive() {
withLocalProperty("isActive");
return this;
}
public Mask keyName() {
withLocalProperty("keyName");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask packageId() {
withLocalProperty("packageId");
return this;
}
public Mask categoryCount() {
withLocalProperty("categoryCount");
return this;
}
public Mask configurationCount() {
withLocalProperty("configurationCount");
return this;
}
public Mask packageConfigurationCount() {
withLocalProperty("packageConfigurationCount");
return this;
}
public Mask priceCount() {
withLocalProperty("priceCount");
return this;
}
public Mask storageGroupTemplateArrayCount() {
withLocalProperty("storageGroupTemplateArrayCount");
return this;
}
}
}