com.softlayer.api.service.network.storage.Schedule 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.network.storage;
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.network.Storage;
import com.softlayer.api.service.network.storage.Event;
import com.softlayer.api.service.network.storage.Partnership;
import com.softlayer.api.service.network.storage.schedule.Property;
import com.softlayer.api.service.network.storage.schedule.Type;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* Schedules can be created for select Storage services, such as iscsi. These schedules are used to perform various tasks such as scheduling snapshots or synchronizing replicants.
*
* @see SoftLayer_Network_Storage_Schedule
*/
@ApiType("SoftLayer_Network_Storage_Schedule")
public class Schedule extends Entity {
/**
* The hour parameter of this schedule.
*/
@ApiProperty
protected String day;
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
/**
* The day of the month parameter of this schedule.
*/
@ApiProperty
protected String dayOfMonth;
public String getDayOfMonth() {
return dayOfMonth;
}
public void setDayOfMonth(String dayOfMonth) {
this.dayOfMonth = dayOfMonth;
}
/**
* The day of the week parameter of this schedule.
*/
@ApiProperty
protected String dayOfWeek;
public String getDayOfWeek() {
return dayOfWeek;
}
public void setDayOfWeek(String dayOfWeek) {
this.dayOfWeek = dayOfWeek;
}
/**
* Events which have been created as the result of a schedule execution.
*/
@ApiProperty
protected List events;
public List getEvents() {
if (events == null) {
events = new ArrayList();
}
return events;
}
/**
* The hour parameter of this schedule.
*/
@ApiProperty
protected String hour;
public String getHour() {
return hour;
}
public void setHour(String hour) {
this.hour = hour;
}
/**
* The minute parameter of this schedule.
*/
@ApiProperty
protected String minute;
public String getMinute() {
return minute;
}
public void setMinute(String minute) {
this.minute = minute;
}
/**
* The month of the year parameter of this schedule.
*/
@ApiProperty
protected String monthOfYear;
public String getMonthOfYear() {
return monthOfYear;
}
public void setMonthOfYear(String monthOfYear) {
this.monthOfYear = monthOfYear;
}
/**
* The associated partnership for a schedule.
*/
@ApiProperty
protected Partnership partnership;
public Partnership getPartnership() {
return partnership;
}
public void setPartnership(Partnership partnership) {
this.partnership = partnership;
}
/**
* Properties used for configuration of a schedule.
*/
@ApiProperty
protected List properties;
public List getProperties() {
if (properties == null) {
properties = new ArrayList();
}
return properties;
}
/**
* Replica snapshots which have been created as the result of this schedule's execution.
*/
@ApiProperty
protected List replicaSnapshots;
public List getReplicaSnapshots() {
if (replicaSnapshots == null) {
replicaSnapshots = new ArrayList();
}
return replicaSnapshots;
}
/**
* The number of snapshots this schedule is configured to retain.
*/
@ApiProperty
protected String retentionCount;
public String getRetentionCount() {
return retentionCount;
}
public void setRetentionCount(String retentionCount) {
this.retentionCount = retentionCount;
}
/**
* The minute parameter of this schedule.
*/
@ApiProperty
protected String second;
public String getSecond() {
return second;
}
public void setSecond(String second) {
this.second = second;
}
/**
* Snapshots which have been created as the result of this schedule's execution.
*/
@ApiProperty
protected List snapshots;
public List getSnapshots() {
if (snapshots == null) {
snapshots = new ArrayList();
}
return snapshots;
}
/**
* The type provides a standardized definition for a schedule.
*/
@ApiProperty
protected Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
/**
* The associated volume for a schedule.
*/
@ApiProperty
protected Storage volume;
public Storage getVolume() {
return volume;
}
public void setVolume(Storage volume) {
this.volume = volume;
}
/**
* A flag which determines if a schedule is active.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long active;
public Long getActive() {
return active;
}
public void setActive(Long active) {
activeSpecified = true;
this.active = active;
}
protected boolean activeSpecified;
public boolean isActiveSpecified() {
return activeSpecified;
}
public void unsetActive() {
active = null;
activeSpecified = false;
}
/**
* The date a schedule was created.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar createDate;
public GregorianCalendar getCreateDate() {
return createDate;
}
public void setCreateDate(GregorianCalendar createDate) {
createDateSpecified = true;
this.createDate = createDate;
}
protected boolean createDateSpecified;
public boolean isCreateDateSpecified() {
return createDateSpecified;
}
public void unsetCreateDate() {
createDate = null;
createDateSpecified = false;
}
/**
* A schedule'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;
}
/**
* The date a schedule was last modified.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected GregorianCalendar modifyDate;
public GregorianCalendar getModifyDate() {
return modifyDate;
}
public void setModifyDate(GregorianCalendar modifyDate) {
modifyDateSpecified = true;
this.modifyDate = modifyDate;
}
protected boolean modifyDateSpecified;
public boolean isModifyDateSpecified() {
return modifyDateSpecified;
}
public void unsetModifyDate() {
modifyDate = null;
modifyDateSpecified = false;
}
/**
* A schedule's name, for example 'Daily'.
*/
@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;
}
/**
* The partnership id which a schedule is associated with.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long partnershipId;
public Long getPartnershipId() {
return partnershipId;
}
public void setPartnershipId(Long partnershipId) {
partnershipIdSpecified = true;
this.partnershipId = partnershipId;
}
protected boolean partnershipIdSpecified;
public boolean isPartnershipIdSpecified() {
return partnershipIdSpecified;
}
public void unsetPartnershipId() {
partnershipId = null;
partnershipIdSpecified = false;
}
/**
* The type id which a schedule is associated with.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long typeId;
public Long getTypeId() {
return typeId;
}
public void setTypeId(Long typeId) {
typeIdSpecified = true;
this.typeId = typeId;
}
protected boolean typeIdSpecified;
public boolean isTypeIdSpecified() {
return typeIdSpecified;
}
public void unsetTypeId() {
typeId = null;
typeIdSpecified = false;
}
/**
* The volume id which a schedule is associated with.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long volumeId;
public Long getVolumeId() {
return volumeId;
}
public void setVolumeId(Long volumeId) {
volumeIdSpecified = true;
this.volumeId = volumeId;
}
protected boolean volumeIdSpecified;
public boolean isVolumeIdSpecified() {
return volumeIdSpecified;
}
public void unsetVolumeId() {
volumeId = null;
volumeIdSpecified = false;
}
/**
* A count of events which have been created as the result of a schedule execution.
*/
@ApiProperty
protected Long eventCount;
public Long getEventCount() {
return eventCount;
}
public void setEventCount(Long eventCount) {
this.eventCount = eventCount;
}
/**
* A count of properties used for configuration of a schedule.
*/
@ApiProperty
protected Long propertyCount;
public Long getPropertyCount() {
return propertyCount;
}
public void setPropertyCount(Long propertyCount) {
this.propertyCount = propertyCount;
}
/**
* A count of replica snapshots which have been created as the result of this schedule's execution.
*/
@ApiProperty
protected Long replicaSnapshotCount;
public Long getReplicaSnapshotCount() {
return replicaSnapshotCount;
}
public void setReplicaSnapshotCount(Long replicaSnapshotCount) {
this.replicaSnapshotCount = replicaSnapshotCount;
}
/**
* A count of snapshots which have been created as the result of this schedule's execution.
*/
@ApiProperty
protected Long snapshotCount;
public Long getSnapshotCount() {
return snapshotCount;
}
public void setSnapshotCount(Long snapshotCount) {
this.snapshotCount = snapshotCount;
}
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());
}
/**
* Schedules can be created for select Storage services, such as iscsi. These schedules are used to perform various tasks such as scheduling snapshots or synchronizing replicants.
*
* The schedule service can be used to create, edit, or delete a schedule. Schedules are defined by the properties associated with them to specify values such as the start date, interval, or end date of the schedule.
*
* @see SoftLayer_Network_Storage_Schedule
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Network_Storage_Schedule")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Create a nas volume schedule
*
* @see SoftLayer_Network_Storage_Schedule::createObject
*/
@ApiMethod
public Schedule createObject(Schedule templateObject);
/**
* Delete a network storage schedule. '''This cannot be undone.''' ''deleteObject'' returns Boolean ''true'' on successful deletion or ''false'' if it was unable to remove a schedule;
*
* @see SoftLayer_Network_Storage_Schedule::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* Edit a nas volume schedule
*
* @see SoftLayer_Network_Storage_Schedule::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Schedule templateObject);
/**
* @see SoftLayer_Network_Storage_Schedule::getObject
*/
@ApiMethod(instanceRequired = true)
public Schedule getObject();
/**
* The hour parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getDay
*/
@ApiMethod(instanceRequired = true)
public String getDay();
/**
* The day of the month parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getDayOfMonth
*/
@ApiMethod(instanceRequired = true)
public String getDayOfMonth();
/**
* The day of the week parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getDayOfWeek
*/
@ApiMethod(instanceRequired = true)
public String getDayOfWeek();
/**
* Events which have been created as the result of a schedule execution.
*
* @see SoftLayer_Network_Storage_Schedule::getEvents
*/
@ApiMethod(instanceRequired = true)
public List getEvents();
/**
* The hour parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getHour
*/
@ApiMethod(instanceRequired = true)
public String getHour();
/**
* The minute parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getMinute
*/
@ApiMethod(instanceRequired = true)
public String getMinute();
/**
* The month of the year parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getMonthOfYear
*/
@ApiMethod(instanceRequired = true)
public String getMonthOfYear();
/**
* The associated partnership for a schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getPartnership
*/
@ApiMethod(instanceRequired = true)
public Partnership getPartnership();
/**
* Properties used for configuration of a schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getProperties
*/
@ApiMethod(instanceRequired = true)
public List getProperties();
/**
* Replica snapshots which have been created as the result of this schedule's execution.
*
* @see SoftLayer_Network_Storage_Schedule::getReplicaSnapshots
*/
@ApiMethod(instanceRequired = true)
public List getReplicaSnapshots();
/**
* The number of snapshots this schedule is configured to retain.
*
* @see SoftLayer_Network_Storage_Schedule::getRetentionCount
*/
@ApiMethod(instanceRequired = true)
public String getRetentionCount();
/**
* The minute parameter of this schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getSecond
*/
@ApiMethod(instanceRequired = true)
public String getSecond();
/**
* Snapshots which have been created as the result of this schedule's execution.
*
* @see SoftLayer_Network_Storage_Schedule::getSnapshots
*/
@ApiMethod(instanceRequired = true)
public List getSnapshots();
/**
* The type provides a standardized definition for a schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getType
*/
@ApiMethod(instanceRequired = true)
public Type getType();
/**
* The associated volume for a schedule.
*
* @see SoftLayer_Network_Storage_Schedule::getVolume
*/
@ApiMethod(instanceRequired = true)
public Storage getVolume();
}
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(Schedule templateObject);
public Future> createObject(Schedule templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#deleteObject}
*/
public Future deleteObject();
public Future> deleteObject(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Schedule templateObject);
public Future> editObject(Schedule templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getDay}
*/
public Future getDay();
/**
* Async callback version of {@link Service#getDay}
*/
public Future> getDay(ResponseHandler callback);
/**
* Async version of {@link Service#getDayOfMonth}
*/
public Future getDayOfMonth();
/**
* Async callback version of {@link Service#getDayOfMonth}
*/
public Future> getDayOfMonth(ResponseHandler callback);
/**
* Async version of {@link Service#getDayOfWeek}
*/
public Future getDayOfWeek();
/**
* Async callback version of {@link Service#getDayOfWeek}
*/
public Future> getDayOfWeek(ResponseHandler callback);
/**
* Async version of {@link Service#getEvents}
*/
public Future> getEvents();
/**
* Async callback version of {@link Service#getEvents}
*/
public Future> getEvents(ResponseHandler> callback);
/**
* Async version of {@link Service#getHour}
*/
public Future getHour();
/**
* Async callback version of {@link Service#getHour}
*/
public Future> getHour(ResponseHandler callback);
/**
* Async version of {@link Service#getMinute}
*/
public Future getMinute();
/**
* Async callback version of {@link Service#getMinute}
*/
public Future> getMinute(ResponseHandler callback);
/**
* Async version of {@link Service#getMonthOfYear}
*/
public Future getMonthOfYear();
/**
* Async callback version of {@link Service#getMonthOfYear}
*/
public Future> getMonthOfYear(ResponseHandler callback);
/**
* Async version of {@link Service#getPartnership}
*/
public Future getPartnership();
/**
* Async callback version of {@link Service#getPartnership}
*/
public Future> getPartnership(ResponseHandler callback);
/**
* Async version of {@link Service#getProperties}
*/
public Future> getProperties();
/**
* Async callback version of {@link Service#getProperties}
*/
public Future> getProperties(ResponseHandler> callback);
/**
* Async version of {@link Service#getReplicaSnapshots}
*/
public Future> getReplicaSnapshots();
/**
* Async callback version of {@link Service#getReplicaSnapshots}
*/
public Future> getReplicaSnapshots(ResponseHandler> callback);
/**
* Async version of {@link Service#getRetentionCount}
*/
public Future getRetentionCount();
/**
* Async callback version of {@link Service#getRetentionCount}
*/
public Future> getRetentionCount(ResponseHandler callback);
/**
* Async version of {@link Service#getSecond}
*/
public Future getSecond();
/**
* Async callback version of {@link Service#getSecond}
*/
public Future> getSecond(ResponseHandler callback);
/**
* Async version of {@link Service#getSnapshots}
*/
public Future> getSnapshots();
/**
* Async callback version of {@link Service#getSnapshots}
*/
public Future> getSnapshots(ResponseHandler> callback);
/**
* Async version of {@link Service#getType}
*/
public Future getType();
/**
* Async callback version of {@link Service#getType}
*/
public Future> getType(ResponseHandler callback);
/**
* Async version of {@link Service#getVolume}
*/
public Future getVolume();
/**
* Async callback version of {@link Service#getVolume}
*/
public Future> getVolume(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public Mask day() {
withLocalProperty("day");
return this;
}
public Mask dayOfMonth() {
withLocalProperty("dayOfMonth");
return this;
}
public Mask dayOfWeek() {
withLocalProperty("dayOfWeek");
return this;
}
public Event.Mask events() {
return withSubMask("events", Event.Mask.class);
}
public Mask hour() {
withLocalProperty("hour");
return this;
}
public Mask minute() {
withLocalProperty("minute");
return this;
}
public Mask monthOfYear() {
withLocalProperty("monthOfYear");
return this;
}
public Partnership.Mask partnership() {
return withSubMask("partnership", Partnership.Mask.class);
}
public com.softlayer.api.service.network.storage.schedule.Property.Mask properties() {
return withSubMask("properties", com.softlayer.api.service.network.storage.schedule.Property.Mask.class);
}
public com.softlayer.api.service.network.Storage.Mask replicaSnapshots() {
return withSubMask("replicaSnapshots", com.softlayer.api.service.network.Storage.Mask.class);
}
public Mask retentionCount() {
withLocalProperty("retentionCount");
return this;
}
public Mask second() {
withLocalProperty("second");
return this;
}
public com.softlayer.api.service.network.Storage.Mask snapshots() {
return withSubMask("snapshots", com.softlayer.api.service.network.Storage.Mask.class);
}
public com.softlayer.api.service.network.storage.schedule.Type.Mask type() {
return withSubMask("type", com.softlayer.api.service.network.storage.schedule.Type.Mask.class);
}
public com.softlayer.api.service.network.Storage.Mask volume() {
return withSubMask("volume", com.softlayer.api.service.network.Storage.Mask.class);
}
public Mask active() {
withLocalProperty("active");
return this;
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask name() {
withLocalProperty("name");
return this;
}
public Mask partnershipId() {
withLocalProperty("partnershipId");
return this;
}
public Mask typeId() {
withLocalProperty("typeId");
return this;
}
public Mask volumeId() {
withLocalProperty("volumeId");
return this;
}
public Mask eventCount() {
withLocalProperty("eventCount");
return this;
}
public Mask propertyCount() {
withLocalProperty("propertyCount");
return this;
}
public Mask replicaSnapshotCount() {
withLocalProperty("replicaSnapshotCount");
return this;
}
public Mask snapshotCount() {
withLocalProperty("snapshotCount");
return this;
}
}
}