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

com.softlayer.api.service.resource.Group Maven / Gradle / Ivy

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

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.resource.group.Attribute;
import com.softlayer.api.service.resource.group.Member;
import com.softlayer.api.service.resource.group.Template;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * SoftLayer's resource group service allows users to access a broad overview of the resource group and its members 
 *
 * @see SoftLayer_Resource_Group
 */
@ApiType("SoftLayer_Resource_Group")
public class Group extends Entity {

    /**
     * A resource group's associated group ancestors.
     */
    @ApiProperty
    protected List ancestorGroups;

    public List getAncestorGroups() {
        if (ancestorGroups == null) {
            ancestorGroups = new ArrayList();
        }
        return ancestorGroups;
    }

    /**
     * A resource group's associated attributes.
     */
    @ApiProperty
    protected List attributes;

    public List getAttributes() {
        if (attributes == null) {
            attributes = new ArrayList();
        }
        return attributes;
    }

    /**
     * A resource group's associated hardware members.
     */
    @ApiProperty
    protected List hardwareMembers;

    public List getHardwareMembers() {
        if (hardwareMembers == null) {
            hardwareMembers = new ArrayList();
        }
        return hardwareMembers;
    }

    /**
     * A resource group's associated members.
     */
    @ApiProperty
    protected List members;

    public List getMembers() {
        if (members == null) {
            members = new ArrayList();
        }
        return members;
    }

    /**
     * A resource group's associated root resource group.
     */
    @ApiProperty
    protected Group rootResourceGroup;

    public Group getRootResourceGroup() {
        return rootResourceGroup;
    }

    public void setRootResourceGroup(Group rootResourceGroup) {
        this.rootResourceGroup = rootResourceGroup;
    }

    /**
     * A resource group's associated subnet members.
     */
    @ApiProperty
    protected List subnetMembers;

    public List getSubnetMembers() {
        if (subnetMembers == null) {
            subnetMembers = new ArrayList();
        }
        return subnetMembers;
    }

    /**
     * A resource group's associated template.
     */
    @ApiProperty
    protected Template template;

    public Template getTemplate() {
        return template;
    }

    public void setTemplate(Template template) {
        this.template = template;
    }

    /**
     * A resource group's associated VLAN members.
     */
    @ApiProperty
    protected List vlanMembers;

    public List getVlanMembers() {
        if (vlanMembers == null) {
            vlanMembers = new ArrayList();
        }
        return vlanMembers;
    }

    /**
     * A resource group's creation date.
     */
    @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 resource group's description.
     */
    @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;
    }

    /**
     * A resource group's ID.
     */
    @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 resource group's keyname.
     */
    @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;
    }

    /**
     * A resource group's name.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        nameSpecified = true;
        this.name = name;
    }

    protected boolean nameSpecified;

    public boolean isNameSpecified() {
        return nameSpecified;
    }

    public void unsetName() {
        name = null;
        nameSpecified = false;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected Long rootResourceGroupId;

    public Long getRootResourceGroupId() {
        return rootResourceGroupId;
    }

    public void setRootResourceGroupId(Long rootResourceGroupId) {
        rootResourceGroupIdSpecified = true;
        this.rootResourceGroupId = rootResourceGroupId;
    }

    protected boolean rootResourceGroupIdSpecified;

    public boolean isRootResourceGroupIdSpecified() {
        return rootResourceGroupIdSpecified;
    }

    public void unsetRootResourceGroupId() {
        rootResourceGroupId = null;
        rootResourceGroupIdSpecified = false;
    }

    /**
     * A resource group's template ID.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long templateId;

    public Long getTemplateId() {
        return templateId;
    }

    public void setTemplateId(Long templateId) {
        templateIdSpecified = true;
        this.templateId = templateId;
    }

    protected boolean templateIdSpecified;

    public boolean isTemplateIdSpecified() {
        return templateIdSpecified;
    }

    public void unsetTemplateId() {
        templateId = null;
        templateIdSpecified = false;
    }

    /**
     * A count of a resource group's associated group ancestors.
     */
    @ApiProperty
    protected Long ancestorGroupCount;

    public Long getAncestorGroupCount() {
        return ancestorGroupCount;
    }

    public void setAncestorGroupCount(Long ancestorGroupCount) {
        this.ancestorGroupCount = ancestorGroupCount;
    }

    /**
     * A count of a resource group's associated attributes.
     */
    @ApiProperty
    protected Long attributeCount;

    public Long getAttributeCount() {
        return attributeCount;
    }

    public void setAttributeCount(Long attributeCount) {
        this.attributeCount = attributeCount;
    }

    /**
     * A count of a resource group's associated hardware members.
     */
    @ApiProperty
    protected Long hardwareMemberCount;

    public Long getHardwareMemberCount() {
        return hardwareMemberCount;
    }

    public void setHardwareMemberCount(Long hardwareMemberCount) {
        this.hardwareMemberCount = hardwareMemberCount;
    }

    /**
     * A count of a resource group's associated members.
     */
    @ApiProperty
    protected Long memberCount;

    public Long getMemberCount() {
        return memberCount;
    }

    public void setMemberCount(Long memberCount) {
        this.memberCount = memberCount;
    }

    /**
     * A count of a resource group's associated subnet members.
     */
    @ApiProperty
    protected Long subnetMemberCount;

    public Long getSubnetMemberCount() {
        return subnetMemberCount;
    }

    public void setSubnetMemberCount(Long subnetMemberCount) {
        this.subnetMemberCount = subnetMemberCount;
    }

    /**
     * A count of a resource group's associated VLAN members.
     */
    @ApiProperty
    protected Long vlanMemberCount;

    public Long getVlanMemberCount() {
        return vlanMemberCount;
    }

    public void setVlanMemberCount(Long vlanMemberCount) {
        this.vlanMemberCount = vlanMemberCount;
    }

    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 resource group service allows users to access a broad overview of the resource group and its members 
     *
     * @see SoftLayer_Resource_Group
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Resource_Group")
    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_Resource_Group::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(Group templateObject);

        /**
         * @see SoftLayer_Resource_Group::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Group getObject();

        /**
         * A resource group's associated group ancestors.
         *
         * @see SoftLayer_Resource_Group::getAncestorGroups
         */
        @ApiMethod(instanceRequired = true)
        public List getAncestorGroups();

        /**
         * A resource group's associated attributes.
         *
         * @see SoftLayer_Resource_Group::getAttributes
         */
        @ApiMethod(instanceRequired = true)
        public List getAttributes();

        /**
         * A resource group's associated hardware members.
         *
         * @see SoftLayer_Resource_Group::getHardwareMembers
         */
        @ApiMethod(instanceRequired = true)
        public List getHardwareMembers();

        /**
         * A resource group's associated members.
         *
         * @see SoftLayer_Resource_Group::getMembers
         */
        @ApiMethod(instanceRequired = true)
        public List getMembers();

        /**
         * A resource group's associated root resource group.
         *
         * @see SoftLayer_Resource_Group::getRootResourceGroup
         */
        @ApiMethod(instanceRequired = true)
        public Group getRootResourceGroup();

        /**
         * A resource group's associated subnet members.
         *
         * @see SoftLayer_Resource_Group::getSubnetMembers
         */
        @ApiMethod(instanceRequired = true)
        public List getSubnetMembers();

        /**
         * A resource group's associated template.
         *
         * @see SoftLayer_Resource_Group::getTemplate
         */
        @ApiMethod(instanceRequired = true)
        public Template getTemplate();

        /**
         * A resource group's associated VLAN members.
         *
         * @see SoftLayer_Resource_Group::getVlanMembers
         */
        @ApiMethod(instanceRequired = true)
        public List getVlanMembers();

    }

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

        public Future editObject(Group templateObject, ResponseHandler callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

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

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

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

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

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

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

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

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

        /**
         * Async version of {@link Service#getTemplate}
         */
        public Future