com.softlayer.api.service.ticket.Subject 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.ticket;
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.container.knowledgelayer.QuestionAnswer;
import com.softlayer.api.service.ticket.Group;
import com.softlayer.api.service.ticket.subject.Category;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_Ticket_Subject data type models one of the possible subjects that a standard support ticket may belong to. A basic support ticket's title matches it's corresponding subject's name.
*
* @see SoftLayer_Ticket_Subject
*/
@ApiType("SoftLayer_Ticket_Subject")
public class Subject extends Entity {
@ApiProperty
protected Category category;
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
/**
* A child subject
*/
@ApiProperty
protected List children;
public List getChildren() {
if (children == null) {
children = new ArrayList();
}
return children;
}
@ApiProperty
protected Group group;
public Group getGroup() {
return group;
}
public void setGroup(Group group) {
this.group = group;
}
/**
* A parent subject
*/
@ApiProperty
protected Subject parent;
public Subject getParent() {
return parent;
}
public void setParent(Subject parent) {
this.parent = parent;
}
/**
* The subject category id that this ticket subject belongs to.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long categoryId;
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
categoryIdSpecified = true;
this.categoryId = categoryId;
}
protected boolean categoryIdSpecified;
public boolean isCategoryIdSpecified() {
return categoryIdSpecified;
}
public void unsetCategoryId() {
categoryId = null;
categoryIdSpecified = false;
}
/**
* A ticket subject's internal 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;
}
/**
* A ticket subject's name. This name is used for a standard support ticket's title.
*/
@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;
}
/**
* Specifies the parent subject id.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long parentId;
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
parentIdSpecified = true;
this.parentId = parentId;
}
protected boolean parentIdSpecified;
public boolean isParentIdSpecified() {
return parentIdSpecified;
}
public void unsetParentId() {
parentId = null;
parentIdSpecified = false;
}
/**
* A count of a child subject
*/
@ApiProperty
protected Long childrenCount;
public Long getChildrenCount() {
return childrenCount;
}
public void setChildrenCount(Long childrenCount) {
this.childrenCount = childrenCount;
}
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());
}
/**
* Every standard support ticket submitted to SoftLayer contains a relationship to a pre-determined subject which populates that ticket's title. The SoftLayer_Ticket_Subject service retrieves these subjects. These ticket subjects also determine which department a ticket is opened for.
*
* @see SoftLayer_Ticket_Subject
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Ticket_Subject")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Retrieve all possible ticket subjects. The SoftLayer customer portal uses this method in the add standard support ticket form.
*
* @see SoftLayer_Ticket_Subject::getAllObjects
*/
@ApiMethod
public List getAllObjects();
/**
* getObject retrieves the SoftLayer_Ticket_Subject object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_Ticket_Subject service.
*
* @see SoftLayer_Ticket_Subject::getObject
*/
@ApiMethod(instanceRequired = true)
public Subject getObject();
/**
* SoftLayer maintains relationships between the generic subjects for standard administration and the top five commonly asked questions about these subjects. getTopFileKnowledgeLayerQuestions() retrieves the top five questions and answers from the SoftLayer KnowledgeLayer related to the given ticket subject.
*
* @see SoftLayer_Ticket_Subject::getTopFiveKnowledgeLayerQuestions
*/
@ApiMethod(instanceRequired = true)
public List getTopFiveKnowledgeLayerQuestions();
/**
* @see SoftLayer_Ticket_Subject::getCategory
*/
@ApiMethod(instanceRequired = true)
public Category getCategory();
/**
* A child subject
*
* @see SoftLayer_Ticket_Subject::getChildren
*/
@ApiMethod(instanceRequired = true)
public List getChildren();
/**
* @see SoftLayer_Ticket_Subject::getGroup
*/
@ApiMethod(instanceRequired = true)
public Group getGroup();
/**
* A parent subject
*
* @see SoftLayer_Ticket_Subject::getParent
*/
@ApiMethod(instanceRequired = true)
public Subject getParent();
}
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#getTopFiveKnowledgeLayerQuestions}
*/
public Future> getTopFiveKnowledgeLayerQuestions();
public Future> getTopFiveKnowledgeLayerQuestions(ResponseHandler> callback);
/**
* Async version of {@link Service#getCategory}
*/
public Future getCategory();
/**
* Async callback version of {@link Service#getCategory}
*/
public Future> getCategory(ResponseHandler callback);
/**
* Async version of {@link Service#getChildren}
*/
public Future> getChildren();
/**
* Async callback version of {@link Service#getChildren}
*/
public Future> getChildren(ResponseHandler> callback);
/**
* Async version of {@link Service#getGroup}
*/
public Future getGroup();
/**
* Async callback version of {@link Service#getGroup}
*/
public Future> getGroup(ResponseHandler callback);
/**
* Async version of {@link Service#getParent}
*/
public Future getParent();
/**
* Async callback version of {@link Service#getParent}
*/
public Future> getParent(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.ticket.subject.Category.Mask category() {
return withSubMask("category", com.softlayer.api.service.ticket.subject.Category.Mask.class);
}
public Subject.Mask children() {
return withSubMask("children", Subject.Mask.class);
}
public Group.Mask group() {
return withSubMask("group", Group.Mask.class);
}
public Subject.Mask parent() {
return withSubMask("parent", Subject.Mask.class);
}
public Mask categoryId() {
withLocalProperty("categoryId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask parentId() {
withLocalProperty("parentId");
return this;
}
public Mask childrenCount() {
withLocalProperty("childrenCount");
return this;
}
}
}