io.agora.rtc

## Class UserInfo

- java.lang.Object
- - io.agora.rtc.UserInfo

-     public class UserInfo
      extends java.lang.Object

  Information about user.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `hasAudio` Whether user has audio (1) or not (0)
    `private int` | `hasVideo` Whether user has video (1) or not (0)
    `private java.lang.String` | `userId` User ID

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `UserInfo()` Default constructor for UserInfo.
    `UserInfo(java.lang.String userId, int hasAudio, int hasVideo)` Constructs UserInfo with user ID and media flags.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getHasAudio()` Gets whether user has audio.
    `int` | `getHasVideo()` Gets whether user has video.
    `java.lang.String` | `getUserId()` Gets the user ID.
    `void` | `setHasAudio(int hasAudio)` Sets whether user has audio.
    `void` | `setHasVideo(int hasVideo)` Sets whether user has video.
    `void` | `setUserId(java.lang.String userId)` Sets the user ID.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### userId

          private java.lang.String userId

      User ID

    - #### hasAudio

          private int hasAudio

      Whether user has audio (1) or not (0)

    - #### hasVideo

          private int hasVideo

      Whether user has video (1) or not (0)

  - ### Constructor Detail

    - #### UserInfo

          public UserInfo()

      Default constructor for UserInfo.

    - #### UserInfo

          public UserInfo(java.lang.String userId,
                          int hasAudio,
                          int hasVideo)

      Constructs UserInfo with user ID and media flags.
      Parameters:
        `userId` - User ID
        `hasAudio` - Whether user has audio (1) or not (0)
        `hasVideo` - Whether user has video (1) or not (0)

  - ### Method Detail

    - #### getUserId

          public java.lang.String getUserId()

      Gets the user ID.
      Returns:
        User ID

    - #### setUserId

          public void setUserId(java.lang.String userId)

      Sets the user ID.
      Parameters:
        `userId` - User ID

    - #### getHasAudio

          public int getHasAudio()

      Gets whether user has audio.
      Returns:
        1 if user has audio, 0 otherwise

    - #### setHasAudio

          public void setHasAudio(int hasAudio)

      Sets whether user has audio.
      Parameters:
        `hasAudio` - 1 if user has audio, 0 otherwise

    - #### getHasVideo

          public int getHasVideo()

      Gets whether user has video.
      Returns:
        1 if user has video, 0 otherwise

    - #### setHasVideo

          public void setHasVideo(int hasVideo)

      Sets whether user has video.
      Parameters:
        `hasVideo` - 1 if user has video, 0 otherwise