com.softlayer.api.service.location.group.Pricing 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.location.group;
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.location.Group;
import com.softlayer.api.service.product.item.Price;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* A pricing location group relates a set of [[SoftLayer_Product_Item_Price|prices]] to only be available to a set of [[SoftLayer_Location|locations]] when used for [[SoftLayer_Product_Order|ordering]].
*
* @see SoftLayer_Location_Group_Pricing
*/
@ApiType("SoftLayer_Location_Group_Pricing")
public class Pricing extends Group {
/**
* The prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
*/
@ApiProperty
protected List prices;
public List getPrices() {
if (prices == null) {
prices = new ArrayList();
}
return prices;
}
/**
* A count of the prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
*/
@ApiProperty
protected Long priceCount;
public Long getPriceCount() {
return priceCount;
}
public void setPriceCount(Long priceCount) {
this.priceCount = priceCount;
}
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());
}
/**
* A pricing location group relates a set of [[SoftLayer_Product_Item_Price|prices]] to only be available to a set of [[SoftLayer_Location|locations]] when used for [[SoftLayer_Product_Order|ordering]].
*
* @see SoftLayer_Location_Group_Pricing
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Location_Group_Pricing")
public static interface Service extends Group.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* @see SoftLayer_Location_Group_Pricing::getAllObjects
*/
@ApiMethod("getAllObjects")
public List getAllObjectsForPricing();
/**
* @see SoftLayer_Location_Group_Pricing::getObject
*/
@ApiMethod(value = "getObject", instanceRequired = true)
public Pricing getObjectForPricing();
/**
* The prices that this pricing location group limits. All of these prices will only be available in the locations defined by this pricing location group.
*
* @see SoftLayer_Location_Group_Pricing::getPrices
*/
@ApiMethod(instanceRequired = true)
public List getPrices();
}
public static interface ServiceAsync extends Group.ServiceAsync {
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Async version of {@link Service#getAllObjectsForPricing}
*/
public Future> getAllObjectsForPricing();
public Future> getAllObjectsForPricing(ResponseHandler> callback);
/**
* Async version of {@link Service#getObjectForPricing}
*/
public Future getObjectForPricing();
public Future> getObjectForPricing(ResponseHandler callback);
/**
* Async version of {@link Service#getPrices}
*/
public Future> getPrices();
/**
* Async callback version of {@link Service#getPrices}
*/
public Future> getPrices(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.location.Group.Mask {
public com.softlayer.api.service.product.item.Price.Mask prices() {
return withSubMask("prices", com.softlayer.api.service.product.item.Price.Mask.class);
}
public Mask priceCount() {
withLocalProperty("priceCount");
return this;
}
}
}