Set the guest access policy of the room.

        Args:
            room_id(str): The room to set the rules for.
            guest_access(str): Wether guests can join. One of: ["can_join",
                "forbidden"]
325954
def set_guest_access(self, room_id, guest_access):
        
        content = {
            "guest_access": guest_access
        }
        return self.send_state_event(room_id, "m.room.guest_access", content)
626942
def guest_start(self, userid):
        
        action = "start guest '%s'" % userid
        with zvmutils.log_and_reraise_sdkbase_error(action):
            self._vmops.guest_start(userid)
1297497
function( userId, id ) {

		return this.memory.leaveRoom( userId, id )
		.then( function( numUsers ) {

			if( numUsers == 0 ) {

				// remove all listeners from room since there should be one
				rooms[ id ].removeAllListeners();
				rooms[ id ].setPrivate();
				delete rooms[ id ];
				
				return promise.resolve( null );
			} else {

				return promise.resolve( rooms[ id ] );
			}
		});
	}
408070
def join(self, room_str):
        """"""
        response = self.user_api.join_room(room_str)
        return self._mkroom(response["room_id"])
1272018
def room(self, name, participantIdentity=None, **kwargs):
        
        return self.nest(Room(name, participantIdentity=participantIdentity, **kwargs))
325481
def ban_user(self, room_id, user_id, reason=""):
        
        body = {
            "user_id": user_id,
            "reason": reason
        }
        return self._send("POST", "/rooms/" + room_id + "/ban", body)
161869
def use(self, id):
        
        if self._connected and id > 0:
            self.send_command('use', keys={'sid': id})
1076167
def get_room_id(self, room_name, **kwargs):
        
        return GetRoomId(settings=self.settings, **kwargs).call(
            room_name=room_name,
            **kwargs
        )
1184195
def delete_public_room(self, room_id, **kwargs):
        
        return DeletePublicRoom(settings=self.settings, **kwargs).call(room_id=room_id, **kwargs)
183782
def invite_user(self, user_id):
        
        try:
            self.client.api.invite_user(self.room_id, user_id)
            return True
        except MatrixRequestError:
            return False
1108865
def guest_access(func):
    
    def decorated(*_, **kwargs):
        public_profiles = current_app.config['USER_PUBLIC_PROFILES']
        if not public_profiles:
            if not current_user.is_authenticated:
                abort(401)
            elif current_user.id != kwargs['id']:
                abort(403)
        return func(**kwargs)

    return decorated
204616
def rooms_favorite(self, room_id=None, room_name=None, favorite=True):
        """"""
        if room_id is not None:
            return self.__call_api_post('rooms.favorite', roomId=room_id, favorite=favorite)
        elif room_name is not None:
            return self.__call_api_post('rooms.favorite', roomName=room_name, favorite=favorite)
        else:
            raise RocketMissingParamException('roomId or roomName required')
591047
def use_session(self, session_id):
        
        self.session = Session(lgn=self, id=session_id)
        return self.session
300129
def cancel_reservation(self):
        
        room_res_line_obj = self.env['hotel.room.reservation.line']
        hotel_res_line_obj = self.env['hotel_reservation.line']
        self.state = 'cancel'
        room_reservation_line = room_res_line_obj.search([('reservation_id',
                                                           'in', self.ids)])
        room_reservation_line.write({'state': 'unassigned'})
        room_reservation_line.unlink()
        reservation_lines = hotel_res_line_obj.search([('line_id',
                                                        'in', self.ids)])
        for reservation_line in reservation_lines:
            reservation_line.reserve.write({'isroom': True,
                                            'status': 'available'})
        return True
865136
public void setId(Object id) {
	  if (lock == SET) {
		 throw new IllegalStateException("EntryInfo is locked");
	  }
	  /*if (idFlag == SET) {
		 if (tc.isDebugEnabled()) Tr.debug(tc, "Illegal State: tried to set id to "+id+
											   ", but id was already set to "+this.id  );
		  throw new IllegalStateException("id was already set");
	  } */
	  idFlag = SET;
	  this.id = id;
	  if (tc.isDebugEnabled())
		 Tr.debug(tc, "set id=" + id);
   }
837241
def set_room_topic(self, topic):
        
        try:
            self.client.api.set_room_topic(self.room_id, topic)
            self.topic = topic
            return True
        except MatrixRequestError:
            return False
593208
def rooms_info(self, room_id=None, room_name=None):
        """"""
        if room_id is not None:
            return self.__call_api_get('rooms.info', roomId=room_id)
        elif room_name is not None:
            return self.__call_api_get('rooms.info', roomName=room_name)
        else:
            raise RocketMissingParamException('roomId or roomName required')