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

com.softlayer.api.service.billing.item.cancellation.Reason Maven / Gradle / Ivy

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

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.billing.Item;
import com.softlayer.api.service.billing.item.cancellation.reason.Category;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Billing_Item_Cancellation_Reason data type contains cancellation reasons. 
 *
 * @see SoftLayer_Billing_Item_Cancellation_Reason
 */
@ApiType("SoftLayer_Billing_Item_Cancellation_Reason")
public class Reason extends Entity {

    /**
     * An billing cancellation reason category.
     */
    @ApiProperty
    protected Category billingCancellationReasonCategory;

    public Category getBillingCancellationReasonCategory() {
        return billingCancellationReasonCategory;
    }

    public void setBillingCancellationReasonCategory(Category billingCancellationReasonCategory) {
        this.billingCancellationReasonCategory = billingCancellationReasonCategory;
    }

    /**
     * The corresponding billing items having the specific cancellation reason.
     */
    @ApiProperty
    protected List billingItems;

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

    @ApiProperty
    protected String translatedReason;

    public String getTranslatedReason() {
        return translatedReason;
    }

    public void setTranslatedReason(String translatedReason) {
        this.translatedReason = translatedReason;
    }

    /**
     * A cancel reason category internal identifier.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long billingCancelReasonCategoryId;

    public Long getBillingCancelReasonCategoryId() {
        return billingCancelReasonCategoryId;
    }

    public void setBillingCancelReasonCategoryId(Long billingCancelReasonCategoryId) {
        billingCancelReasonCategoryIdSpecified = true;
        this.billingCancelReasonCategoryId = billingCancelReasonCategoryId;
    }

    protected boolean billingCancelReasonCategoryIdSpecified;

    public boolean isBillingCancelReasonCategoryIdSpecified() {
        return billingCancelReasonCategoryIdSpecified;
    }

    public void unsetBillingCancelReasonCategoryId() {
        billingCancelReasonCategoryId = null;
        billingCancelReasonCategoryIdSpecified = false;
    }

    /**
     * A reason 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;
    }

    /**
     * A standardized reason internal identifier.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String keyName;

    public String getKeyName() {
        return keyName;
    }

    public void setKeyName(String keyName) {
        keyNameSpecified = true;
        this.keyName = keyName;
    }

    protected boolean keyNameSpecified;

    public boolean isKeyNameSpecified() {
        return keyNameSpecified;
    }

    public void unsetKeyName() {
        keyName = null;
        keyNameSpecified = false;
    }

    /**
     * The descriptoin of the reason
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String reason;

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        reasonSpecified = true;
        this.reason = reason;
    }

    protected boolean reasonSpecified;

    public boolean isReasonSpecified() {
        return reasonSpecified;
    }

    public void unsetReason() {
        reason = null;
        reasonSpecified = false;
    }

    /**
     * A count of the corresponding billing items having the specific cancellation reason.
     */
    @ApiProperty
    protected Long billingItemCount;

    public Long getBillingItemCount() {
        return billingItemCount;
    }

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

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

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

        /**
         * getAllCancellationReasons() retrieves a list of all cancellation reasons that a server/service may be assigned to. 
         *
         * @see SoftLayer_Billing_Item_Cancellation_Reason::getAllCancellationReasons
         */
        @ApiMethod
        public List getAllCancellationReasons();

        /**
         * @see SoftLayer_Billing_Item_Cancellation_Reason::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Reason getObject();

        /**
         * An billing cancellation reason category.
         *
         * @see SoftLayer_Billing_Item_Cancellation_Reason::getBillingCancellationReasonCategory
         */
        @ApiMethod(instanceRequired = true)
        public Category getBillingCancellationReasonCategory();

        /**
         * The corresponding billing items having the specific cancellation reason.
         *
         * @see SoftLayer_Billing_Item_Cancellation_Reason::getBillingItems
         */
        @ApiMethod(instanceRequired = true)
        public List getBillingItems();

        /**
         * @see SoftLayer_Billing_Item_Cancellation_Reason::getTranslatedReason
         */
        @ApiMethod(instanceRequired = true)
        public String getTranslatedReason();

    }

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

        public Future getAllCancellationReasons(ResponseHandler> callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

    }

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

        public com.softlayer.api.service.billing.item.cancellation.reason.Category.Mask billingCancellationReasonCategory() {
            return withSubMask("billingCancellationReasonCategory", com.softlayer.api.service.billing.item.cancellation.reason.Category.Mask.class);
        }

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy