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

com.softlayer.api.service.user.customer.customerpermission.Permission Maven / Gradle / Ivy

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

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 java.util.List;
import java.util.concurrent.Future;

/**
 * Each SoftLayer portal account is assigned a series of permissions that determine what access the user has to functions within the SoftLayer customer portal. This status is reflected in the SoftLayer_User_Customer_Status data type. Permissions differ from user status in that user status applies globally to the portal while user permissions are applied to specific portal functions. 
 *
 * @see SoftLayer_User_Customer_CustomerPermission_Permission
 */
@ApiType("SoftLayer_User_Customer_CustomerPermission_Permission")
public class Permission extends Entity {

    /**
     * A user permission's short name.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String key;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        keySpecified = true;
        this.key = key;
    }

    protected boolean keySpecified;

    public boolean isKeySpecified() {
        return keySpecified;
    }

    public void unsetKey() {
        key = null;
        keySpecified = false;
    }

    /**
     * A user permission's key name.
     */
    @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 user permission'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;
    }

    public static Service service(ApiClient client) {
        return client.createService(Service.class, null);
    }

    /**
     * Portal account users who are not the master user (account owner) have permissions to allow them access to portal functionalities. 
     *
     * @see SoftLayer_User_Customer_CustomerPermission_Permission
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_User_Customer_CustomerPermission_Permission")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * Retrieve all available permissions.
         *
         * @see SoftLayer_User_Customer_CustomerPermission_Permission::getAllObjects
         */
        @ApiMethod
        public List getAllObjects();

        /**
         * getObject retrieves the SoftLayer_User_Customer_CustomerPermission_Permission object whose ID number corresponds to the ID number of the init parameter passed to the SoftLayer_User_Customer_CustomerPermission_Permission service. 
         *
         * @see SoftLayer_User_Customer_CustomerPermission_Permission::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Permission getObject();

    }

    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);

    }

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy