com.softlayer.api.service.location.Reservation 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;
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.Location;
import com.softlayer.api.service.billing.Item;
import com.softlayer.api.service.location.reservation.Rack;
import com.softlayer.api.service.network.bandwidth.version1.Allotment;
import java.util.List;
import java.util.concurrent.Future;
/**
* @see SoftLayer_Location_Reservation
*/
@ApiType("SoftLayer_Location_Reservation")
public class Reservation extends Entity {
/**
* The account that a billing item belongs to.
*/
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The bandwidth allotment that the reservation belongs to.
*/
@ApiProperty
protected Allotment allotment;
public Allotment getAllotment() {
return allotment;
}
public void setAllotment(Allotment allotment) {
this.allotment = allotment;
}
/**
* The bandwidth allotment that the reservation belongs to.
*/
@ApiProperty
protected Item billingItem;
public Item getBillingItem() {
return billingItem;
}
public void setBillingItem(Item billingItem) {
this.billingItem = billingItem;
}
/**
* The datacenter location that the reservation belongs to.
*/
@ApiProperty
protected Location location;
public Location getLocation() {
return location;
}
public void setLocation(Location location) {
this.location = location;
}
/**
* Rack information for the reservation
*/
@ApiProperty
protected Rack locationReservationRack;
public Rack getLocationReservationRack() {
return locationReservationRack;
}
public void setLocationReservationRack(Rack locationReservationRack) {
this.locationReservationRack = locationReservationRack;
}
@ApiProperty(canBeNullOrNotSet = true)
protected Long allotmentId;
public Long getAllotmentId() {
return allotmentId;
}
public void setAllotmentId(Long allotmentId) {
allotmentIdSpecified = true;
this.allotmentId = allotmentId;
}
protected boolean allotmentIdSpecified;
public boolean isAllotmentIdSpecified() {
return allotmentIdSpecified;
}
public void unsetAllotmentId() {
allotmentId = null;
allotmentIdSpecified = false;
}
@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;
}
@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;
}
@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;
}
@ApiProperty(canBeNullOrNotSet = true)
protected String notes;
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
notesSpecified = true;
this.notes = notes;
}
protected boolean notesSpecified;
public boolean isNotesSpecified() {
return notesSpecified;
}
public void unsetNotes() {
notes = null;
notesSpecified = false;
}
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_Location_Reservation
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Location_Reservation")
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_Location_Reservation::getAccountReservations
*/
@ApiMethod
public List getAccountReservations();
/**
* @see SoftLayer_Location_Reservation::getObject
*/
@ApiMethod(instanceRequired = true)
public Reservation getObject();
/**
* The account that a billing item belongs to.
*
* @see SoftLayer_Location_Reservation::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The bandwidth allotment that the reservation belongs to.
*
* @see SoftLayer_Location_Reservation::getAllotment
*/
@ApiMethod(instanceRequired = true)
public Allotment getAllotment();
/**
* The bandwidth allotment that the reservation belongs to.
*
* @see SoftLayer_Location_Reservation::getBillingItem
*/
@ApiMethod(instanceRequired = true)
public Item getBillingItem();
/**
* The datacenter location that the reservation belongs to.
*
* @see SoftLayer_Location_Reservation::getLocation
*/
@ApiMethod(instanceRequired = true)
public Location getLocation();
/**
* Rack information for the reservation
*
* @see SoftLayer_Location_Reservation::getLocationReservationRack
*/
@ApiMethod(instanceRequired = true)
public Rack getLocationReservationRack();
}
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#getAccountReservations}
*/
public Future> getAccountReservations();
public Future> getAccountReservations(ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAccount}
*/
public Future getAccount();
/**
* Async callback version of {@link Service#getAccount}
*/
public Future> getAccount(ResponseHandler callback);
/**
* Async version of {@link Service#getAllotment}
*/
public Future getAllotment();
/**
* Async callback version of {@link Service#getAllotment}
*/
public Future> getAllotment(ResponseHandler callback);
/**
* Async version of {@link Service#getBillingItem}
*/
public Future- getBillingItem();
/**
* Async callback version of {@link Service#getBillingItem}
*/
public Future> getBillingItem(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#getLocationReservationRack}
*/
public Future getLocationReservationRack();
/**
* Async callback version of {@link Service#getLocationReservationRack}
*/
public Future> getLocationReservationRack(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.Account.Mask account() {
return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
}
public com.softlayer.api.service.network.bandwidth.version1.Allotment.Mask allotment() {
return withSubMask("allotment", com.softlayer.api.service.network.bandwidth.version1.Allotment.Mask.class);
}
public com.softlayer.api.service.billing.Item.Mask billingItem() {
return withSubMask("billingItem", com.softlayer.api.service.billing.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.location.reservation.Rack.Mask locationReservationRack() {
return withSubMask("locationReservationRack", com.softlayer.api.service.location.reservation.Rack.Mask.class);
}
public Mask allotmentId() {
withLocalProperty("allotmentId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask locationId() {
withLocalProperty("locationId");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask notes() {
withLocalProperty("notes");
return this;
}
}
}