com.softlayer.api.service.notification.user.subscriber.Preference 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.notification.user.subscriber;
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.notification.user.Subscriber;
import java.util.List;
import java.util.concurrent.Future;
/**
* Preferences are settings that can be modified to change the behavior of the subscription. For example, modify the limit preference to only receive notifications 10 times instead of 1 during a billing cycle.
*
* NOTE: Some preferences have certain restrictions on values that can be set.
*
* @see SoftLayer_Notification_User_Subscriber_Preference
*/
@ApiType("SoftLayer_Notification_User_Subscriber_Preference")
public class Preference extends Entity {
/**
* Details such name, keyname, minimum and maximum values for the preference.
*/
@ApiProperty
protected com.softlayer.api.service.notification.Preference defaultPreference;
public com.softlayer.api.service.notification.Preference getDefaultPreference() {
return defaultPreference;
}
public void setDefaultPreference(com.softlayer.api.service.notification.Preference defaultPreference) {
this.defaultPreference = defaultPreference;
}
/**
* Details of the subscriber tied to the preference.
*/
@ApiProperty
protected Subscriber notificationUserSubscriber;
public Subscriber getNotificationUserSubscriber() {
return notificationUserSubscriber;
}
public void setNotificationUserSubscriber(Subscriber notificationUserSubscriber) {
this.notificationUserSubscriber = notificationUserSubscriber;
}
/**
* Unique identifier for the subscriber's preferences.
*/
@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;
}
/**
* Unique identifier of the default preference for which the subscriber preference is based on. For example, if no preferences are supplied during the creation of a subscriber. The default values are pulled using this property.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long notificationPreferenceId;
public Long getNotificationPreferenceId() {
return notificationPreferenceId;
}
public void setNotificationPreferenceId(Long notificationPreferenceId) {
notificationPreferenceIdSpecified = true;
this.notificationPreferenceId = notificationPreferenceId;
}
protected boolean notificationPreferenceIdSpecified;
public boolean isNotificationPreferenceIdSpecified() {
return notificationPreferenceIdSpecified;
}
public void unsetNotificationPreferenceId() {
notificationPreferenceId = null;
notificationPreferenceIdSpecified = false;
}
/**
* Unique identifier of the subscriber tied to the subscriber preference.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long notificationUserSubscriberId;
public Long getNotificationUserSubscriberId() {
return notificationUserSubscriberId;
}
public void setNotificationUserSubscriberId(Long notificationUserSubscriberId) {
notificationUserSubscriberIdSpecified = true;
this.notificationUserSubscriberId = notificationUserSubscriberId;
}
protected boolean notificationUserSubscriberIdSpecified;
public boolean isNotificationUserSubscriberIdSpecified() {
return notificationUserSubscriberIdSpecified;
}
public void unsetNotificationUserSubscriberId() {
notificationUserSubscriberId = null;
notificationUserSubscriberIdSpecified = false;
}
/**
* The user supplied value to "override" the "default" preference's value.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String value;
public String getValue() {
return value;
}
public void setValue(String value) {
valueSpecified = true;
this.value = value;
}
protected boolean valueSpecified;
public boolean isValueSpecified() {
return valueSpecified;
}
public void unsetValue() {
value = null;
valueSpecified = 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_Notification_User_Subscriber_Preference
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Notification_User_Subscriber_Preference")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Use the method to create a new notification preference for a subscriber
*
* @see SoftLayer_Notification_User_Subscriber_Preference::createObject
*/
@ApiMethod
public Boolean createObject(Preference templateObject);
/**
* @see SoftLayer_Notification_User_Subscriber_Preference::editObjects
*/
@ApiMethod
public Boolean editObjects(List templateObjects);
/**
* @see SoftLayer_Notification_User_Subscriber_Preference::getObject
*/
@ApiMethod(instanceRequired = true)
public Preference getObject();
/**
* Details such name, keyname, minimum and maximum values for the preference.
*
* @see SoftLayer_Notification_User_Subscriber_Preference::getDefaultPreference
*/
@ApiMethod(instanceRequired = true)
public com.softlayer.api.service.notification.Preference getDefaultPreference();
/**
* Details of the subscriber tied to the preference.
*
* @see SoftLayer_Notification_User_Subscriber_Preference::getNotificationUserSubscriber
*/
@ApiMethod(instanceRequired = true)
public Subscriber getNotificationUserSubscriber();
}
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(Preference templateObject);
public Future> createObject(Preference templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#editObjects}
*/
public Future editObjects(List templateObjects);
public Future> editObjects(List templateObjects, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getDefaultPreference}
*/
public Future getDefaultPreference();
/**
* Async callback version of {@link Service#getDefaultPreference}
*/
public Future> getDefaultPreference(ResponseHandler callback);
/**
* Async version of {@link Service#getNotificationUserSubscriber}
*/
public Future getNotificationUserSubscriber();
/**
* Async callback version of {@link Service#getNotificationUserSubscriber}
*/
public Future> getNotificationUserSubscriber(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.notification.Preference.Mask defaultPreference() {
return withSubMask("defaultPreference", com.softlayer.api.service.notification.Preference.Mask.class);
}
public com.softlayer.api.service.notification.user.Subscriber.Mask notificationUserSubscriber() {
return withSubMask("notificationUserSubscriber", com.softlayer.api.service.notification.user.Subscriber.Mask.class);
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask notificationPreferenceId() {
withLocalProperty("notificationPreferenceId");
return this;
}
public Mask notificationUserSubscriberId() {
withLocalProperty("notificationUserSubscriberId");
return this;
}
public Mask value() {
withLocalProperty("value");
return this;
}
}
}