com.softlayer.api.service.security.ssh.Key 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.security.ssh;
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.software.component.Password;
import com.softlayer.api.service.virtual.guest.block.device.template.Group;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;
/**
* @see SoftLayer_Security_Ssh_Key
*/
@ApiType("SoftLayer_Security_Ssh_Key")
public class Key extends Entity {
@ApiProperty
protected Account account;
public Account getAccount() {
return account;
}
public void setAccount(Account account) {
this.account = account;
}
/**
* The image template groups that are linked to an SSH key.
*/
@ApiProperty
protected List blockDeviceTemplateGroups;
public List getBlockDeviceTemplateGroups() {
if (blockDeviceTemplateGroups == null) {
blockDeviceTemplateGroups = new ArrayList();
}
return blockDeviceTemplateGroups;
}
/**
* The OS root users that are linked to an SSH key.
*/
@ApiProperty
protected List softwarePasswords;
public List getSoftwarePasswords() {
if (softwarePasswords == null) {
softwarePasswords = new ArrayList();
}
return softwarePasswords;
}
/**
* The date a ssh key was added.
*
* This property is read only. Changes made will be silently ignored.
*/
@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 short sequence of bytes used to authenticate or lookup a longer ssh key. This will automatically be generated upon adding or modifying the ssh key.
*
* This property is read only. Changes made will be silently ignored.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String fingerprint;
public String getFingerprint() {
return fingerprint;
}
public void setFingerprint(String fingerprint) {
fingerprintSpecified = true;
this.fingerprint = fingerprint;
}
protected boolean fingerprintSpecified;
public boolean isFingerprintSpecified() {
return fingerprintSpecified;
}
public void unsetFingerprint() {
fingerprint = null;
fingerprintSpecified = false;
}
/**
* The ID of the ssh key record.
*/
@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 ssh key.
*/
@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 descriptive name used to identify a ssh key.
*/
@ApiProperty(canBeNullOrNotSet = true)
protected String label;
public String getLabel() {
return label;
}
public void setLabel(String label) {
labelSpecified = true;
this.label = label;
}
protected boolean labelSpecified;
public boolean isLabelSpecified() {
return labelSpecified;
}
public void unsetLabel() {
label = null;
labelSpecified = false;
}
/**
* The date a ssh key was last modified.
*
* This property is read only. Changes made will be silently ignored.
*/
@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 small note about a ssh key to use at your discretion.
*/
@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;
}
/**
* A count of the image template groups that are linked to an SSH key.
*/
@ApiProperty
protected Long blockDeviceTemplateGroupCount;
public Long getBlockDeviceTemplateGroupCount() {
return blockDeviceTemplateGroupCount;
}
public void setBlockDeviceTemplateGroupCount(Long blockDeviceTemplateGroupCount) {
this.blockDeviceTemplateGroupCount = blockDeviceTemplateGroupCount;
}
/**
* A count of the OS root users that are linked to an SSH key.
*/
@ApiProperty
protected Long softwarePasswordCount;
public Long getSoftwarePasswordCount() {
return softwarePasswordCount;
}
public void setSoftwarePasswordCount(Long softwarePasswordCount) {
this.softwarePasswordCount = softwarePasswordCount;
}
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_Security_Ssh_Key
*/
@com.softlayer.api.annotation.ApiService("SoftLayer_Security_Ssh_Key")
public static interface Service extends com.softlayer.api.Service {
public ServiceAsync asAsync();
public Mask withNewMask();
public Mask withMask();
public void setMask(Mask mask);
/**
* Add a ssh key to your account for use during server provisioning and os reloads.
*
* @see SoftLayer_Security_Ssh_Key::createObject
*/
@ApiMethod
public Key createObject(Key templateObject);
/**
* Remove a ssh key from your account.
*
* @see SoftLayer_Security_Ssh_Key::deleteObject
*/
@ApiMethod(instanceRequired = true)
public Boolean deleteObject();
/**
* Update a ssh key.
*
* @see SoftLayer_Security_Ssh_Key::editObject
*/
@ApiMethod(instanceRequired = true)
public Boolean editObject(Key templateObject);
/**
* @see SoftLayer_Security_Ssh_Key::getObject
*/
@ApiMethod(instanceRequired = true)
public Key getObject();
/**
* @see SoftLayer_Security_Ssh_Key::getAccount
*/
@ApiMethod(instanceRequired = true)
public Account getAccount();
/**
* The image template groups that are linked to an SSH key.
*
* @see SoftLayer_Security_Ssh_Key::getBlockDeviceTemplateGroups
*/
@ApiMethod(instanceRequired = true)
public List getBlockDeviceTemplateGroups();
/**
* The OS root users that are linked to an SSH key.
*
* @see SoftLayer_Security_Ssh_Key::getSoftwarePasswords
*/
@ApiMethod(instanceRequired = true)
public List getSoftwarePasswords();
}
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(Key templateObject);
public Future> createObject(Key templateObject, ResponseHandler callback);
/**
* Async version of {@link Service#deleteObject}
*/
public Future deleteObject();
public Future> deleteObject(ResponseHandler callback);
/**
* Async version of {@link Service#editObject}
*/
public Future editObject(Key templateObject);
public Future> editObject(Key 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#getBlockDeviceTemplateGroups}
*/
public Future> getBlockDeviceTemplateGroups();
/**
* Async callback version of {@link Service#getBlockDeviceTemplateGroups}
*/
public Future> getBlockDeviceTemplateGroups(ResponseHandler> callback);
/**
* Async version of {@link Service#getSoftwarePasswords}
*/
public Future> getSoftwarePasswords();
/**
* Async callback version of {@link Service#getSoftwarePasswords}
*/
public Future> getSoftwarePasswords(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.virtual.guest.block.device.template.Group.Mask blockDeviceTemplateGroups() {
return withSubMask("blockDeviceTemplateGroups", com.softlayer.api.service.virtual.guest.block.device.template.Group.Mask.class);
}
public com.softlayer.api.service.software.component.Password.Mask softwarePasswords() {
return withSubMask("softwarePasswords", com.softlayer.api.service.software.component.Password.Mask.class);
}
public Mask createDate() {
withLocalProperty("createDate");
return this;
}
public Mask fingerprint() {
withLocalProperty("fingerprint");
return this;
}
public Mask id() {
withLocalProperty("id");
return this;
}
public Mask key() {
withLocalProperty("key");
return this;
}
public Mask label() {
withLocalProperty("label");
return this;
}
public Mask modifyDate() {
withLocalProperty("modifyDate");
return this;
}
public Mask notes() {
withLocalProperty("notes");
return this;
}
public Mask blockDeviceTemplateGroupCount() {
withLocalProperty("blockDeviceTemplateGroupCount");
return this;
}
public Mask softwarePasswordCount() {
withLocalProperty("softwarePasswordCount");
return this;
}
}
}