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

com.softlayer.api.service.account.Affiliation 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 java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * This service allows for a unique identifier to be associated to an existing customer account. 
 *
 * @see SoftLayer_Account_Affiliation
 */
@ApiType("SoftLayer_Account_Affiliation")
public class Affiliation extends Entity {

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

    public Account getAccount() {
        return account;
    }

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

    /**
     * A customer account's internal identifier. 
     */
    @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;
    }

    /**
     * An affiliate identifier associated with the customer account. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String affiliateId;

    public String getAffiliateId() {
        return affiliateId;
    }

    public void setAffiliateId(String affiliateId) {
        affiliateIdSpecified = true;
        this.affiliateId = affiliateId;
    }

    protected boolean affiliateIdSpecified;

    public boolean isAffiliateIdSpecified() {
        return affiliateIdSpecified;
    }

    public void unsetAffiliateId() {
        affiliateId = null;
        affiliateIdSpecified = false;
    }

    /**
     * The date an account affiliation 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;
    }

    /**
     * A customer affiliation 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 date an account affiliation 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;
    }

    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_Affiliation
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Account_Affiliation")
    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 affiliation to associate with an existing account. 
         *
         * @see SoftLayer_Account_Affiliation::createObject
         */
        @ApiMethod
        public Affiliation createObject(Affiliation templateObject);

        /**
         * deleteObject permanently removes an account affiliation 
         *
         * @see SoftLayer_Account_Affiliation::deleteObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean deleteObject();

        /**
         * Edit an affiliation that is associated to an existing account. 
         *
         * @see SoftLayer_Account_Affiliation::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(Affiliation templateObject);

        /**
         * Get account affiliation information associated with affiliate id. 
         *
         * @see SoftLayer_Account_Affiliation::getAccountAffiliationsByAffiliateId
         */
        @ApiMethod
        public List getAccountAffiliationsByAffiliateId(String affiliateId);

        /**
         * @see SoftLayer_Account_Affiliation::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Affiliation getObject();

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

    }

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

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

        public Future editObject(Affiliation templateObject, ResponseHandler callback);

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

        public Future getAccountAffiliationsByAffiliateId(String affiliateId, 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);

    }

    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 accountId() {
            withLocalProperty("accountId");
            return this;
        }

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy