Class CreateRoomRequest
- java.lang.Object
-
- io.github.ma1uta.matrix.client.model.room.CreateRoomRequest
-
public class CreateRoomRequest extends Object
JSON body request for creation api.
-
-
Field Summary
Fields Modifier and Type Field Description private RoomCreateContent
creationContent
Extra keys to be added to the content of the m.room.create.private Boolean
direct
This flag makes the server set the is_direct flag on the m.room.member events sent to the users in invite and invite_3pid.private List<Event>
initialEvent
A list of state events to set in the new room.private List<String>
invite
A list of user IDs to invite to the room.private List<Invite3pid>
invite3pid
A list of objects representing third party IDs to invite into the room.private String
name
If this is included, an m.room.name event will be sent into the room to indicate the name of the room.private RoomPowerLevelsContent
powerLevelContentOverride
The power level content to override in the default power level event.private String
preset
Convenience parameter for setting various default state events based on a preset.private String
roomAliasName
The desired room alias local part.private String
roomVersion
The room version to set for the room.private String
topic
If this is included, an m.room.topic event will be sent into the room to indicate the topic for the room.private String
visibility
A public visibility indicates that the room will be shown in the published room list.
-
Constructor Summary
Constructors Constructor Description CreateRoomRequest()
-
Method Summary
Modifier and Type Method Description RoomCreateContent
getCreationContent()
Boolean
getDirect()
List<Event>
getInitialEvent()
List<String>
getInvite()
List<Invite3pid>
getInvite3pid()
String
getName()
RoomPowerLevelsContent
getPowerLevelContentOverride()
String
getPreset()
String
getRoomAliasName()
String
getRoomVersion()
String
getTopic()
String
getVisibility()
void
setCreationContent(RoomCreateContent creationContent)
void
setDirect(Boolean direct)
void
setInitialEvent(List<Event> initialEvent)
void
setInvite(List<String> invite)
void
setInvite3pid(List<Invite3pid> invite3pid)
void
setName(String name)
void
setPowerLevelContentOverride(RoomPowerLevelsContent powerLevelContentOverride)
void
setPreset(String preset)
void
setRoomAliasName(String roomAliasName)
void
setRoomVersion(String roomVersion)
void
setTopic(String topic)
void
setVisibility(String visibility)
-
-
-
Field Detail
-
visibility
private String visibility
A public visibility indicates that the room will be shown in the published room list. A private visibility will hide the room from the published room list. Rooms default to private visibility if this key is not included. NB: This should not be confused with join_rules which also uses the word public. One of: ["public", "private"]
-
roomAliasName
private String roomAliasName
The desired room alias local part. If this is included, a room alias will be created and mapped to the newly created room. The alias will belong on the same homeserver which created the room. For example, if this was set to "foo" and sent to the homeserver "example.com". The complete room alias would be #foo:example.com.
-
name
private String name
If this is included, an m.room.name event will be sent into the room to indicate the name of the room. See Room Events for more information on m.room.name.
-
topic
private String topic
If this is included, an m.room.topic event will be sent into the room to indicate the topic for the room. See Room Events for more information on m.room.topic.
-
invite
private List<String> invite
A list of user IDs to invite to the room. This will tell the server to invite everyone in the list to the newly created room.
-
invite3pid
private List<Invite3pid> invite3pid
A list of objects representing third party IDs to invite into the room.
-
roomVersion
private String roomVersion
The room version to set for the room. If not provided, the homeserver is to use its configured default. If provided, the homeserver will return a 400 error with the errcode M_UNSUPPORTED_ROOM_VERSION if it does not support the room version.
-
creationContent
private RoomCreateContent creationContent
Extra keys to be added to the content of the m.room.create. The server will clobber the following keys: creator. Future versions of the specification may allow the server to clobber other keys.
-
initialEvent
private List<Event> initialEvent
A list of state events to set in the new room. This allows the user to override the default state events set in the new room. The expected format of the state events are an object with type, state_key and content keys set. Takes precedence over events set by preset, but gets overriden by name and topic keys.
-
preset
private String preset
Convenience parameter for setting various default state events based on a preset.
-
direct
private Boolean direct
This flag makes the server set the is_direct flag on the m.room.member events sent to the users in invite and invite_3pid. See DirectContent Messaging for more information.
-
powerLevelContentOverride
private RoomPowerLevelsContent powerLevelContentOverride
The power level content to override in the default power level event. This object is applied on top of the generated m.room.power_levels event content prior to it being sent to the room. Defaults to overriding nothing.
-
-
Method Detail
-
getVisibility
public String getVisibility()
-
setVisibility
public void setVisibility(String visibility)
-
getRoomAliasName
public String getRoomAliasName()
-
setRoomAliasName
public void setRoomAliasName(String roomAliasName)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getTopic
public String getTopic()
-
setTopic
public void setTopic(String topic)
-
getInvite3pid
public List<Invite3pid> getInvite3pid()
-
setInvite3pid
public void setInvite3pid(List<Invite3pid> invite3pid)
-
getRoomVersion
public String getRoomVersion()
-
setRoomVersion
public void setRoomVersion(String roomVersion)
-
getCreationContent
public RoomCreateContent getCreationContent()
-
setCreationContent
public void setCreationContent(RoomCreateContent creationContent)
-
getPreset
public String getPreset()
-
setPreset
public void setPreset(String preset)
-
getDirect
public Boolean getDirect()
-
setDirect
public void setDirect(Boolean direct)
-
getPowerLevelContentOverride
public RoomPowerLevelsContent getPowerLevelContentOverride()
-
setPowerLevelContentOverride
public void setPowerLevelContentOverride(RoomPowerLevelsContent powerLevelContentOverride)
-
-