All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softlayer.api.service.user.customer.MobileDevice Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.user.customer;

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;
import com.softlayer.api.service.notification.user.Subscriber;
import com.softlayer.api.service.user.Customer;
import com.softlayer.api.service.user.customer.mobiledevice.OperatingSystem;
import com.softlayer.api.service.user.customer.mobiledevice.Type;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * This class represents a mobile device belonging to a user.  The device can be a phone, tablet, or possibly even some Android based net books.  The purpose is to tie just enough info with the device and the user to enable push notifications through non-softlayer entities (Google, Apple, RIM). 
 *
 * @see SoftLayer_User_Customer_MobileDevice
 */
@ApiType("SoftLayer_User_Customer_MobileDevice")
public class MobileDevice extends Entity {

    /**
     * Notification subscriptions available to a mobile device.
     */
    @ApiProperty
    protected List availablePushNotificationSubscriptions;

    public List getAvailablePushNotificationSubscriptions() {
        if (availablePushNotificationSubscriptions == null) {
            availablePushNotificationSubscriptions = new ArrayList();
        }
        return availablePushNotificationSubscriptions;
    }

    /**
     * The user this mobile device belongs to.
     */
    @ApiProperty
    protected Customer customer;

    public Customer getCustomer() {
        return customer;
    }

    public void setCustomer(Customer customer) {
        this.customer = customer;
    }

    /**
     * The operating system this device is using
     */
    @ApiProperty
    protected OperatingSystem operatingSystem;

    public OperatingSystem getOperatingSystem() {
        return operatingSystem;
    }

    public void setOperatingSystem(OperatingSystem operatingSystem) {
        this.operatingSystem = operatingSystem;
    }

    /**
     * Notification subscriptions attached to a mobile device.
     */
    @ApiProperty
    protected List pushNotificationSubscriptions;

    public List getPushNotificationSubscriptions() {
        if (pushNotificationSubscriptions == null) {
            pushNotificationSubscriptions = new ArrayList();
        }
        return pushNotificationSubscriptions;
    }

    /**
     * The type of device this user is using
     */
    @ApiProperty
    protected Type type;

    public Type getType() {
        return type;
    }

    public void setType(Type type) {
        this.type = type;
    }

    /**
     * Created date for the record.
     */
    @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;
    }

    /**
     * The device resolution formatted width x height
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String displayResolutionXxY;

    public String getDisplayResolutionXxY() {
        return displayResolutionXxY;
    }

    public void setDisplayResolutionXxY(String displayResolutionXxY) {
        displayResolutionXxYSpecified = true;
        this.displayResolutionXxY = displayResolutionXxY;
    }

    protected boolean displayResolutionXxYSpecified;

    public boolean isDisplayResolutionXxYSpecified() {
        return displayResolutionXxYSpecified;
    }

    public void unsetDisplayResolutionXxY() {
        displayResolutionXxY = null;
        displayResolutionXxYSpecified = false;
    }

    /**
     * Record 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;
    }

    /**
     * Device type identifier.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long mobileDeviceTypeId;

    public Long getMobileDeviceTypeId() {
        return mobileDeviceTypeId;
    }

    public void setMobileDeviceTypeId(Long mobileDeviceTypeId) {
        mobileDeviceTypeIdSpecified = true;
        this.mobileDeviceTypeId = mobileDeviceTypeId;
    }

    protected boolean mobileDeviceTypeIdSpecified;

    public boolean isMobileDeviceTypeIdSpecified() {
        return mobileDeviceTypeIdSpecified;
    }

    public void unsetMobileDeviceTypeId() {
        mobileDeviceTypeId = null;
        mobileDeviceTypeIdSpecified = false;
    }

    /**
     * Mobile OS identifier.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long mobileOperatingSystemId;

    public Long getMobileOperatingSystemId() {
        return mobileOperatingSystemId;
    }

    public void setMobileOperatingSystemId(Long mobileOperatingSystemId) {
        mobileOperatingSystemIdSpecified = true;
        this.mobileOperatingSystemId = mobileOperatingSystemId;
    }

    protected boolean mobileOperatingSystemIdSpecified;

    public boolean isMobileOperatingSystemIdSpecified() {
        return mobileOperatingSystemIdSpecified;
    }

    public void unsetMobileOperatingSystemId() {
        mobileOperatingSystemId = null;
        mobileOperatingSystemIdSpecified = false;
    }

    /**
     * Device model number
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String modelNumber;

    public String getModelNumber() {
        return modelNumber;
    }

    public void setModelNumber(String modelNumber) {
        modelNumberSpecified = true;
        this.modelNumber = modelNumber;
    }

    protected boolean modelNumberSpecified;

    public boolean isModelNumberSpecified() {
        return modelNumberSpecified;
    }

    public void unsetModelNumber() {
        modelNumber = null;
        modelNumberSpecified = false;
    }

    /**
     * Last modify date for the record.
     */
    @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;
    }

    /**
     * The name of the device the user is using.
     */
    @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;
    }

    /**
     * Device phone number
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String phoneNumber;

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        phoneNumberSpecified = true;
        this.phoneNumber = phoneNumber;
    }

    protected boolean phoneNumberSpecified;

    public boolean isPhoneNumberSpecified() {
        return phoneNumberSpecified;
    }

    public void unsetPhoneNumber() {
        phoneNumber = null;
        phoneNumberSpecified = false;
    }

    /**
     * Device serial number
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String serialNumber;

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        serialNumberSpecified = true;
        this.serialNumber = serialNumber;
    }

    protected boolean serialNumberSpecified;

    public boolean isSerialNumberSpecified() {
        return serialNumberSpecified;
    }

    public void unsetSerialNumber() {
        serialNumber = null;
        serialNumberSpecified = false;
    }

    /**
     * The token that is provided by the mobile device.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String token;

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        tokenSpecified = true;
        this.token = token;
    }

    protected boolean tokenSpecified;

    public boolean isTokenSpecified() {
        return tokenSpecified;
    }

    public void unsetToken() {
        token = null;
        tokenSpecified = false;
    }

    /**
     * User Identifier
     */
    @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;
    }

    /**
     * A count of notification subscriptions available to a mobile device.
     */
    @ApiProperty
    protected Long availablePushNotificationSubscriptionCount;

    public Long getAvailablePushNotificationSubscriptionCount() {
        return availablePushNotificationSubscriptionCount;
    }

    public void setAvailablePushNotificationSubscriptionCount(Long availablePushNotificationSubscriptionCount) {
        this.availablePushNotificationSubscriptionCount = availablePushNotificationSubscriptionCount;
    }

    /**
     * A count of notification subscriptions attached to a mobile device.
     */
    @ApiProperty
    protected Long pushNotificationSubscriptionCount;

    public Long getPushNotificationSubscriptionCount() {
        return pushNotificationSubscriptionCount;
    }

    public void setPushNotificationSubscriptionCount(Long pushNotificationSubscriptionCount) {
        this.pushNotificationSubscriptionCount = pushNotificationSubscriptionCount;
    }

    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_User_Customer_MobileDevice
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_User_Customer_MobileDevice")
    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 new mobile device association for a user. 
         *
         * @see SoftLayer_User_Customer_MobileDevice::createObject
         */
        @ApiMethod
        public MobileDevice createObject(MobileDevice templateObject);

        /**
         * Delete a mobile device association for a user. 
         *
         * @see SoftLayer_User_Customer_MobileDevice::deleteObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean deleteObject();

        /**
         * Edit the object by passing in a modified instance of the object 
         *
         * @see SoftLayer_User_Customer_MobileDevice::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(MobileDevice templateObject);

        /**
         * @see SoftLayer_User_Customer_MobileDevice::getObject
         */
        @ApiMethod(instanceRequired = true)
        public MobileDevice getObject();

        /**
         * Notification subscriptions available to a mobile device.
         *
         * @see SoftLayer_User_Customer_MobileDevice::getAvailablePushNotificationSubscriptions
         */
        @ApiMethod(instanceRequired = true)
        public List getAvailablePushNotificationSubscriptions();

        /**
         * The user this mobile device belongs to.
         *
         * @see SoftLayer_User_Customer_MobileDevice::getCustomer
         */
        @ApiMethod(instanceRequired = true)
        public Customer getCustomer();

        /**
         * The operating system this device is using
         *
         * @see SoftLayer_User_Customer_MobileDevice::getOperatingSystem
         */
        @ApiMethod(instanceRequired = true)
        public OperatingSystem getOperatingSystem();

        /**
         * Notification subscriptions attached to a mobile device.
         *
         * @see SoftLayer_User_Customer_MobileDevice::getPushNotificationSubscriptions
         */
        @ApiMethod(instanceRequired = true)
        public List getPushNotificationSubscriptions();

        /**
         * The type of device this user is using
         *
         * @see SoftLayer_User_Customer_MobileDevice::getType
         */
        @ApiMethod(instanceRequired = true)
        public Type getType();

    }

    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(MobileDevice templateObject);

        public Future createObject(MobileDevice 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(MobileDevice templateObject);

        public Future editObject(MobileDevice templateObject, ResponseHandler callback);

        /**
         * Async version of {@link Service#getObject}
         */
        public Future getObject();

        public Future getObject(ResponseHandler callback);

        /**
         * Async version of {@link Service#getAvailablePushNotificationSubscriptions}
         */
        public Future> getAvailablePushNotificationSubscriptions();

        /**
         * Async callback version of {@link Service#getAvailablePushNotificationSubscriptions}
         */
        public Future getAvailablePushNotificationSubscriptions(ResponseHandler> callback);

        /**
         * Async version of {@link Service#getCustomer}
         */
        public Future getCustomer();

        /**
         * Async callback version of {@link Service#getCustomer}
         */
        public Future getCustomer(ResponseHandler callback);

        /**
         * Async version of {@link Service#getOperatingSystem}
         */
        public Future getOperatingSystem();

        /**
         * Async callback version of {@link Service#getOperatingSystem}
         */
        public Future getOperatingSystem(ResponseHandler callback);

        /**
         * Async version of {@link Service#getPushNotificationSubscriptions}
         */
        public Future> getPushNotificationSubscriptions();

        /**
         * Async callback version of {@link Service#getPushNotificationSubscriptions}
         */
        public Future getPushNotificationSubscriptions(ResponseHandler> callback);

        /**
         * Async version of {@link Service#getType}
         */
        public Future getType();

        /**
         * Async callback version of {@link Service#getType}
         */
        public Future getType(ResponseHandler callback);

    }

    public static class Mask extends com.softlayer.api.service.Entity.Mask {

        public com.softlayer.api.service.Notification.Mask availablePushNotificationSubscriptions() {
            return withSubMask("availablePushNotificationSubscriptions", com.softlayer.api.service.Notification.Mask.class);
        }

        public com.softlayer.api.service.user.Customer.Mask customer() {
            return withSubMask("customer", com.softlayer.api.service.user.Customer.Mask.class);
        }

        public com.softlayer.api.service.user.customer.mobiledevice.OperatingSystem.Mask operatingSystem() {
            return withSubMask("operatingSystem", com.softlayer.api.service.user.customer.mobiledevice.OperatingSystem.Mask.class);
        }

        public com.softlayer.api.service.notification.user.Subscriber.Mask pushNotificationSubscriptions() {
            return withSubMask("pushNotificationSubscriptions", com.softlayer.api.service.notification.user.Subscriber.Mask.class);
        }

        public com.softlayer.api.service.user.customer.mobiledevice.Type.Mask type() {
            return withSubMask("type", com.softlayer.api.service.user.customer.mobiledevice.Type.Mask.class);
        }

        public Mask createDate() {
            withLocalProperty("createDate");
            return this;
        }

        public Mask displayResolutionXxY() {
            withLocalProperty("displayResolutionXxY");
            return this;
        }

        public Mask id() {
            withLocalProperty("id");
            return this;
        }

        public Mask mobileDeviceTypeId() {
            withLocalProperty("mobileDeviceTypeId");
            return this;
        }

        public Mask mobileOperatingSystemId() {
            withLocalProperty("mobileOperatingSystemId");
            return this;
        }

        public Mask modelNumber() {
            withLocalProperty("modelNumber");
            return this;
        }

        public Mask modifyDate() {
            withLocalProperty("modifyDate");
            return this;
        }

        public Mask name() {
            withLocalProperty("name");
            return this;
        }

        public Mask phoneNumber() {
            withLocalProperty("phoneNumber");
            return this;
        }

        public Mask serialNumber() {
            withLocalProperty("serialNumber");
            return this;
        }

        public Mask token() {
            withLocalProperty("token");
            return this;
        }

        public Mask userId() {
            withLocalProperty("userId");
            return this;
        }

        public Mask availablePushNotificationSubscriptionCount() {
            withLocalProperty("availablePushNotificationSubscriptionCount");
            return this;
        }

        public Mask pushNotificationSubscriptionCount() {
            withLocalProperty("pushNotificationSubscriptionCount");
            return this;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy