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

com.softlayer.api.service.software.component.Password Maven / Gradle / Ivy

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

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.security.ssh.Key;
import com.softlayer.api.service.software.Component;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * This SoftLayer_Software_Component_Password data type contains a password for a specific software component instance. 
 *
 * @see SoftLayer_Software_Component_Password
 */
@ApiType("SoftLayer_Software_Component_Password")
public class Password extends Entity {

    /**
     * The SoftLayer_Software_Component instance that this username/password pair is valid for.
     */
    @ApiProperty
    protected Component software;

    public Component getSoftware() {
        return software;
    }

    public void setSoftware(Component software) {
        this.software = software;
    }

    /**
     * SSH keys to be installed on the server during provisioning or an OS reload.
     */
    @ApiProperty
    protected List sshKeys;

    public List getSshKeys() {
        if (sshKeys == null) {
            sshKeys = new ArrayList();
        }
        return sshKeys;
    }

    /**
     * The date this username/password pair 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;
    }

    /**
     * An id number for this specific username/password pair.
     */
    @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 of the last modification to this username/password pair.
     */
    @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;
    }

    /**
     * A note string stored for this username/password pair.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String notes;

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        notesSpecified = true;
        this.notes = notes;
    }

    protected boolean notesSpecified;

    public boolean isNotesSpecified() {
        return notesSpecified;
    }

    public void unsetNotes() {
        notes = null;
        notesSpecified = false;
    }

    /**
     * The password part of the username/password pair.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String password;

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        passwordSpecified = true;
        this.password = password;
    }

    protected boolean passwordSpecified;

    public boolean isPasswordSpecified() {
        return passwordSpecified;
    }

    public void unsetPassword() {
        password = null;
        passwordSpecified = false;
    }

    /**
     * The application access port for the Software Component.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long port;

    public Long getPort() {
        return port;
    }

    public void setPort(Long port) {
        portSpecified = true;
        this.port = port;
    }

    protected boolean portSpecified;

    public boolean isPortSpecified() {
        return portSpecified;
    }

    public void unsetPort() {
        port = null;
        portSpecified = false;
    }

    /**
     * An id number for the software component this username/password pair is valid for.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long softwareId;

    public Long getSoftwareId() {
        return softwareId;
    }

    public void setSoftwareId(Long softwareId) {
        softwareIdSpecified = true;
        this.softwareId = softwareId;
    }

    protected boolean softwareIdSpecified;

    public boolean isSoftwareIdSpecified() {
        return softwareIdSpecified;
    }

    public void unsetSoftwareId() {
        softwareId = null;
        softwareIdSpecified = false;
    }

    /**
     * The username part of the username/password pair.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String username;

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        usernameSpecified = true;
        this.username = username;
    }

    protected boolean usernameSpecified;

    public boolean isUsernameSpecified() {
        return usernameSpecified;
    }

    public void unsetUsername() {
        username = null;
        usernameSpecified = false;
    }

    /**
     * A count of sSH keys to be installed on the server during provisioning or an OS reload.
     */
    @ApiProperty
    protected Long sshKeyCount;

    public Long getSshKeyCount() {
        return sshKeyCount;
    }

    public void setSshKeyCount(Long sshKeyCount) {
        this.sshKeyCount = sshKeyCount;
    }

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

    /**
     * The software component password service represents the passwords for a software component, such as an operating system or a control panel. Updating the passwords here will NOT update them on the server itself. 
     *
     * @see SoftLayer_Software_Component_Password
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Software_Component_Password")
    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 password for a software component. 
         *
         * @see SoftLayer_Software_Component_Password::createObject
         */
        @ApiMethod
        public Password createObject(Password templateObject);

        /**
         * Create more than one password for a software component. 
         *
         * @see SoftLayer_Software_Component_Password::createObjects
         */
        @ApiMethod
        public Boolean createObjects(List templateObjects);

        /**
         * Delete a password from a software component. 
         *
         * @see SoftLayer_Software_Component_Password::deleteObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean deleteObject();

        /**
         * Delete more than one passwords from a software component. 
         *
         * @see SoftLayer_Software_Component_Password::deleteObjects
         */
        @ApiMethod
        public Boolean deleteObjects(List templateObjects);

        /**
         * Edit the properties of a software component password such as the username, password, port, and notes. 
         *
         * @see SoftLayer_Software_Component_Password::editObject
         */
        @ApiMethod(instanceRequired = true)
        public Boolean editObject(Password templateObject);

        /**
         * Edit more than one password from a software component. 
         *
         * @see SoftLayer_Software_Component_Password::editObjects
         */
        @ApiMethod
        public Boolean editObjects(List templateObjects);

        /**
         * @see SoftLayer_Software_Component_Password::getObject
         */
        @ApiMethod(instanceRequired = true)
        public Password getObject();

        /**
         * The SoftLayer_Software_Component instance that this username/password pair is valid for.
         *
         * @see SoftLayer_Software_Component_Password::getSoftware
         */
        @ApiMethod(instanceRequired = true)
        public Component getSoftware();

        /**
         * SSH keys to be installed on the server during provisioning or an OS reload.
         *
         * @see SoftLayer_Software_Component_Password::getSshKeys
         */
        @ApiMethod(instanceRequired = true)
        public List getSshKeys();

    }

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

        public Future createObject(Password templateObject, ResponseHandler callback);

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

        public Future createObjects(List templateObjects, ResponseHandler callback);

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

        public Future deleteObject(ResponseHandler callback);

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

        public Future deleteObjects(List templateObjects, ResponseHandler callback);

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

        public Future editObject(Password templateObject, ResponseHandler callback);

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

        public Future editObjects(List templateObjects, ResponseHandler callback);

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

        public Future getObject(ResponseHandler callback);

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

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

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

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

    }

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

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

        public com.softlayer.api.service.security.ssh.Key.Mask sshKeys() {
            return withSubMask("sshKeys", com.softlayer.api.service.security.ssh.Key.Mask.class);
        }

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

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

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

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

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

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

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

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

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

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy