com.softlayer.api.service.email.Subscription 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.email;
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 java.util.List;
import java.util.concurrent.Future;
/**
* SoftLayer customers can use this service to manage or view all of the available email subscriptions that they can suppress.
*
* @see SoftLayer_Email_Subscription
*/
@ApiType("SoftLayer_Email_Subscription")
public class Subscription extends Entity {
@ApiProperty
protected Boolean enabled;
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
/**
* Brief description of the purpose of the email.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String description;
public String getDescription() {
return description;
}
public void setDescription(String description) {
descriptionSpecified = true;
this.description = description;
}
protected boolean descriptionSpecified;
public boolean isDescriptionSpecified() {
return descriptionSpecified;
}
public void unsetDescription() {
description = null;
descriptionSpecified = 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;
}
/**
* Email template name.
*/
@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;
}
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());
}
/**
* SoftLayer customers can use this service to manage or view all of the available email subscriptions that they can suppress.
*
* @see SoftLayer_Email_Subscription
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Email_Subscription")
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_Email_Subscription::disable
*/
@ApiMethod(instanceRequired = true)
public Boolean disable();
/**
* @see SoftLayer_Email_Subscription::enable
*/
@ApiMethod(instanceRequired = true)
public Boolean enable();
/**
* @see SoftLayer_Email_Subscription::getAllObjects
*/
@ApiMethod
public List getAllObjects();
/**
* @see SoftLayer_Email_Subscription::getObject
*/
@ApiMethod(instanceRequired = true)
public Subscription getObject();
/**
* @see SoftLayer_Email_Subscription::getEnabled
*/
@ApiMethod(instanceRequired = true)
public Boolean getEnabled();
}
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#disable}
*/
public Future disable();
public Future> disable(ResponseHandler callback);
/**
* Async version of {@link Service#enable}
*/
public Future enable();
public Future> enable(ResponseHandler callback);
/**
* 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#getEnabled}
*/
public Future getEnabled();
/**
* Async callback version of {@link Service#getEnabled}
*/
public Future> getEnabled(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask enabled() {
withLocalProperty("enabled");
return this;
}
public Mask description() {
withLocalProperty("description");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
}
}