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

com.softlayer.api.service.account.shipment.Item Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.account.shipment;

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.account.Shipment;
import com.softlayer.api.service.account.shipment.item.Type;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Account_Shipment_Item data type contains information relating to a shipment's item. 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_Item
 */
@ApiType("SoftLayer_Account_Shipment_Item")
public class Item extends Entity {

    /**
     * The shipment to which this item belongs.
     */
    @ApiProperty
    protected Shipment shipment;

    public Shipment getShipment() {
        return shipment;
    }

    public void setShipment(Shipment shipment) {
        this.shipment = shipment;
    }

    /**
     * The type of this shipment item.
     */
    @ApiProperty
    protected Type shipmentItemType;

    public Type getShipmentItemType() {
        return shipmentItemType;
    }

    public void setShipmentItemType(Type shipmentItemType) {
        this.shipmentItemType = shipmentItemType;
    }

    @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 description of the shipping item.
     */
    @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;
    }

    /**
     * The unique id of the shipping item.
     */
    @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 package id of the shipping item.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long packageId;

    public Long getPackageId() {
        return packageId;
    }

    public void setPackageId(Long packageId) {
        packageIdSpecified = true;
        this.packageId = packageId;
    }

    protected boolean packageIdSpecified;

    public boolean isPackageIdSpecified() {
        return packageIdSpecified;
    }

    public void unsetPackageId() {
        packageId = null;
        packageIdSpecified = false;
    }

    /**
     * The shipment id of the shipping item.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long shipmentId;

    public Long getShipmentId() {
        return shipmentId;
    }

    public void setShipmentId(Long shipmentId) {
        shipmentIdSpecified = true;
        this.shipmentId = shipmentId;
    }

    protected boolean shipmentIdSpecified;

    public boolean isShipmentIdSpecified() {
        return shipmentIdSpecified;
    }

    public void unsetShipmentId() {
        shipmentId = null;
        shipmentIdSpecified = false;
    }

    /**
     * The item id of the shipping item.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long shipmentItemId;

    public Long getShipmentItemId() {
        return shipmentItemId;
    }

    public void setShipmentItemId(Long shipmentItemId) {
        shipmentItemIdSpecified = true;
        this.shipmentItemId = shipmentItemId;
    }

    protected boolean shipmentItemIdSpecified;

    public boolean isShipmentItemIdSpecified() {
        return shipmentItemIdSpecified;
    }

    public void unsetShipmentItemId() {
        shipmentItemId = null;
        shipmentItemIdSpecified = false;
    }

    /**
     * The item type id of the shipping item.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long shipmentItemTypeId;

    public Long getShipmentItemTypeId() {
        return shipmentItemTypeId;
    }

    public void setShipmentItemTypeId(Long shipmentItemTypeId) {
        shipmentItemTypeIdSpecified = true;
        this.shipmentItemTypeId = shipmentItemTypeId;
    }

    protected boolean shipmentItemTypeIdSpecified;

    public boolean isShipmentItemTypeIdSpecified() {
        return shipmentItemTypeIdSpecified;
    }

    public void unsetShipmentItemTypeId() {
        shipmentItemTypeId = null;
        shipmentItemTypeIdSpecified = 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's shipment item service allows the user to access information pertaining to a shipment's item from the user to SoftLayer or from SoftLayer to the user. 
     *
     * @see SoftLayer_Account_Shipment_Item
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Account_Shipment_Item")
    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_Item object. 
         *
         * @see SoftLayer_Account_Shipment_Item::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(Item templateObject);

        /**
         * @see SoftLayer_Account_Shipment_Item::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Item getObject();

        /**
         * The shipment to which this item belongs.
         *
         * @see SoftLayer_Account_Shipment_Item::getShipment
         */
        @ApiMethod(instanceRequired = true)
        public Shipment getShipment();

        /**
         * The type of this shipment item.
         *
         * @see SoftLayer_Account_Shipment_Item::getShipmentItemType
         */
        @ApiMethod(instanceRequired = true)
        public Type getShipmentItemType();

    }

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

        public Future editObject(Item templateObject, ResponseHandler callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

    }

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

        public com.softlayer.api.service.account.Shipment.Mask shipment() {
            return withSubMask("shipment", com.softlayer.api.service.account.Shipment.Mask.class);
        }

        public com.softlayer.api.service.account.shipment.item.Type.Mask shipmentItemType() {
            return withSubMask("shipmentItemType", com.softlayer.api.service.account.shipment.item.Type.Mask.class);
        }

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy