type: object
properties:
    roomId:
        type: string
        example: 'room-123'
        description: >
            The unique identifier of the room. This ID is generated by combining the room name with a unique identifier.
    roomName:
        type: string
        example: 'room'
        description: |
            The display name of the room, used to identify it in a user-friendly way. This value does not need to be unique.
    owner:
        type: string
        example: 'alice_smith'
        description: |
            The userId of the internal Meet user who owns this room.

            If the room was created by a registered Meet user, this will be their userId.
            If the room was created via the REST API using an API key, this will be the userId of the global admin (root user).
    creationDate:
        type: number
        example: 1620000000000
        description: >
            The creation date of the room in milliseconds since the Unix epoch.
    autoDeletionDate:
        type: [number, 'null']
        example: 1900000000000
        description: |
            The timestamp (in milliseconds since the Unix epoch) specifying when the room will be automatically deleted.
            This must be at least one hour in the future.

            After this time, the room is closed to new participants and scheduled for deletion. 
            It will be removed after the last participant leaves (graceful deletion).

            If not set, the room remains active until manually deleted.
    autoDeletionPolicy:
        description: >
            Policy for automatic deletion of the room and its contents. This includes
            settings for how the room should be handled when certain conditions are met.
        type: object
        properties:
            withMeeting:
                type: string
                enum:
                    - force
                    - when_meeting_ends
                default: when_meeting_ends
                example: when_meeting_ends
                description: |
                    Policy for automatic deletion when the room has an active meeting. Options are:
                    - force: The meeting will be ended, and the room will be deleted without waiting for participants to leave.
                    - when_meeting_ends: The room will be deleted when the meeting ends.
            withRecordings:
                type: string
                enum:
                    - force
                    - close
                default: close
                example: close
                description: |
                    Policy for automatic deletion when the room has recordings. Options are:
                    - force: The room and its recordings will be deleted.
                    - close: The room will be closed instead of deleted, maintaining its recordings.
    config:
        $ref: meet-room-config.yaml#/MeetRoomConfig
        description: The config for the room.
    # maxParticipants:
    #     type: integer
    #     example: 10
    #     description: >
    #         The maximum number of participants allowed in the room. If the number of participants exceeds
    #         this limit, new participants will not be allowed to join.
    roles:
        description: >
            Roles for the room. Defines the complete permissions for moderator and speaker roles.
        type: object
        properties:
            moderator:
                type: object
                properties:
                    permissions:
                        $ref: meet-permissions.yaml
                        description: >
                            The complete set of permissions for the moderator role. These define what moderators can do in the meeting.
            speaker:
                type: object
                properties:
                    permissions:
                        $ref: meet-permissions.yaml
                        description: >
                            The complete set of permissions for the speaker role. These define what speakers can do in the meeting.
    anonymous:
        description: >
            Configuration for anonymous access to the room. Defines which roles have anonymous access enabled and their access URLs.
        type: object
        properties:
            moderator:
                type: object
                properties:
                    enabled:
                        type: boolean
                        example: true
                        description: >
                            Whether anonymous access with moderator role is enabled.
                    accessUrl:
                        type: string
                        format: uri
                        example: 'http://localhost:6080/room/room-123?secret=123456'
                        description: >
                            The URL for anonymous moderators to access the room.
            speaker:
                type: object
                properties:
                    enabled:
                        type: boolean
                        example: true
                        description: >
                            Whether anonymous access with speaker role is enabled.
                    accessUrl:
                        type: string
                        format: uri
                        example: 'http://localhost:6080/room/room-123?secret=654321'
                        description: >
                            The URL for anonymous speakers to access the room.
    accessUrl:
        type: string
        format: uri
        example: 'http://localhost:6080/room/room-123'
        description: |
            The general access URL for authenticated users to join the room.

            This URL should be used by:
            - The room owner (internal Meet user who created the room)
            - Internal Meet users who are members of the room
    status:
        type: string
        enum:
            - open
            - active_meeting
            - closed
        example: open
        description: |
            The current status of the room. Options are:
            - open: The room is open and available to host a meeting.
            - active_meeting: There is an active meeting in progress in the room.
            - closed: The room is closed to hosting new meetings.
    meetingEndAction:
        type: string
        enum:
            - none
            - delete
            - close
        example: none
        description: |
            The action to take when the meeting ends. Options are:
            - none: No action will be taken.
            - close: The room will be closed.
            - delete: The room (and its recordings if any) will be deleted.
