com.softlayer.api.service.user.customer.notification.virtual.Guest 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.user.customer.notification.virtual;
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.user.Customer;
import java.util.List;
import java.util.concurrent.Future;
/**
* The SoftLayer_User_Customer_Notification_Virtual_Guest object stores links between customers and the virtual guests they wish to monitor. This link is not enough, the user must be sure to also create SoftLayer_Network_Monitor_Version1_Query_Host instance with the response action set to "notify users" in order for the users linked to that hardware object to be notified on failure.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest
*/
@ApiType("SoftLayer_User_Customer_Notification_Virtual_Guest")
public class Guest extends Entity {
/**
* The virtual guest object that will be monitored.
*/
@ApiProperty
protected com.softlayer.api.service.virtual.Guest guest;
public com.softlayer.api.service.virtual.Guest getGuest() {
return guest;
}
public void setGuest(com.softlayer.api.service.virtual.Guest guest) {
this.guest = guest;
}
/**
* The user that will be notified when the associated virtual guest object fails a monitoring instance.
*/
@ApiProperty
protected Customer user;
public Customer getUser() {
return user;
}
public void setUser(Customer user) {
this.user = user;
}
/**
* The ID of the virtual guest object that is to be monitored.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long guestId;
public Long getGuestId() {
return guestId;
}
public void setGuestId(Long guestId) {
guestIdSpecified = true;
this.guestId = guestId;
}
protected boolean guestIdSpecified;
public boolean isGuestIdSpecified() {
return guestIdSpecified;
}
public void unsetGuestId() {
guestId = null;
guestIdSpecified = false;
}
/**
* The unique identifier for this object
*/
@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 ID of the SoftLayer_User_Customer object that represents the user to be notified on monitoring failure.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long userId;
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
userIdSpecified = true;
this.userId = userId;
}
protected boolean userIdSpecified;
public boolean isUserIdSpecified() {
return userIdSpecified;
}
public void unsetUserId() {
userId = null;
userIdSpecified = 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());
}
/**
* This service represents the link between a monitored guest instance, and a user account.
*
* When a monitoring service on that guest instance fails and the monitor is set to "notify users," any users linked to that guest instance using this service will be notified of the failure.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_User_Customer_Notification_Virtual_Guest")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Passing in an unsaved instance of a SoftLayer_Customer_Notification_Virtual_Guest object into this function will create the object and return the results to the user.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::createObject
*/
@ApiMethod
public Guest createObject(Guest templateObject);
/**
* Passing in a collection of unsaved instances of SoftLayer_Customer_Notification_Virtual_Guest objects into this function will create all objects and return the results to the user.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::createObjects
*/
@ApiMethod
public List createObjects(List templateObjects);
/**
* Like any other API object, the customer notification objects can be deleted by passing an instance of them into this function. The ID on the object must be set.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::deleteObjects
*/
@ApiMethod
public Boolean deleteObjects(List templateObjects);
/**
* This method returns all SoftLayer_User_Customer_Notification_Virtual_Guest objects associated with the passed in ID as long as that hardware ID is owned by the current user's account.
*
* This behavior can also be accomplished by simply tapping monitoringUserNotification on the Virtual_Guest object.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::findByGuestId
*/
@ApiMethod
public List findByGuestId(Long id);
/**
* getObject retrieves the SoftLayer_User_Customer_Notification_Virtual_Guest object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer_Notification_Virtual_Guest service. You can only retrieve guest notifications attached to virtual guests and users that belong to your account
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::getObject
*/
@ApiMethod(instanceRequired = true)
public Guest getObject();
/**
* The virtual guest object that will be monitored.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::getGuest
*/
@ApiMethod(instanceRequired = true)
public com.softlayer.api.service.virtual.Guest getGuest();
/**
* The user that will be notified when the associated virtual guest object fails a monitoring instance.
*
* @see SoftLayer_User_Customer_Notification_Virtual_Guest::getUser
*/
@ApiMethod(instanceRequired = true)
public Customer getUser();
}
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#createObject}
*/
public Future createObject(Guest templateObject);
public Future> createObject(Guest templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#createObjects}
*/
public Future> createObjects(List templateObjects);
public Future> createObjects(List templateObjects, ResponseHandler> callback);
/**
* Async version of {@link Service#deleteObjects}
*/
public Future deleteObjects(List templateObjects);
public Future> deleteObjects(List templateObjects, ResponseHandler callback);
/**
* Async version of {@link Service#findByGuestId}
*/
public Future> findByGuestId(Long id);
public Future> findByGuestId(Long id, ResponseHandler> callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getGuest}
*/
public Future getGuest();
/**
* Async callback version of {@link Service#getGuest}
*/
public Future> getGuest(ResponseHandler callback);
/**
* Async version of {@link Service#getUser}
*/
public Future getUser();
/**
* Async callback version of {@link Service#getUser}
*/
public Future> getUser(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.virtual.Guest.Mask guest() {
return withSubMask("guest", com.softlayer.api.service.virtual.Guest.Mask.class);
}
public com.softlayer.api.service.user.Customer.Mask user() {
return withSubMask("user", com.softlayer.api.service.user.Customer.Mask.class);
}
public Mask guestId() {
withLocalProperty("guestId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask userId() {
withLocalProperty("userId");
return this;
}
}
}