<commit_before>/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "jobs/basejob.h"

#include "events/roommemberevent.h"
#include "events/eventloader.h"
#include <QtCore/QHash>
#include "converters.h"

namespace QMatrixClient
{
    // Operations

    /// Get a single event by event ID.
    ///
    /// Get a single event based on ``roomId/eventId``. You must have permission to
    /// retrieve this event e.g. by being a member in the room for this event.
    class GetOneRoomEventJob : public BaseJob
    {
        public:
            /*! Get a single event by event ID.
             * \param roomId
             *   The ID of the room the event is in.
             * \param eventId
             *   The event ID to get.
             */
            explicit GetOneRoomEventJob(const QString& roomId, const QString& eventId);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetOneRoomEventJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventId);

            ~GetOneRoomEventJob() override;

            // Result properties

            /// The full event.
            EventPtr&& data();

        protected:
            Status parseJson(const QJsonDocument& data) override;

        private:
            class Private;
            QScopedPointer<Private> d;
    };

    /// Get the state identified by the type and key.
    ///
    /// Looks up the contents of a state event in a room. If the user is
    /// joined to the room then the state is taken from the current
    /// state of the room. If the user has left the room then the state is
    /// taken from the state of the room when they left.
    class GetRoomStateWithKeyJob : public BaseJob
    {
        public:
            /*! Get the state identified by the type and key.
             * \param roomId
             *   The room to look up the state in.
             * \param eventType
             *   The type of state to look up.
             * \param stateKey
             *   The key of the state to look up.
             */
            explicit GetRoomStateWithKeyJob(const QString& roomId, const QString& eventType, const QString& stateKey);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetRoomStateWithKeyJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventType, const QString& stateKey);

    };

    /// Get the state identified by the type, with the empty state key.
    ///
    /// Looks up the contents of a state event in a room. If the user is
    /// joined to the room then the state is taken from the current
    /// state of the room. If the user has left the room then the state is
    /// taken from the state of the room when they left.
    /// 
    /// This looks up the state event with the empty state key.
    class GetRoomStateByTypeJob : public BaseJob
    {
        public:
            /*! Get the state identified by the type, with the empty state key.
             * \param roomId
             *   The room to look up the state in.
             * \param eventType
             *   The type of state to look up.
             */
            explicit GetRoomStateByTypeJob(const QString& roomId, const QString& eventType);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetRoomStateByTypeJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventType);

    };

    /// Get all state events in the current state of a room.
    ///
    /// Get the state events for the current state of a room.
    class GetRoomStateJob : public BaseJob
    {
        public:
            /*! Get all state events in the current state of a room.
             * \param roomId
             *   The room to look up the state for.
             */
            explicit GetRoomStateJob(const QString& roomId);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetRoomStateJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId);

            ~GetRoomStateJob() override;

            // Result properties

            /// If the user is a member of the room this will be the
            /// current state of the room as a list of events. If the user
            /// has left the room then this will be the state of the room
            /// when they left as a list of events.
            StateEvents&& data();

        protected:
            Status parseJson(const QJsonDocument& data) override;

        private:
            class Private;
            QScopedPointer<Private> d;
    };

    /// Get the m.room.member events for the room.
    ///
    /// Get the list of members for this room.
    class GetMembersByRoomJob : public BaseJob
    {
        public:
            /*! Get the m.room.member events for the room.
             * \param roomId
             *   The room to get the member events for.
             * \param at
             *   The token defining the timeline position as-of which to return
             *   the list of members. This token can be obtained from
             *   a ``prev_batch`` token returned for each room by the sync API, or
             *   from a ``start`` or ``end`` token returned by a /messages request.<commit_msg>csapi/rooms.h: regenerate to update doc-comments<commit_after>/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "jobs/basejob.h"

#include "events/roommemberevent.h"
#include "events/eventloader.h"
#include <QtCore/QHash>
#include "converters.h"

namespace QMatrixClient
{
    // Operations

    /// Get a single event by event ID.
    ///
    /// Get a single event based on ``roomId/eventId``. You must have permission to
    /// retrieve this event e.g. by being a member in the room for this event.
    class GetOneRoomEventJob : public BaseJob
    {
        public:
            /*! Get a single event by event ID.
             * \param roomId
             *   The ID of the room the event is in.
             * \param eventId
             *   The event ID to get.
             */
            explicit GetOneRoomEventJob(const QString& roomId, const QString& eventId);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetOneRoomEventJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventId);

            ~GetOneRoomEventJob() override;

            // Result properties

            /// The full event.
            EventPtr&& data();

        protected:
            Status parseJson(const QJsonDocument& data) override;

        private:
            class Private;
            QScopedPointer<Private> d;
    };

    /// Get the state identified by the type and key.
    ///
    /// Looks up the contents of a state event in a room. If the user is
    /// joined to the room then the state is taken from the current
    /// state of the room. If the user has left the room then the state is
    /// taken from the state of the room when they left.
    class GetRoomStateWithKeyJob : public BaseJob
    {
        public:
            /*! Get the state identified by the type and key.
             * \param roomId
             *   The room to look up the state in.
             * \param eventType
             *   The type of state to look up.
             * \param stateKey
             *   The key of the state to look up.
             */
            explicit GetRoomStateWithKeyJob(const QString& roomId, const QString& eventType, const QString& stateKey);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetRoomStateWithKeyJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventType, const QString& stateKey);

    };

    /// Get the state identified by the type, with the empty state key.
    ///
    /// Looks up the contents of a state event in a room. If the user is
    /// joined to the room then the state is taken from the current
    /// state of the room. If the user has left the room then the state is
    /// taken from the state of the room when they left.
    /// 
    /// This looks up the state event with the empty state key.
    class GetRoomStateByTypeJob : public BaseJob
    {
        public:
            /*! Get the state identified by the type, with the empty state key.
             * \param roomId
             *   The room to look up the state in.
             * \param eventType
             *   The type of state to look up.
             */
            explicit GetRoomStateByTypeJob(const QString& roomId, const QString& eventType);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetRoomStateByTypeJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId, const QString& eventType);

    };

    /// Get all state events in the current state of a room.
    ///
    /// Get the state events for the current state of a room.
    class GetRoomStateJob : public BaseJob
    {
        public:
            /*! Get all state events in the current state of a room.
             * \param roomId
             *   The room to look up the state for.
             */
            explicit GetRoomStateJob(const QString& roomId);

            /*! Construct a URL without creating a full-fledged job object
             *
             * This function can be used when a URL for
             * GetRoomStateJob is necessary but the job
             * itself isn't.
             */
            static QUrl makeRequestUrl(QUrl baseUrl, const QString& roomId);

            ~GetRoomStateJob() override;

            // Result properties

            /// If the user is a member of the room this will be the
            /// current state of the room as a list of events. If the user
            /// has left the room then this will be the state of the room
            /// when they left as a list of events.
            StateEvents&& data();

        protected:
            Status parseJson(const QJsonDocument& data) override;

        private:
            class Private;
            QScopedPointer<Private> d;
    };

    /// Get the m.room.member events for the room.
    ///
    /// Get the list of members for this room.
    class GetMembersByRoomJob : public BaseJob
    {
        public:
            /*! Get the m.room.member events for the room.
             * \param roomId
             *   The room to get the member events for.
             * \param at
             *   The token defining the timeline position as-of which to return
             *   the list of members. This token can be obtained from a batch token
             *   returned for each room by the sync API, or from
             *   a ``start``/``end`` token returned by a ``/messages`` request.
{'fraction_non_alphanumeric': 0.08035345610702783, 'fraction_numerical': 0.0, 'mean_word_length': 1.6539557308788078, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6465118', 'n_tokens_mistral': 2989, 'n_tokens_neox': 2927, 'n_words': 1379}