com.softlayer.api.service.account.Password Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of softlayer-api-client Show documentation
Show all versions of softlayer-api-client Show documentation
API client for accessing the SoftLayer API
The newest version!
package com.softlayer.api.service.account;
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.Account;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.account.password.Type;
import java.util.concurrent.Future;
/**
* The SoftLayer_Account_Password contains username, passwords and notes for services that may require for external applications such the Webcc interface for the EVault Storage service.
*
* @see SoftLayer_Account_Password
*/
@ApiType("SoftLayer_Account_Password")
public class Password extends Entity {
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The service that an account/password combination is tied to.
*/
@ApiProperty
protected Type type;
public Type getType() {
return type;
}
public void setType(Type type) {
this.type = type;
}
/**
* The SoftLayer customer account id that a username/password combination is associated with.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long accountId;
public Long getAccountId() {
return accountId;
}
public void setAccountId(Long accountId) {
accountIdSpecified = true;
this.accountId = accountId;
}
protected boolean accountIdSpecified;
public boolean isAccountIdSpecified() {
return accountIdSpecified;
}
public void unsetAccountId() {
accountId = null;
accountIdSpecified = false;
}
/**
* A username/password combination's 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 simple description of a username/password combination. These notes don't affect portal functionality.
*/
@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 portion of a username/password combination.
*/
@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;
}
/**
* An identifier relating to a username/password combinations's associated service.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected Long typeId;
public Long getTypeId() {
return typeId;
}
public void setTypeId(Long typeId) {
typeIdSpecified = true;
this.typeId = typeId;
}
protected boolean typeIdSpecified;
public boolean isTypeIdSpecified() {
return typeIdSpecified;
}
public void unsetTypeId() {
typeId = null;
typeIdSpecified = false;
}
/**
* The username portion of a username/password combination.
*/
@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;
}
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());
}
/**
* As a SoftLayer customer accumulates services they may accumulate usernames and passwords to those services. The SoftLayer_Account_Password data type stores a username and password combination for these services that are tied their customer account. This shouldn't be confused with username and password combinations for server-specific services.
*
* For instance, an account's EVault WebCC information is kept in a SoftLayer_Account_Password record, but a server's root or control panel password isn't. Server software specific usernames and passwords are handled by the SoftLayer_Hardware_Software_Password data type.
*
* @see SoftLayer_Account_Password
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Account_Password")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* The password and/or notes may be modified. Modifying the EVault passwords here will also update the password the Webcc interface will use.
*
* @see SoftLayer_Account_Password::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Password templateObject);
/**
* getObject retrieves the SoftLayer_Account_Password object whose ID corresponds to the ID number of the init parameter passed to the SoftLayer_Account_Password service.
*
* @see SoftLayer_Account_Password::getObject
*/
@ApiMethod(instanceRequired = true)
public Password getObject();
/**
* @see SoftLayer_Account_Password::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The service that an account/password combination is tied to.
*
* @see SoftLayer_Account_Password::getType
*/
@ApiMethod(instanceRequired = true)
public Type getType();
}
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(Password templateObject);
public Future> editObject(Password templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#getObject}
*/
public Future getObject();
public Future> getObject(ResponseHandler callback);
/**
* Async version of {@link Service#getAccount}
*/
public Future getAccount();
/**
* Async callback version of {@link Service#getAccount}
*/
public Future> getAccount(ResponseHandler callback);
/**
* Async version of {@link Service#getType}
*/
public Future getType();
/**
* Async callback version of {@link Service#getType}
*/
public Future> getType(ResponseHandler callback);
}
public static class Mask extends com.softlayer.api.service.Entity.Mask {
public com.softlayer.api.service.Account.Mask account() {
return withSubMask("account", com.softlayer.api.service.Account.Mask.class);
}
public com.softlayer.api.service.account.password.Type.Mask type() {
return withSubMask("type", com.softlayer.api.service.account.password.Type.Mask.class);
}
public Mask accountId() {
withLocalProperty("accountId");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask notes() {
withLocalProperty("notes");
return this;
}
public Mask password() {
withLocalProperty("password");
return this;
}
public Mask typeId() {
withLocalProperty("typeId");
return this;
}
public Mask username() {
withLocalProperty("username");
return this;
}
}
}