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

com.softlayer.api.service.product.upgrade.Request Maven / Gradle / Ivy

The newest version!
package com.softlayer.api.service.product.upgrade;

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.Hardware;
import com.softlayer.api.service.Ticket;
import com.softlayer.api.service.billing.Invoice;
import com.softlayer.api.service.billing.Order;
import com.softlayer.api.service.product.upgrade.request.Status;
import com.softlayer.api.service.user.Customer;
import com.softlayer.api.service.virtual.Guest;
import java.math.BigDecimal;
import java.util.GregorianCalendar;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Product_Upgrade_Request data type contains general information relating to a hardware, virtual server, or service upgrade. It also relates a [[SoftLayer_Billing_Order]] to a [[SoftLayer_Ticket]]. 
 *
 * @see SoftLayer_Product_Upgrade_Request
 */
@ApiType("SoftLayer_Product_Upgrade_Request")
public class Request extends Entity {

    /**
     * The account that an order belongs to
     */
    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

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

    /**
     * Indicates that the upgrade request has completed or has been cancelled.
     */
    @ApiProperty
    protected Boolean completedFlag;

    public Boolean getCompletedFlag() {
        return completedFlag;
    }

    public void setCompletedFlag(Boolean completedFlag) {
        this.completedFlag = completedFlag;
    }

    /**
     * This is the invoice associated with the upgrade request. For hourly servers or services, an invoice will not be available.
     */
    @ApiProperty
    protected Invoice invoice;

    public Invoice getInvoice() {
        return invoice;
    }

    public void setInvoice(Invoice invoice) {
        this.invoice = invoice;
    }

    /**
     * An order record associated to the upgrade request
     */
    @ApiProperty
    protected Order order;

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    /**
     * A server object associated with the upgrade request if any.
     */
    @ApiProperty
    protected Hardware server;

    public Hardware getServer() {
        return server;
    }

    public void setServer(Hardware server) {
        this.server = server;
    }

    /**
     * The current status of the upgrade request.
     */
    @ApiProperty
    protected Status status;

    public Status getStatus() {
        return status;
    }

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

    /**
     * The ticket that is used to coordinate the upgrade process.
     */
    @ApiProperty
    protected Ticket ticket;

    public Ticket getTicket() {
        return ticket;
    }

    public void setTicket(Ticket ticket) {
        this.ticket = ticket;
    }

    /**
     * The user that placed the order.
     */
    @ApiProperty
    protected Customer user;

    public Customer getUser() {
        return user;
    }

    public void setUser(Customer user) {
        this.user = user;
    }

    /**
     * A virtual server object associated with the upgrade request if any.
     */
    @ApiProperty
    protected Guest virtualGuest;

    public Guest getVirtualGuest() {
        return virtualGuest;
    }

    public void setVirtualGuest(Guest virtualGuest) {
        this.virtualGuest = virtualGuest;
    }

    /**
     * The unique internal id of a SoftLayer account
     */
    @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 date an upgrade request 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;
    }

    /**
     * The unique internal id of the last modified user
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long employeeId;

    public Long getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(Long employeeId) {
        employeeIdSpecified = true;
        this.employeeId = employeeId;
    }

    protected boolean employeeIdSpecified;

    public boolean isEmployeeIdSpecified() {
        return employeeIdSpecified;
    }

    public void unsetEmployeeId() {
        employeeId = null;
        employeeIdSpecified = false;
    }

    /**
     * The unique internal id of the virtual server that an upgrade will be done
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long guestId;

    public Long getGuestId() {
        return guestId;
    }

    public void setGuestId(Long guestId) {
        guestIdSpecified = true;
        this.guestId = guestId;
    }

    protected boolean guestIdSpecified;

    public boolean isGuestIdSpecified() {
        return guestIdSpecified;
    }

    public void unsetGuestId() {
        guestId = null;
        guestIdSpecified = false;
    }

    /**
     * The unique internal id of the hardware that an upgrade will be done
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long hardwareId;

    public Long getHardwareId() {
        return hardwareId;
    }

    public void setHardwareId(Long hardwareId) {
        hardwareIdSpecified = true;
        this.hardwareId = hardwareId;
    }

    protected boolean hardwareIdSpecified;

    public boolean isHardwareIdSpecified() {
        return hardwareIdSpecified;
    }

    public void unsetHardwareId() {
        hardwareId = null;
        hardwareIdSpecified = false;
    }

    /**
     * An upgrade request'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 time that system admin starts working on the order item.  This is used for upgrade orders.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar maintenanceStartTimeUtc;

    public GregorianCalendar getMaintenanceStartTimeUtc() {
        return maintenanceStartTimeUtc;
    }

    public void setMaintenanceStartTimeUtc(GregorianCalendar maintenanceStartTimeUtc) {
        maintenanceStartTimeUtcSpecified = true;
        this.maintenanceStartTimeUtc = maintenanceStartTimeUtc;
    }

    protected boolean maintenanceStartTimeUtcSpecified;

    public boolean isMaintenanceStartTimeUtcSpecified() {
        return maintenanceStartTimeUtcSpecified;
    }

    public void unsetMaintenanceStartTimeUtc() {
        maintenanceStartTimeUtc = null;
        maintenanceStartTimeUtcSpecified = false;
    }

    /**
     * The date an upgrade request 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;
    }

    /**
     * The unique internal id of the order that an upgrade request is related to
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long orderId;

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        orderIdSpecified = true;
        this.orderId = orderId;
    }

    protected boolean orderIdSpecified;

    public boolean isOrderIdSpecified() {
        return orderIdSpecified;
    }

    public void unsetOrderId() {
        orderId = null;
        orderIdSpecified = false;
    }

    /**
     * The total amount of fees
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected BigDecimal orderTotal;

    public BigDecimal getOrderTotal() {
        return orderTotal;
    }

    public void setOrderTotal(BigDecimal orderTotal) {
        orderTotalSpecified = true;
        this.orderTotal = orderTotal;
    }

    protected boolean orderTotalSpecified;

    public boolean isOrderTotalSpecified() {
        return orderTotalSpecified;
    }

    public void unsetOrderTotal() {
        orderTotal = null;
        orderTotalSpecified = false;
    }

    /**
     * The prorated total amount of recurring fees
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected BigDecimal proratedTotal;

    public BigDecimal getProratedTotal() {
        return proratedTotal;
    }

    public void setProratedTotal(BigDecimal proratedTotal) {
        proratedTotalSpecified = true;
        this.proratedTotal = proratedTotal;
    }

    protected boolean proratedTotalSpecified;

    public boolean isProratedTotalSpecified() {
        return proratedTotalSpecified;
    }

    public void unsetProratedTotal() {
        proratedTotal = null;
        proratedTotalSpecified = false;
    }

    /**
     * The unique internal id of an upgrade status
     */
    @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 unique internal id of the ticket related to an upgrade request
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long ticketId;

    public Long getTicketId() {
        return ticketId;
    }

    public void setTicketId(Long ticketId) {
        ticketIdSpecified = true;
        this.ticketId = ticketId;
    }

    protected boolean ticketIdSpecified;

    public boolean isTicketIdSpecified() {
        return ticketIdSpecified;
    }

    public void unsetTicketId() {
        ticketId = null;
        ticketIdSpecified = false;
    }

    /**
     * The unique internal id of the customer who place the order
     */
    @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;
    }

    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_Product_Upgrade_Request tracks the progress of an upgrade, and allows modification of the maintenance window and other information. 
     *
     * @see SoftLayer_Product_Upgrade_Request
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Product_Upgrade_Request")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * When a change is made to an upgrade by Sales, this method will approve the changes that were made. A customer must acknowledge the change and approve it so that the upgrade request can proceed. 
         *
         * @see SoftLayer_Product_Upgrade_Request::approveChanges
         */
        @ApiMethod(instanceRequired = true)
        public Boolean approveChanges();

        /**
         * getObject retrieves a SoftLayer_Product_Upgrade_Request object on your account whose ID corresponds to the ID of the init parameter passed to the SoftLayer_Product_Upgrade_Request service. 
         *
         * @see SoftLayer_Product_Upgrade_Request::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Request getObject();

        /**
         * In case an upgrade cannot be performed, the maintenance window needs to be updated to a future date. 
         *
         * @see SoftLayer_Product_Upgrade_Request::updateMaintenanceWindow
         */
        @ApiMethod(instanceRequired = true)
        public Boolean updateMaintenanceWindow(GregorianCalendar maintenanceStartTime, Long maintenanceWindowId);

        /**
         * The account that an order belongs to
         *
         * @see SoftLayer_Product_Upgrade_Request::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * Indicates that the upgrade request has completed or has been cancelled.
         *
         * @see SoftLayer_Product_Upgrade_Request::getCompletedFlag
         */
        @ApiMethod(instanceRequired = true)
        public Boolean getCompletedFlag();

        /**
         * This is the invoice associated with the upgrade request. For hourly servers or services, an invoice will not be available.
         *
         * @see SoftLayer_Product_Upgrade_Request::getInvoice
         */
        @ApiMethod(instanceRequired = true)
        public Invoice getInvoice();

        /**
         * An order record associated to the upgrade request
         *
         * @see SoftLayer_Product_Upgrade_Request::getOrder
         */
        @ApiMethod(instanceRequired = true)
        public Order getOrder();

        /**
         * A server object associated with the upgrade request if any.
         *
         * @see SoftLayer_Product_Upgrade_Request::getServer
         */
        @ApiMethod(instanceRequired = true)
        public Hardware getServer();

        /**
         * The current status of the upgrade request.
         *
         * @see SoftLayer_Product_Upgrade_Request::getStatus
         */
        @ApiMethod(instanceRequired = true)
        public Status getStatus();

        /**
         * The ticket that is used to coordinate the upgrade process.
         *
         * @see SoftLayer_Product_Upgrade_Request::getTicket
         */
        @ApiMethod(instanceRequired = true)
        public Ticket getTicket();

        /**
         * The user that placed the order.
         *
         * @see SoftLayer_Product_Upgrade_Request::getUser
         */
        @ApiMethod(instanceRequired = true)
        public Customer getUser();

        /**
         * A virtual server object associated with the upgrade request if any.
         *
         * @see SoftLayer_Product_Upgrade_Request::getVirtualGuest
         */
        @ApiMethod(instanceRequired = true)
        public Guest getVirtualGuest();

    }

    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#approveChanges}
         */
        public Future approveChanges();

        public Future approveChanges(ResponseHandler callback);

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

        public Future getObject(ResponseHandler callback);

        /**
         * Async version of {@link Service#updateMaintenanceWindow}
         */
        public Future updateMaintenanceWindow(GregorianCalendar maintenanceStartTime, Long maintenanceWindowId);

        public Future updateMaintenanceWindow(GregorianCalendar maintenanceStartTime, Long maintenanceWindowId, 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#getCompletedFlag}
         */
        public Future getCompletedFlag();

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

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

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

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

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

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

        /**
         * Async callback version of {@link Service#getServer}
         */
        public Future getServer(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#getTicket}
         */
        public Future getTicket();

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

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

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

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

        /**
         * Async callback version of {@link Service#getVirtualGuest}
         */
        public Future getVirtualGuest(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 Mask completedFlag() {
            withLocalProperty("completedFlag");
            return this;
        }

        public com.softlayer.api.service.billing.Invoice.Mask invoice() {
            return withSubMask("invoice", com.softlayer.api.service.billing.Invoice.Mask.class);
        }

        public com.softlayer.api.service.billing.Order.Mask order() {
            return withSubMask("order", com.softlayer.api.service.billing.Order.Mask.class);
        }

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

        public com.softlayer.api.service.product.upgrade.request.Status.Mask status() {
            return withSubMask("status", com.softlayer.api.service.product.upgrade.request.Status.Mask.class);
        }

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

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

        public com.softlayer.api.service.virtual.Guest.Mask virtualGuest() {
            return withSubMask("virtualGuest", com.softlayer.api.service.virtual.Guest.Mask.class);
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy