com.softlayer.api.service.layout.Item 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.layout;
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.layout.Preference;
import com.softlayer.api.service.layout.item.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Layout_Item contains definitions for default layout items
*
* @see SoftLayer_Layout_Item
*/
@ApiType("SoftLayer_Layout_Item")
public class Item extends Entity {
/**
* The layout preferences assigned to this layout item
*/
@ApiProperty
protected List layoutItemPreferences;
public List getLayoutItemPreferences() {
if (layoutItemPreferences == null) {
layoutItemPreferences = new ArrayList();
}
return layoutItemPreferences;
}
/**
* The type of the layout item object
*/
@ApiProperty
protected Type layoutItemType;
public Type getLayoutItemType() {
return layoutItemType;
}
public void setLayoutItemType(Type layoutItemType) {
this.layoutItemType = layoutItemType;
}
/**
* The internal identifier of a layout item
*/
@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 unique key name of the layout item, used primarily for programmatic purposes
*/
@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 internal identifier of the related [[SoftLayer_Layout_Item_Type]]
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long layoutItemTypeId;
public Long getLayoutItemTypeId() {
return layoutItemTypeId;
}
public void setLayoutItemTypeId(Long layoutItemTypeId) {
layoutItemTypeIdSpecified = true;
this.layoutItemTypeId = layoutItemTypeId;
}
protected boolean layoutItemTypeIdSpecified;
public boolean isLayoutItemTypeIdSpecified() {
return layoutItemTypeIdSpecified;
}
public void unsetLayoutItemTypeId() {
layoutItemTypeId = null;
layoutItemTypeIdSpecified = false;
}
/**
* The friendly name of the layout item
*/
@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;
}
/**
* A count of the layout preferences assigned to this layout item
*/
@ApiProperty
protected Long layoutItemPreferenceCount;
public Long getLayoutItemPreferenceCount() {
return layoutItemPreferenceCount;
}
public void setLayoutItemPreferenceCount(Long layoutItemPreferenceCount) {
this.layoutItemPreferenceCount = layoutItemPreferenceCount;
}
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());
}
/**
* Layout items are used in the customization of the Portal 4 customer experience.
*
* Each [[SoftLayer_Layout_Container|container]] in the portal contains one or more layout items. These are used to describe elements such as ticket lists. Layout items typically have [[SoftLayer_Layout_Preference|default preferences]], which can be customized once the container is added to a [[SoftLayer_Layout_Profile|layout profile]].
*
* @see SoftLayer_Layout_Item
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Layout_Item")
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_Layout_Item::getObject
*/
@ApiMethod(instanceRequired = true)
public Item getObject();
/**
* The layout preferences assigned to this layout item
*
* @see SoftLayer_Layout_Item::getLayoutItemPreferences
*/
@ApiMethod(instanceRequired = true)
public List getLayoutItemPreferences();
/**
* The type of the layout item object
*
* @see SoftLayer_Layout_Item::getLayoutItemType
*/
@ApiMethod(instanceRequired = true)
public Type getLayoutItemType();
}
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#getLayoutItemPreferences}
*/
public Future
> getLayoutItemPreferences();
/**
* Async callback version of {@link Service#getLayoutItemPreferences}
*/
public Future> getLayoutItemPreferences(ResponseHandler> callback);
/**
* Async version of {@link Service#getLayoutItemType}
*/
public Future getLayoutItemType();
/**
* Async callback version of {@link Service#getLayoutItemType}
*/
public Future> getLayoutItemType(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Preference.Mask layoutItemPreferences() {
return withSubMask("layoutItemPreferences", Preference.Mask.class);
}
public com.softlayer.api.service.layout.item.Type.Mask layoutItemType() {
return withSubMask("layoutItemType", com.softlayer.api.service.layout.item.Type.Mask.class);
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask keyname() {
withLocalProperty("keyname");
return this;
}
public Mask layoutItemTypeId() {
withLocalProperty("layoutItemTypeId");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask layoutItemPreferenceCount() {
withLocalProperty("layoutItemPreferenceCount");
return this;
}
}
}