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

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

The 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.MasterServiceAgreement;
import com.softlayer.api.service.account.agreement.Status;
import com.softlayer.api.service.account.agreement.Type;
import com.softlayer.api.service.billing.Item;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * @see SoftLayer_Account_Agreement
 */
@ApiType("SoftLayer_Account_Agreement")
public class Agreement extends Entity {

    @ApiProperty
    protected Account account;

    public Account getAccount() {
        return account;
    }

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

    /**
     * The type of agreement.
     */
    @ApiProperty
    protected Type agreementType;

    public Type getAgreementType() {
        return agreementType;
    }

    public void setAgreementType(Type agreementType) {
        this.agreementType = agreementType;
    }

    /**
     * The files attached to an agreement.
     */
    @ApiProperty
    protected List attachedBillingAgreementFiles;

    public List getAttachedBillingAgreementFiles() {
        if (attachedBillingAgreementFiles == null) {
            attachedBillingAgreementFiles = new ArrayList();
        }
        return attachedBillingAgreementFiles;
    }

    /**
     * The billing items associated with an agreement.
     */
    @ApiProperty
    protected List billingItems;

    public List getBillingItems() {
        if (billingItems == null) {
            billingItems = new ArrayList();
        }
        return billingItems;
    }

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

    public Status getStatus() {
        return status;
    }

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

    /**
     * The top level billing item associated with an agreement.
     */
    @ApiProperty
    protected List topLevelBillingItems;

    public List getTopLevelBillingItems() {
        if (topLevelBillingItems == null) {
            topLevelBillingItems = new ArrayList();
        }
        return topLevelBillingItems;
    }

    /**
     * The type of agreement identifier.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long agreementTypeId;

    public Long getAgreementTypeId() {
        return agreementTypeId;
    }

    public void setAgreementTypeId(Long agreementTypeId) {
        agreementTypeIdSpecified = true;
        this.agreementTypeId = agreementTypeId;
    }

    protected boolean agreementTypeIdSpecified;

    public boolean isAgreementTypeIdSpecified() {
        return agreementTypeIdSpecified;
    }

    public void unsetAgreementTypeId() {
        agreementTypeId = null;
        agreementTypeIdSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected Long autoRenew;

    public Long getAutoRenew() {
        return autoRenew;
    }

    public void setAutoRenew(Long autoRenew) {
        autoRenewSpecified = true;
        this.autoRenew = autoRenew;
    }

    protected boolean autoRenewSpecified;

    public boolean isAutoRenewSpecified() {
        return autoRenewSpecified;
    }

    public void unsetAutoRenew() {
        autoRenew = null;
        autoRenewSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected Long cancellationFee;

    public Long getCancellationFee() {
        return cancellationFee;
    }

    public void setCancellationFee(Long cancellationFee) {
        cancellationFeeSpecified = true;
        this.cancellationFee = cancellationFee;
    }

    protected boolean cancellationFeeSpecified;

    public boolean isCancellationFeeSpecified() {
        return cancellationFeeSpecified;
    }

    public void unsetCancellationFee() {
        cancellationFee = null;
        cancellationFeeSpecified = false;
    }

    /**
     * The date an agreement 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 duration in months of an agreement.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long durationMonths;

    public Long getDurationMonths() {
        return durationMonths;
    }

    public void setDurationMonths(Long durationMonths) {
        durationMonthsSpecified = true;
        this.durationMonths = durationMonths;
    }

    protected boolean durationMonthsSpecified;

    public boolean isDurationMonthsSpecified() {
        return durationMonthsSpecified;
    }

    public void unsetDurationMonths() {
        durationMonths = null;
        durationMonthsSpecified = false;
    }

    /**
     * The end date of an agreement.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar endDate;

    public GregorianCalendar getEndDate() {
        return endDate;
    }

    public void setEndDate(GregorianCalendar endDate) {
        endDateSpecified = true;
        this.endDate = endDate;
    }

    protected boolean endDateSpecified;

    public boolean isEndDateSpecified() {
        return endDateSpecified;
    }

    public void unsetEndDate() {
        endDate = null;
        endDateSpecified = false;
    }

    /**
     * An agreement'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 effective start date of an agreement.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar startDate;

    public GregorianCalendar getStartDate() {
        return startDate;
    }

    public void setStartDate(GregorianCalendar startDate) {
        startDateSpecified = true;
        this.startDate = startDate;
    }

    protected boolean startDateSpecified;

    public boolean isStartDateSpecified() {
        return startDateSpecified;
    }

    public void unsetStartDate() {
        startDate = null;
        startDateSpecified = false;
    }

    /**
     * The status identifier for an agreement.
     */
    @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 title of an agreement.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String title;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        titleSpecified = true;
        this.title = title;
    }

    protected boolean titleSpecified;

    public boolean isTitleSpecified() {
        return titleSpecified;
    }

    public void unsetTitle() {
        title = null;
        titleSpecified = false;
    }

    /**
     * A count of the files attached to an agreement.
     */
    @ApiProperty
    protected Long attachedBillingAgreementFileCount;

    public Long getAttachedBillingAgreementFileCount() {
        return attachedBillingAgreementFileCount;
    }

    public void setAttachedBillingAgreementFileCount(Long attachedBillingAgreementFileCount) {
        this.attachedBillingAgreementFileCount = attachedBillingAgreementFileCount;
    }

    /**
     * A count of the billing items associated with an agreement.
     */
    @ApiProperty
    protected Long billingItemCount;

    public Long getBillingItemCount() {
        return billingItemCount;
    }

    public void setBillingItemCount(Long billingItemCount) {
        this.billingItemCount = billingItemCount;
    }

    /**
     * A count of the top level billing item associated with an agreement.
     */
    @ApiProperty
    protected Long topLevelBillingItemCount;

    public Long getTopLevelBillingItemCount() {
        return topLevelBillingItemCount;
    }

    public void setTopLevelBillingItemCount(Long topLevelBillingItemCount) {
        this.topLevelBillingItemCount = topLevelBillingItemCount;
    }

    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_Account_Agreement
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Account_Agreement")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * @see SoftLayer_Account_Agreement::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Agreement getObject();

        /**
         * @see SoftLayer_Account_Agreement::getAccount
         */
        @ApiMethod(instanceRequired = true)
        public Account getAccount();

        /**
         * The type of agreement.
         *
         * @see SoftLayer_Account_Agreement::getAgreementType
         */
        @ApiMethod(instanceRequired = true)
        public Type getAgreementType();

        /**
         * The files attached to an agreement.
         *
         * @see SoftLayer_Account_Agreement::getAttachedBillingAgreementFiles
         */
        @ApiMethod(instanceRequired = true)
        public List getAttachedBillingAgreementFiles();

        /**
         * The billing items associated with an agreement.
         *
         * @see SoftLayer_Account_Agreement::getBillingItems
         */
        @ApiMethod(instanceRequired = true)
        public List getBillingItems();

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

        /**
         * The top level billing item associated with an agreement.
         *
         * @see SoftLayer_Account_Agreement::getTopLevelBillingItems
         */
        @ApiMethod(instanceRequired = true)
        public List getTopLevelBillingItems();

    }

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

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

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

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

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

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

        /**
         * Async callback version of {@link Service#getTopLevelBillingItems}
         */
        public Future getTopLevelBillingItems(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.account.agreement.Type.Mask agreementType() {
            return withSubMask("agreementType", com.softlayer.api.service.account.agreement.Type.Mask.class);
        }

        public MasterServiceAgreement.Mask attachedBillingAgreementFiles() {
            return withSubMask("attachedBillingAgreementFiles", MasterServiceAgreement.Mask.class);
        }

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

        public com.softlayer.api.service.account.agreement.Status.Mask status() {
            return withSubMask("status", com.softlayer.api.service.account.agreement.Status.Mask.class);
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy