@Beta public class DeviceKey extends AbstractAnnotated
Modifier and Type | Class and Description |
---|---|
static class |
DeviceKey.Type
type of the device key.
|
Modifier and Type | Method and Description |
---|---|
CommunityName |
asCommunityName()
Returns a community name object from the device key.
|
UsernamePassword |
asUsernamePassword()
Returns a username and password object from the device key.
|
static DeviceKey |
createDeviceKeyUsingCommunityName(DeviceKeyId id,
java.lang.String label,
java.lang.String name)
Method to create a device key of type CommunityName.
|
static DeviceKey |
createDeviceKeyUsingSshKey(DeviceKeyId id,
java.lang.String label,
java.lang.String username,
java.lang.String password,
java.lang.String sshkey)
Method to create a device key of type SSL_KEY.
|
static DeviceKey |
createDeviceKeyUsingUsernamePassword(DeviceKeyId id,
java.lang.String label,
java.lang.String username,
java.lang.String password)
Method to create a device key of type USERNAME_PASSWORD.
|
DeviceKeyId |
deviceKeyId()
Returns the device key identifier of the device key.
|
java.lang.String |
label()
Returns the label of device key.
|
DeviceKey.Type |
type()
Returns the type of the device key.
|
annotations
public DeviceKeyId deviceKeyId()
public java.lang.String label()
public DeviceKey.Type type()
public static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, java.lang.String label, java.lang.String name)
id
- device key identifierlabel
- optional label for this device keyname
- community name for this device keypublic CommunityName asCommunityName()
public static DeviceKey createDeviceKeyUsingUsernamePassword(DeviceKeyId id, java.lang.String label, java.lang.String username, java.lang.String password)
id
- device key identifierlabel
- optional label for this device keyusername
- username for accessing this devicepassword
- password for accessing this devicepublic static DeviceKey createDeviceKeyUsingSshKey(DeviceKeyId id, java.lang.String label, java.lang.String username, java.lang.String password, java.lang.String sshkey)
id
- device key identifierlabel
- optional label for this device keyusername
- username for accessing this devicepassword
- password for accessing this device SSH keysshkey
- SSH key for accessing this devicepublic UsernamePassword asUsernamePassword()