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

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

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

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.Location;
import com.softlayer.api.service.location.group.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Future;

/**
 * @see SoftLayer_Location_Group
 */
@ApiType("SoftLayer_Location_Group")
public class Group extends Entity {

    /**
     * The type for this location group.
     */
    @ApiProperty
    protected Type locationGroupType;

    public Type getLocationGroupType() {
        return locationGroupType;
    }

    public void setLocationGroupType(Type locationGroupType) {
        this.locationGroupType = locationGroupType;
    }

    /**
     * The locations in a group.
     */
    @ApiProperty
    protected List locations;

    public List getLocations() {
        if (locations == null) {
            locations = new ArrayList();
        }
        return locations;
    }

    @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;
    }

    @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;
    }

    @ApiProperty(canBeNullOrNotSet = true)
    protected Long locationGroupTypeId;

    public Long getLocationGroupTypeId() {
        return locationGroupTypeId;
    }

    public void setLocationGroupTypeId(Long locationGroupTypeId) {
        locationGroupTypeIdSpecified = true;
        this.locationGroupTypeId = locationGroupTypeId;
    }

    protected boolean locationGroupTypeIdSpecified;

    public boolean isLocationGroupTypeIdSpecified() {
        return locationGroupTypeIdSpecified;
    }

    public void unsetLocationGroupTypeId() {
        locationGroupTypeId = null;
        locationGroupTypeIdSpecified = false;
    }

    @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 securityLevelId;

    public Long getSecurityLevelId() {
        return securityLevelId;
    }

    public void setSecurityLevelId(Long securityLevelId) {
        securityLevelIdSpecified = true;
        this.securityLevelId = securityLevelId;
    }

    protected boolean securityLevelIdSpecified;

    public boolean isSecurityLevelIdSpecified() {
        return securityLevelIdSpecified;
    }

    public void unsetSecurityLevelId() {
        securityLevelId = null;
        securityLevelIdSpecified = false;
    }

    /**
     * A count of the locations in a group.
     */
    @ApiProperty
    protected Long locationCount;

    public Long getLocationCount() {
        return locationCount;
    }

    public void setLocationCount(Long locationCount) {
        this.locationCount = locationCount;
    }

    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_Location_Group
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Location_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_Location_Group::getAllObjects
         */
        @ApiMethod
        public List getAllObjects();

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

        /**
         * The type for this location group.
         *
         * @see SoftLayer_Location_Group::getLocationGroupType
         */
        @ApiMethod(instanceRequired = true)
        public Type getLocationGroupType();

        /**
         * The locations in a group.
         *
         * @see SoftLayer_Location_Group::getLocations
         */
        @ApiMethod(instanceRequired = true)
        public List getLocations();

    }

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

        public Future getAllObjects(ResponseHandler> callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

    }

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

        public com.softlayer.api.service.location.group.Type.Mask locationGroupType() {
            return withSubMask("locationGroupType", com.softlayer.api.service.location.group.Type.Mask.class);
        }

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy