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

com.softlayer.api.service.product.pkg.Preset Maven / Gradle / Ivy

The newest version!
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.Location;
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.math.BigDecimal;
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 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; } /** * When true this preset is for ordering a Bare Metal Reserved server. */ @ApiProperty protected Boolean bareMetalReservedFlag; public Boolean getBareMetalReservedFlag() { return bareMetalReservedFlag; } public void setBareMetalReservedFlag(Boolean bareMetalReservedFlag) { this.bareMetalReservedFlag = bareMetalReservedFlag; } /** * 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 compute family this configuration belongs to. */ @ApiProperty protected com.softlayer.api.service.product.item.server.Group computeGroup; public com.softlayer.api.service.product.item.server.Group getComputeGroup() { return computeGroup; } public void setComputeGroup(com.softlayer.api.service.product.item.server.Group computeGroup) { this.computeGroup = computeGroup; } /** * The preset configuration (category and price). */ @ApiProperty protected List configuration; public List getConfiguration() { if (configuration == null) { configuration = new ArrayList(); } return configuration; } /** * When true this preset is only allowed to upgrade/downgrade to other presets in the same compute family. */ @ApiProperty protected Boolean disallowedComputeGroupUpgradeFlag; public Boolean getDisallowedComputeGroupUpgradeFlag() { return disallowedComputeGroupUpgradeFlag; } public void setDisallowedComputeGroupUpgradeFlag(Boolean disallowedComputeGroupUpgradeFlag) { this.disallowedComputeGroupUpgradeFlag = disallowedComputeGroupUpgradeFlag; } /** * 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 locations this preset configuration is available in. If empty the preset is available in all locations the package is available in. */ @ApiProperty protected List locations; public List getLocations() { if (locations == null) { locations = new ArrayList(); } return locations; } /** * 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; } /** * The starting hourly price for this configuration. Additional options not defined in the preset may increase the cost. */ @ApiProperty protected BigDecimal totalMinimumHourlyFee; public BigDecimal getTotalMinimumHourlyFee() { return totalMinimumHourlyFee; } public void setTotalMinimumHourlyFee(BigDecimal totalMinimumHourlyFee) { this.totalMinimumHourlyFee = totalMinimumHourlyFee; } /** * The starting monthly price for this configuration. Additional options not defined in the preset may increase the cost. */ @ApiProperty protected BigDecimal totalMinimumRecurringFee; public BigDecimal getTotalMinimumRecurringFee() { return totalMinimumRecurringFee; } public void setTotalMinimumRecurringFee(BigDecimal totalMinimumRecurringFee) { this.totalMinimumRecurringFee = totalMinimumRecurringFee; } /** * 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 locations this preset configuration is available in. If empty the preset is available in all locations the package is available in. */ @ApiProperty protected Long locationCount; public Long getLocationCount() { return locationCount; } public void setLocationCount(Long locationCount) { this.locationCount = locationCount; } /** * 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); /** * This method returns all the active package presets. * * @see SoftLayer_Product_Package_Preset::getAllObjects */ @ApiMethod public List getAllObjects(); /** * @see SoftLayer_Product_Package_Preset::getObject */ @ApiMethod(instanceRequired = true) public Preset getObject(); /** * @see SoftLayer_Product_Package_Preset::getAvailableStorageUnits */ @ApiMethod(instanceRequired = true) public Long getAvailableStorageUnits(); /** * When true this preset is for ordering a Bare Metal Reserved server. * * @see SoftLayer_Product_Package_Preset::getBareMetalReservedFlag */ @ApiMethod(instanceRequired = true) public Boolean getBareMetalReservedFlag(); /** * The item categories that are included in this package preset configuration. * * @see SoftLayer_Product_Package_Preset::getCategories */ @ApiMethod(instanceRequired = true) public List getCategories(); /** * The compute family this configuration belongs to. * * @see SoftLayer_Product_Package_Preset::getComputeGroup */ @ApiMethod(instanceRequired = true) public com.softlayer.api.service.product.item.server.Group getComputeGroup(); /** * The preset configuration (category and price). * * @see SoftLayer_Product_Package_Preset::getConfiguration */ @ApiMethod(instanceRequired = true) public List getConfiguration(); /** * When true this preset is only allowed to upgrade/downgrade to other presets in the same compute family. * * @see SoftLayer_Product_Package_Preset::getDisallowedComputeGroupUpgradeFlag */ @ApiMethod(instanceRequired = true) public Boolean getDisallowedComputeGroupUpgradeFlag(); /** * 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 locations this preset configuration is available in. If empty the preset is available in all locations the package is available in. * * @see SoftLayer_Product_Package_Preset::getLocations */ @ApiMethod(instanceRequired = true) public List getLocations(); /** * 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(); /** * The starting hourly price for this configuration. Additional options not defined in the preset may increase the cost. * * @see SoftLayer_Product_Package_Preset::getTotalMinimumHourlyFee */ @ApiMethod(instanceRequired = true) public BigDecimal getTotalMinimumHourlyFee(); /** * The starting monthly price for this configuration. Additional options not defined in the preset may increase the cost. * * @see SoftLayer_Product_Package_Preset::getTotalMinimumRecurringFee */ @ApiMethod(instanceRequired = true) public BigDecimal getTotalMinimumRecurringFee(); } 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#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#getBareMetalReservedFlag} */ public Future getBareMetalReservedFlag(); /** * Async callback version of {@link Service#getBareMetalReservedFlag} */ public Future getBareMetalReservedFlag(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#getComputeGroup} */ public Future getComputeGroup(); /** * Async callback version of {@link Service#getComputeGroup} */ public Future getComputeGroup(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#getDisallowedComputeGroupUpgradeFlag} */ public Future getDisallowedComputeGroupUpgradeFlag(); /** * Async callback version of {@link Service#getDisallowedComputeGroupUpgradeFlag} */ public Future getDisallowedComputeGroupUpgradeFlag(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#getLocations} */ public Future> getLocations(); /** * Async callback version of {@link Service#getLocations} */ public Future getLocations(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); /** * Async version of {@link Service#getTotalMinimumHourlyFee} */ public Future getTotalMinimumHourlyFee(); /** * Async callback version of {@link Service#getTotalMinimumHourlyFee} */ public Future getTotalMinimumHourlyFee(ResponseHandler callback); /** * Async version of {@link Service#getTotalMinimumRecurringFee} */ public Future getTotalMinimumRecurringFee(); /** * Async callback version of {@link Service#getTotalMinimumRecurringFee} */ public Future getTotalMinimumRecurringFee(ResponseHandler callback); } public static class Mask extends com.softlayer.api.service.Entity.Mask { public Mask availableStorageUnits() { withLocalProperty("availableStorageUnits"); return this; } public Mask bareMetalReservedFlag() { withLocalProperty("bareMetalReservedFlag"); 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.item.server.Group.Mask computeGroup() { return withSubMask("computeGroup", com.softlayer.api.service.product.item.server.Group.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 disallowedComputeGroupUpgradeFlag() { withLocalProperty("disallowedComputeGroupUpgradeFlag"); return this; } public Mask fixedConfigurationFlag() { withLocalProperty("fixedConfigurationFlag"); return this; } public com.softlayer.api.service.Location.Mask locations() { return withSubMask("locations", com.softlayer.api.service.Location.Mask.class); } 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("package", 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 totalMinimumHourlyFee() { withLocalProperty("totalMinimumHourlyFee"); return this; } public Mask totalMinimumRecurringFee() { withLocalProperty("totalMinimumRecurringFee"); return this; } 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 locationCount() { withLocalProperty("locationCount"); return this; } public Mask packageConfigurationCount() { withLocalProperty("packageConfigurationCount"); return this; } public Mask priceCount() { withLocalProperty("priceCount"); return this; } public Mask storageGroupTemplateArrayCount() { withLocalProperty("storageGroupTemplateArrayCount"); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy