com.softlayer.api.service.sales.presale.Event 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.sales.presale;
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.billing.Order;
import com.softlayer.api.service.product.Item;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* The presale event data types indicate the information regarding an individual presale event. The '''locationId''' will indicate the datacenter associated with the presale event. The '''itemId''' will indicate the product item associated with a particular presale event - however these are more rare. The '''startDate''' and '''endDate''' will provide information regarding when the presale event is available for use. At the end of the presale event, the server or services purchased will be available once approved and provisioned.
*
* @see SoftLayer_Sales_Presale_Event
*/
@ApiType("SoftLayer_Sales_Presale_Event")
public class Event extends Entity {
/**
* A flag to indicate that the presale event is currently active. A presale event is active if the current time is between the start and end dates.
*/
@ApiProperty
protected Boolean activeFlag;
public Boolean getActiveFlag() {
return activeFlag;
}
public void setActiveFlag(Boolean activeFlag) {
this.activeFlag = activeFlag;
}
/**
* A flag to indicate that the presale event is expired. A presale event is expired if the current time is after the end date.
*/
@ApiProperty
protected Boolean expiredFlag;
public Boolean getExpiredFlag() {
return expiredFlag;
}
public void setExpiredFlag(Boolean expiredFlag) {
this.expiredFlag = expiredFlag;
}
/**
* The [[SoftLayer_Product_Item]] associated with the presale event.
*/
@ApiProperty
protected Item item;
public Item getItem() {
return item;
}
public void setItem(Item item) {
this.item = item;
}
/**
* The [[SoftLayer_Location]] associated with the presale event.
*/
@ApiProperty
protected Location location;
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
/**
* The orders ([[SoftLayer_Billing_Order]]) associated with this presale event that were created for the customer's account.
*/
@ApiProperty
protected List orders;
public List getOrders() {
if (orders == null) {
orders = new ArrayList();
}
return orders;
}
/**
* Description of the presale event.
*/
@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;
}
/**
* End date of the presale event. Orders can be approved and provisioned after this date.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar endDate;
public GregorianCalendar getEndDate() {
return endDate;
}
public void setEndDate(GregorianCalendar endDate) {
endDateSpecified = true;
this.endDate = endDate;
}
protected boolean endDateSpecified;
public boolean isEndDateSpecified() {
return endDateSpecified;
}
public void unsetEndDate() {
endDate = null;
endDateSpecified = false;
}
/**
* Presale event unique identifier.
*/
@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;
}
/**
* [[SoftLayer_Product_Item]] id associated with the presale event.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long itemId;
public Long getItemId() {
return itemId;
}
public void setItemId(Long itemId) {
itemIdSpecified = true;
this.itemId = itemId;
}
protected boolean itemIdSpecified;
public boolean isItemIdSpecified() {
return itemIdSpecified;
}
public void unsetItemId() {
itemId = null;
itemIdSpecified = false;
}
/**
* [[SoftLayer_Location]] id for the presale event.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long locationId;
public Long getLocationId() {
return locationId;
}
public void setLocationId(Long locationId) {
locationIdSpecified = true;
this.locationId = locationId;
}
protected boolean locationIdSpecified;
public boolean isLocationIdSpecified() {
return locationIdSpecified;
}
public void unsetLocationId() {
locationId = null;
locationIdSpecified = false;
}
/**
* Start date of the presale event. Orders cannot be approved before this date.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar startDate;
public GregorianCalendar getStartDate() {
return startDate;
}
public void setStartDate(GregorianCalendar startDate) {
startDateSpecified = true;
this.startDate = startDate;
}
protected boolean startDateSpecified;
public boolean isStartDateSpecified() {
return startDateSpecified;
}
public void unsetStartDate() {
startDate = null;
startDateSpecified = false;
}
/**
* A count of the orders ([[SoftLayer_Billing_Order]]) associated with this presale event that were created for the customer's account.
*/
@ApiProperty
protected Long orderCount;
public Long getOrderCount() {
return orderCount;
}
public void setOrderCount(Long orderCount) {
this.orderCount = orderCount;
}
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());
}
/**
* Presale events are related to datacenters or products that are not yet currently available, but will be in the near future. For example, if a new datacenter is opening in a month, a presale event may be created that allows customers to purchase server space in advance. When a presale order is placed, the server configuration is saved, but not provisioned until the presale end date - the server will not be available during this waiting period. Also, when a presale order is placed, the customer is not charged up front, but only when the presale order is actually approved and provisioned on the presale end date.
*
* This server allows customer to view the currently-active presale events and their date ranges. This may allow a customer to plan early for purchasing a new product or server in a new datacenter.
*
* @see SoftLayer_Sales_Presale_Event
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Sales_Presale_Event")
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_Sales_Presale_Event::getAllObjects
*/
@ApiMethod
public List getAllObjects();
/**
* '''getObject''' retrieves the [[SoftLayer_Sales_Presale_Event]] object whose id number corresponds to the id number of the init parameter passed to the SoftLayer_Sales_Presale_Event service. Customers may only retrieve presale events that are currently active.
*
* @see SoftLayer_Sales_Presale_Event::getObject
*/
@ApiMethod(instanceRequired = true)
public Event getObject();
/**
* A flag to indicate that the presale event is currently active. A presale event is active if the current time is between the start and end dates.
*
* @see SoftLayer_Sales_Presale_Event::getActiveFlag
*/
@ApiMethod(instanceRequired = true)
public Boolean getActiveFlag();
/**
* A flag to indicate that the presale event is expired. A presale event is expired if the current time is after the end date.
*
* @see SoftLayer_Sales_Presale_Event::getExpiredFlag
*/
@ApiMethod(instanceRequired = true)
public Boolean getExpiredFlag();
/**
* The [[SoftLayer_Product_Item]] associated with the presale event.
*
* @see SoftLayer_Sales_Presale_Event::getItem
*/
@ApiMethod(instanceRequired = true)
public Item getItem();
/**
* The [[SoftLayer_Location]] associated with the presale event.
*
* @see SoftLayer_Sales_Presale_Event::getLocation
*/
@ApiMethod(instanceRequired = true)
public Location getLocation();
/**
* The orders ([[SoftLayer_Billing_Order]]) associated with this presale event that were created for the customer's account.
*
* @see SoftLayer_Sales_Presale_Event::getOrders
*/
@ApiMethod(instanceRequired = true)
public List getOrders();
}
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#getActiveFlag}
*/
public Future getActiveFlag();
/**
* Async callback version of {@link Service#getActiveFlag}
*/
public Future> getActiveFlag(ResponseHandler callback);
/**
* Async version of {@link Service#getExpiredFlag}
*/
public Future getExpiredFlag();
/**
* Async callback version of {@link Service#getExpiredFlag}
*/
public Future> getExpiredFlag(ResponseHandler callback);
/**
* Async version of {@link Service#getItem}
*/
public Future- getItem();
/**
* Async callback version of {@link Service#getItem}
*/
public Future> getItem(ResponseHandler
- callback);
/**
* Async version of {@link Service#getLocation}
*/
public Future
getLocation();
/**
* Async callback version of {@link Service#getLocation}
*/
public Future> getLocation(ResponseHandler callback);
/**
* Async version of {@link Service#getOrders}
*/
public Future> getOrders();
/**
* Async callback version of {@link Service#getOrders}
*/
public Future> getOrders(ResponseHandler> callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask activeFlag() {
withLocalProperty("activeFlag");
return this;
}
public Mask expiredFlag() {
withLocalProperty("expiredFlag");
return this;
}
public com.softlayer.api.service.product.Item.Mask item() {
return withSubMask("item", com.softlayer.api.service.product.Item.Mask.class);
}
public com.softlayer.api.service.Location.Mask location() {
return withSubMask("location", com.softlayer.api.service.Location.Mask.class);
}
public com.softlayer.api.service.billing.Order.Mask orders() {
return withSubMask("orders", com.softlayer.api.service.billing.Order.Mask.class);
}
public Mask description() {
withLocalProperty("description");
return this;
}
public Mask endDate() {
withLocalProperty("endDate");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask itemId() {
withLocalProperty("itemId");
return this;
}
public Mask locationId() {
withLocalProperty("locationId");
return this;
}
public Mask startDate() {
withLocalProperty("startDate");
return this;
}
public Mask orderCount() {
withLocalProperty("orderCount");
return this;
}
}
}