Class RoomKeyRequestContent
- java.lang.Object
-
- io.github.ma1uta.matrix.event.content.RoomKeyRequestContent
-
- All Implemented Interfaces:
EventContent
public class RoomKeyRequestContent extends Object implements EventContent
This event type is used to request keys for end-to-end encryption. It is sent as an unencrypted to-device event.
-
-
Field Summary
Fields Modifier and Type Field Description private String
action
Required.private RequestedKeyInfo
body
Information about the requested key.static String
CANCEL_REQUEST
Cancel Request.static String
REQUEST
Request.private String
requestId
Required.private String
requestingDeviceId
Required.
-
Constructor Summary
Constructors Constructor Description RoomKeyRequestContent()
-
Method Summary
Modifier and Type Method Description String
getAction()
RequestedKeyInfo
getBody()
String
getRequestId()
String
getRequestingDeviceId()
void
setAction(String action)
void
setBody(RequestedKeyInfo body)
void
setRequestId(String requestId)
void
setRequestingDeviceId(String requestingDeviceId)
-
-
-
Field Detail
-
REQUEST
public static final String REQUEST
Request.- See Also:
- Constant Field Values
-
CANCEL_REQUEST
public static final String CANCEL_REQUEST
Cancel Request.- See Also:
- Constant Field Values
-
body
private RequestedKeyInfo body
Information about the requested key. Required when action is request.
-
action
private String action
Required. One of: ["request", "cancel_request"].
-
requestingDeviceId
private String requestingDeviceId
Required. ID of the device requesting the key.
-
requestId
private String requestId
Required. A random string uniquely identifying the request for a key. If the key is requested multiple times, it should be reused. It should also reused in order to cancel a request.
-
-
Method Detail
-
getBody
public RequestedKeyInfo getBody()
-
setBody
public void setBody(RequestedKeyInfo body)
-
getAction
public String getAction()
-
setAction
public void setAction(String action)
-
getRequestingDeviceId
public String getRequestingDeviceId()
-
setRequestingDeviceId
public void setRequestingDeviceId(String requestingDeviceId)
-
getRequestId
public String getRequestId()
-
setRequestId
public void setRequestId(String requestId)
-
-