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

com.softlayer.api.service.account.Shipment Maven / Gradle / Ivy

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

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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.account.Address;
import com.softlayer.api.service.account.shipment.Item;
import com.softlayer.api.service.account.shipment.Status;
import com.softlayer.api.service.account.shipment.Type;
import com.softlayer.api.service.account.shipment.tracking.Data;
import com.softlayer.api.service.auxiliary.shipping.Courier;
import com.softlayer.api.service.user.Customer;
import com.softlayer.api.service.user.Employee;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Account_Shipment data type contains information relating to a shipment. Basic information such as addresses, the shipment courier, and any tracking information for as shipment is accessible with this data type. 
 *
 * @see SoftLayer_Account_Shipment
 */
@ApiType("SoftLayer_Account_Shipment")
public class Shipment extends Entity {

    /**
     * The account to which the shipment belongs.
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    /**
     * The courier handling the shipment.
     */
    @ApiProperty
    protected Courier courier;

    public Courier getCourier() {
        return courier;
    }

    public void setCourier(Courier courier) {
        this.courier = courier;
    }

    /**
     * The employee who created the shipment.
     */
    @ApiProperty
    protected Employee createEmployee;

    public Employee getCreateEmployee() {
        return createEmployee;
    }

    public void setCreateEmployee(Employee createEmployee) {
        this.createEmployee = createEmployee;
    }

    /**
     * The customer user who created the shipment.
     */
    @ApiProperty
    protected Customer createUser;

    public Customer getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Customer createUser) {
        this.createUser = createUser;
    }

    /**
     * The address at which the shipment is received.
     */
    @ApiProperty
    protected Address destinationAddress;

    public Address getDestinationAddress() {
        return destinationAddress;
    }

    public void setDestinationAddress(Address destinationAddress) {
        this.destinationAddress = destinationAddress;
    }

    /**
     * The employee who last modified the shipment.
     */
    @ApiProperty
    protected Employee modifyEmployee;

    public Employee getModifyEmployee() {
        return modifyEmployee;
    }

    public void setModifyEmployee(Employee modifyEmployee) {
        this.modifyEmployee = modifyEmployee;
    }

    /**
     * The customer user who last modified the shipment.
     */
    @ApiProperty
    protected Customer modifyUser;

    public Customer getModifyUser() {
        return modifyUser;
    }

    public void setModifyUser(Customer modifyUser) {
        this.modifyUser = modifyUser;
    }

    /**
     * The address from which the shipment is sent.
     */
    @ApiProperty
    protected Address originationAddress;

    public Address getOriginationAddress() {
        return originationAddress;
    }

    public void setOriginationAddress(Address originationAddress) {
        this.originationAddress = originationAddress;
    }

    /**
     * The items in the shipment.
     */
    @ApiProperty
    protected List shipmentItems;

    public List getShipmentItems() {
        if (shipmentItems == null) {
            shipmentItems = new ArrayList();
        }
        return shipmentItems;
    }

    /**
     * The status of the shipment.
     */
    @ApiProperty
    protected Status status;

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    /**
     * The tracking data for the shipment.
     */
    @ApiProperty
    protected List trackingData;

    public List getTrackingData() {
        if (trackingData == null) {
            trackingData = new ArrayList();
        }
        return trackingData;
    }

    /**
     * The type of shipment (e.g. for Data Transfer Service or Colocation Service).
     */
    @ApiProperty
    protected Type type;

    public Type getType() {
        return type;
    }

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

    /**
     * The account id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long accountId;

    public Long getAccountId() {
        return accountId;
    }

    public void setAccountId(Long accountId) {
        accountIdSpecified = true;
        this.accountId = accountId;
    }

    protected boolean accountIdSpecified;

    public boolean isAccountIdSpecified() {
        return accountIdSpecified;
    }

    public void unsetAccountId() {
        accountId = null;
        accountIdSpecified = false;
    }

    /**
     * The courier id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long courierId;

    public Long getCourierId() {
        return courierId;
    }

    public void setCourierId(Long courierId) {
        courierIdSpecified = true;
        this.courierId = courierId;
    }

    protected boolean courierIdSpecified;

    public boolean isCourierIdSpecified() {
        return courierIdSpecified;
    }

    public void unsetCourierId() {
        courierId = null;
        courierIdSpecified = false;
    }

    /**
     * The courier name of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String courierName;

    public String getCourierName() {
        return courierName;
    }

    public void setCourierName(String courierName) {
        courierNameSpecified = true;
        this.courierName = courierName;
    }

    protected boolean courierNameSpecified;

    public boolean isCourierNameSpecified() {
        return courierNameSpecified;
    }

    public void unsetCourierName() {
        courierName = null;
        courierNameSpecified = false;
    }

    /**
     * The create user id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long createUserId;

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        createUserIdSpecified = true;
        this.createUserId = createUserId;
    }

    protected boolean createUserIdSpecified;

    public boolean isCreateUserIdSpecified() {
        return createUserIdSpecified;
    }

    public void unsetCreateUserId() {
        createUserId = null;
        createUserIdSpecified = false;
    }

    /**
     * The destination address id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long destinationAddressId;

    public Long getDestinationAddressId() {
        return destinationAddressId;
    }

    public void setDestinationAddressId(Long destinationAddressId) {
        destinationAddressIdSpecified = true;
        this.destinationAddressId = destinationAddressId;
    }

    protected boolean destinationAddressIdSpecified;

    public boolean isDestinationAddressIdSpecified() {
        return destinationAddressIdSpecified;
    }

    public void unsetDestinationAddressId() {
        destinationAddressId = null;
        destinationAddressIdSpecified = false;
    }

    /**
     * The destination date of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar destinationDate;

    public GregorianCalendar getDestinationDate() {
        return destinationDate;
    }

    public void setDestinationDate(GregorianCalendar destinationDate) {
        destinationDateSpecified = true;
        this.destinationDate = destinationDate;
    }

    protected boolean destinationDateSpecified;

    public boolean isDestinationDateSpecified() {
        return destinationDateSpecified;
    }

    public void unsetDestinationDate() {
        destinationDate = null;
        destinationDateSpecified = false;
    }

    /**
     * The unique id of the shipment.
     */
    @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 modify user id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long modifyUserId;

    public Long getModifyUserId() {
        return modifyUserId;
    }

    public void setModifyUserId(Long modifyUserId) {
        modifyUserIdSpecified = true;
        this.modifyUserId = modifyUserId;
    }

    protected boolean modifyUserIdSpecified;

    public boolean isModifyUserIdSpecified() {
        return modifyUserIdSpecified;
    }

    public void unsetModifyUserId() {
        modifyUserId = null;
        modifyUserIdSpecified = false;
    }

    /**
     * The shipment note (special handling instructions).
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String note;

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        noteSpecified = true;
        this.note = note;
    }

    protected boolean noteSpecified;

    public boolean isNoteSpecified() {
        return noteSpecified;
    }

    public void unsetNote() {
        note = null;
        noteSpecified = false;
    }

    /**
     * The origination address id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long originationAddressId;

    public Long getOriginationAddressId() {
        return originationAddressId;
    }

    public void setOriginationAddressId(Long originationAddressId) {
        originationAddressIdSpecified = true;
        this.originationAddressId = originationAddressId;
    }

    protected boolean originationAddressIdSpecified;

    public boolean isOriginationAddressIdSpecified() {
        return originationAddressIdSpecified;
    }

    public void unsetOriginationAddressId() {
        originationAddressId = null;
        originationAddressIdSpecified = false;
    }

    /**
     * The origination date of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar originationDate;

    public GregorianCalendar getOriginationDate() {
        return originationDate;
    }

    public void setOriginationDate(GregorianCalendar originationDate) {
        originationDateSpecified = true;
        this.originationDate = originationDate;
    }

    protected boolean originationDateSpecified;

    public boolean isOriginationDateSpecified() {
        return originationDateSpecified;
    }

    public void unsetOriginationDate() {
        originationDate = null;
        originationDateSpecified = false;
    }

    /**
     * The status id of the shipment.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long statusId;

    public Long getStatusId() {
        return statusId;
    }

    public void setStatusId(Long statusId) {
        statusIdSpecified = true;
        this.statusId = statusId;
    }

    protected boolean statusIdSpecified;

    public boolean isStatusIdSpecified() {
        return statusIdSpecified;
    }

    public void unsetStatusId() {
        statusId = null;
        statusIdSpecified = false;
    }

    /**
     * The type id of the shipment.
     */
    @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;
    }

    /**
     * A count of the items in the shipment.
     */
    @ApiProperty
    protected Long shipmentItemCount;

    public Long getShipmentItemCount() {
        return shipmentItemCount;
    }

    public void setShipmentItemCount(Long shipmentItemCount) {
        this.shipmentItemCount = shipmentItemCount;
    }

    /**
     * A count of the tracking data for the shipment.
     */
    @ApiProperty
    protected Long trackingDataCount;

    public Long getTrackingDataCount() {
        return trackingDataCount;
    }

    public void setTrackingDataCount(Long trackingDataCount) {
        this.trackingDataCount = trackingDataCount;
    }

    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's shipment service allows the user to access information pertaining to a shipment from the user to SoftLayer or from SoftLayer to the user. 
     *
     * @see SoftLayer_Account_Shipment
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Account_Shipment")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Edit the properties of a shipment record by passing in a modified instance of a SoftLayer_Account_Shipment object. 
         *
         * @see SoftLayer_Account_Shipment::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(Shipment templateObject);

        /**
         * Retrieve a list of available shipping couriers.
         *
         * @see SoftLayer_Account_Shipment::getAllCouriers
         */
        @ApiMethod
        public List getAllCouriers();

        /**
         * Retrieve a list of available shipping couriers.
         *
         * @see SoftLayer_Account_Shipment::getAllCouriersByType
         */
        @ApiMethod
        public List getAllCouriersByType(String courierTypeKeyName);

        /**
         * Retrieve a a list of shipment statuses.
         *
         * @see SoftLayer_Account_Shipment::getAllShipmentStatuses
         */
        @ApiMethod
        public List getAllShipmentStatuses();

        /**
         * Retrieve a a list of shipment types.
         *
         * @see SoftLayer_Account_Shipment::getAllShipmentTypes
         */
        @ApiMethod
        public List getAllShipmentTypes();

        /**
         * @see SoftLayer_Account_Shipment::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Shipment getObject();

        /**
         * The account to which the shipment belongs.
         *
         * @see SoftLayer_Account_Shipment::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * The courier handling the shipment.
         *
         * @see SoftLayer_Account_Shipment::getCourier
         */
        @ApiMethod(instanceRequired = true)
        public Courier getCourier();

        /**
         * The employee who created the shipment.
         *
         * @see SoftLayer_Account_Shipment::getCreateEmployee
         */
        @ApiMethod(instanceRequired = true)
        public Employee getCreateEmployee();

        /**
         * The customer user who created the shipment.
         *
         * @see SoftLayer_Account_Shipment::getCreateUser
         */
        @ApiMethod(instanceRequired = true)
        public Customer getCreateUser();

        /**
         * The address at which the shipment is received.
         *
         * @see SoftLayer_Account_Shipment::getDestinationAddress
         */
        @ApiMethod(instanceRequired = true)
        public Address getDestinationAddress();

        /**
         * The employee who last modified the shipment.
         *
         * @see SoftLayer_Account_Shipment::getModifyEmployee
         */
        @ApiMethod(instanceRequired = true)
        public Employee getModifyEmployee();

        /**
         * The customer user who last modified the shipment.
         *
         * @see SoftLayer_Account_Shipment::getModifyUser
         */
        @ApiMethod(instanceRequired = true)
        public Customer getModifyUser();

        /**
         * The address from which the shipment is sent.
         *
         * @see SoftLayer_Account_Shipment::getOriginationAddress
         */
        @ApiMethod(instanceRequired = true)
        public Address getOriginationAddress();

        /**
         * The items in the shipment.
         *
         * @see SoftLayer_Account_Shipment::getShipmentItems
         */
        @ApiMethod(instanceRequired = true)
        public List getShipmentItems();

        /**
         * The status of the shipment.
         *
         * @see SoftLayer_Account_Shipment::getStatus
         */
        @ApiMethod(instanceRequired = true)
        public Status getStatus();

        /**
         * The tracking data for the shipment.
         *
         * @see SoftLayer_Account_Shipment::getTrackingData
         */
        @ApiMethod(instanceRequired = true)
        public List getTrackingData();

        /**
         * The type of shipment (e.g. for Data Transfer Service or Colocation Service).
         *
         * @see SoftLayer_Account_Shipment::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#editObject}
         */
        public Future editObject(Shipment templateObject);

        public Future editObject(Shipment templateObject, ResponseHandler callback);

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

        public Future getAllCouriers(ResponseHandler> callback);

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

        public Future getAllCouriersByType(String courierTypeKeyName, ResponseHandler> callback);

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

        public Future getAllShipmentStatuses(ResponseHandler> callback);

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

        public Future getAllShipmentTypes(ResponseHandler> callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

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

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

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

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

        /**
         * Async version of {@link Service#getDestinationAddress}
         */
        public Future
getDestinationAddress(); /** * Async callback version of {@link Service#getDestinationAddress} */ public Future getDestinationAddress(ResponseHandler
callback); /** * Async version of {@link Service#getModifyEmployee} */ public Future getModifyEmployee(); /** * Async callback version of {@link Service#getModifyEmployee} */ public Future getModifyEmployee(ResponseHandler callback); /** * Async version of {@link Service#getModifyUser} */ public Future getModifyUser(); /** * Async callback version of {@link Service#getModifyUser} */ public Future getModifyUser(ResponseHandler callback); /** * Async version of {@link Service#getOriginationAddress} */ public Future
getOriginationAddress(); /** * Async callback version of {@link Service#getOriginationAddress} */ public Future getOriginationAddress(ResponseHandler
callback); /** * Async version of {@link Service#getShipmentItems} */ public Future> getShipmentItems(); /** * Async callback version of {@link Service#getShipmentItems} */ public Future getShipmentItems(ResponseHandler> callback); /** * Async version of {@link Service#getStatus} */ public Future getStatus(); /** * Async callback version of {@link Service#getStatus} */ public Future getStatus(ResponseHandler callback); /** * Async version of {@link Service#getTrackingData} */ public Future> getTrackingData(); /** * Async callback version of {@link Service#getTrackingData} */ public Future getTrackingData(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.Account.Mask account() { return withSubMask("account", com.softlayer.api.service.Account.Mask.class); } public com.softlayer.api.service.auxiliary.shipping.Courier.Mask courier() { return withSubMask("courier", com.softlayer.api.service.auxiliary.shipping.Courier.Mask.class); } public com.softlayer.api.service.user.Employee.Mask createEmployee() { return withSubMask("createEmployee", com.softlayer.api.service.user.Employee.Mask.class); } public com.softlayer.api.service.user.Customer.Mask createUser() { return withSubMask("createUser", com.softlayer.api.service.user.Customer.Mask.class); } public Address.Mask destinationAddress() { return withSubMask("destinationAddress", Address.Mask.class); } public com.softlayer.api.service.user.Employee.Mask modifyEmployee() { return withSubMask("modifyEmployee", com.softlayer.api.service.user.Employee.Mask.class); } public com.softlayer.api.service.user.Customer.Mask modifyUser() { return withSubMask("modifyUser", com.softlayer.api.service.user.Customer.Mask.class); } public Address.Mask originationAddress() { return withSubMask("originationAddress", Address.Mask.class); } public com.softlayer.api.service.account.shipment.Item.Mask shipmentItems() { return withSubMask("shipmentItems", com.softlayer.api.service.account.shipment.Item.Mask.class); } public com.softlayer.api.service.account.shipment.Status.Mask status() { return withSubMask("status", com.softlayer.api.service.account.shipment.Status.Mask.class); } public com.softlayer.api.service.account.shipment.tracking.Data.Mask trackingData() { return withSubMask("trackingData", com.softlayer.api.service.account.shipment.tracking.Data.Mask.class); } public com.softlayer.api.service.account.shipment.Type.Mask type() { return withSubMask("type", com.softlayer.api.service.account.shipment.Type.Mask.class); } public Mask accountId() { withLocalProperty("accountId"); return this; } public Mask courierId() { withLocalProperty("courierId"); return this; } public Mask courierName() { withLocalProperty("courierName"); return this; } public Mask createUserId() { withLocalProperty("createUserId"); return this; } public Mask destinationAddressId() { withLocalProperty("destinationAddressId"); return this; } public Mask destinationDate() { withLocalProperty("destinationDate"); return this; } public Mask id() { withLocalProperty("id"); return this; } public Mask modifyUserId() { withLocalProperty("modifyUserId"); return this; } public Mask note() { withLocalProperty("note"); return this; } public Mask originationAddressId() { withLocalProperty("originationAddressId"); return this; } public Mask originationDate() { withLocalProperty("originationDate"); return this; } public Mask statusId() { withLocalProperty("statusId"); return this; } public Mask typeId() { withLocalProperty("typeId"); return this; } public Mask shipmentItemCount() { withLocalProperty("shipmentItemCount"); return this; } public Mask trackingDataCount() { withLocalProperty("trackingDataCount"); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy