Class CreateRoomRequest


  • public class CreateRoomRequest
    extends Object
    JSON body request for creation api.
    • 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.
    • Constructor Detail

      • CreateRoomRequest

        public CreateRoomRequest()
    • 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)
      • setInvite

        public void setInvite​(List<String> invite)
      • setInvite3pid

        public void setInvite3pid​(List<Invite3pid> invite3pid)
      • getRoomVersion

        public String getRoomVersion()
      • setRoomVersion

        public void setRoomVersion​(String roomVersion)
      • setCreationContent

        public void setCreationContent​(RoomCreateContent creationContent)
      • getInitialEvent

        public List<Event> getInitialEvent()
      • setInitialEvent

        public void setInitialEvent​(List<Event> initialEvent)
      • getPreset

        public String getPreset()
      • setPreset

        public void setPreset​(String preset)
      • getDirect

        public Boolean getDirect()
      • setDirect

        public void setDirect​(Boolean direct)
      • setPowerLevelContentOverride

        public void setPowerLevelContentOverride​(RoomPowerLevelsContent powerLevelContentOverride)