com.ionic.sdk.agent.request.createdevice.CreateDeviceRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ionic-sdk Show documentation
Show all versions of ionic-sdk Show documentation
The Ionic Java SDK provides an easy-to-use interface to the Ionic Platform.
package com.ionic.sdk.agent.request.createdevice;
import com.ionic.sdk.agent.request.base.AgentRequestBase;
import com.ionic.sdk.cipher.rsa.model.RsaKeyHolder;
/**
* Represents the input for an Agent.getResources() request.
*/
public final class CreateDeviceRequest extends AgentRequestBase {
/**
* The text label to be associated with the device profile to be created.
*/
private final String deviceProfileName;
/**
* The server URL to be used to service the request.
*/
private final String server;
/**
* The keyspace to be bound to the newly created device profile.
*/
private final String etag;
/**
* The token generated by the device registration prerequisite steps.
*/
private final String token;
/**
* The uid generated by the device registration prerequisite steps.
*/
private final String uidAuth;
/**
* The Ionic public key used to protect the create device request.
*/
private final String eiRsaPublicKey;
/**
* The client asymmetric key pair used in the context of the request.
*/
private RsaKeyHolder rsaKeyHolder;
/**
* Constructor.
*
* @param deviceProfileName the text label to be associated with the device profile to be created
* @param server the server URL to be used to service the request
* @param etag the keyspace to be bound to the newly created device profile
* @param token the token generated by the device registration prerequisite steps
* @param uidAuth the uid generated by the device registration prerequisite steps
* @param eiRsaPublicKey the Ionic public key used to protect the create device request
*/
public CreateDeviceRequest(final String deviceProfileName, final String server, final String etag,
final String token, final String uidAuth, final String eiRsaPublicKey) {
this.deviceProfileName = deviceProfileName;
this.server = server;
this.etag = etag;
this.token = token;
this.uidAuth = uidAuth;
this.eiRsaPublicKey = eiRsaPublicKey;
this.rsaKeyHolder = null;
}
/**
* @return the text label to be associated with the device profile to be created
*/
public String getDeviceProfileName() {
return deviceProfileName;
}
/**
* @return the server URL to be used to service the request
*/
public String getServer() {
return server;
}
/**
* @return the keyspace to be bound to the newly created device profile
*/
public String getEtag() {
return etag;
}
/**
* @return the token generated by the device registration prerequisite steps
*/
public String getToken() {
return token;
}
/**
* @return the uid generated by the device registration prerequisite steps
*/
public String getUidAuth() {
return uidAuth;
}
/**
* @return the Ionic public key used to protect the create device request
*/
public String getEiRsaPublicKey() {
return eiRsaPublicKey;
}
/**
* @return the client asymmetric key pair used in the context of the request
*/
public RsaKeyHolder getRsaKeyHolder() {
return rsaKeyHolder;
}
/**
* @param rsaKeyHolder the client asymmetric key pair used in the context of the request
*/
public void setRsaKeyHolder(final RsaKeyHolder rsaKeyHolder) {
this.rsaKeyHolder = rsaKeyHolder;
}
}