User
    
    
      
    
    
      
      使用集合让一切井井有条
    
    
      
      根据您的偏好保存内容并对其进行分类。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
    
    
    
      
      
        Google Chat 用户。作为请求的输出返回时,如果您的 Chat 应用以用户的身份进行身份验证,则 User 资源的输出只会填充用户的 name 和 type。
      
      
        
          
            
              | JSON 表示法 | 
            
          
          
            
              {
  "name": string,
  "displayName": string,
  "domainId": string,
  "type": enum (Type),
  "isAnonymous": boolean
} | 
            
          
        
      
      
        
          
            
            
          
          
            
              | 字段 | 
            
          
          
            
              name | 
              
                 string 
                Google Chat 消息 user 的资源名称。 格式:users/{user}。users/app 可用作发起调用的应用 bot 用户的别名。 对于 human users,{user} 是与以下内容相同的用户标识符: 
                
                  People API 中 Person 的 id。例如,Chat API 中的 users/123456789 表示与 People API 中的 123456789 Person 个人资料 ID 相同的用户。  
                  Admin SDK Directory API 中针对用户的 id。  
                  用户的电子邮件地址可在 API 请求中用作 {user} 的别名。例如,如果 user@example.com 的 People API Person 个人资料 ID 为 123456789,则可以使用 users/user@example.com 作为别名来引用 users/123456789。API 只会返回规范资源名称(例如 users/123456789)。  
                 
               | 
            
            
              displayName | 
              
                 string 
                仅限输出。用户的显示名称。 
               | 
            
            
              domainId | 
              
                 string 
                用户 Google Workspace 网域的唯一标识符。 
               | 
            
            
              type | 
              
                 enum (Type) 
                用户类型。 
               | 
            
            
              isAnonymous | 
              
                 boolean 
                仅限输出。设为 true 时,系统会删除用户或其个人资料。 
               | 
            
          
        
      
      
        类型
        
        
          
            
              
              
            
            
              
                | 枚举 | 
              
            
            
              
                TYPE_UNSPECIFIED | 
                枚举的默认值。请勿使用。 | 
              
              
                HUMAN | 
                真人用户。 | 
              
              
                BOT | 
                Chat 应用用户。 | 
              
            
          
        
      
    
  
  
  
  
    
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-25。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-25。"],[],["The JSON representation defines a user with fields including `name` (resource identifier), `displayName` (user's name), `domainId` (Google Workspace domain), `type` (user or bot), and `isAnonymous` (deleted/hidden profile status). The `name` field uses aliases like email or People API ID. User types include `HUMAN` and `BOT`. Authenticated Chat app users only show `name` and `type` in request outputs. `type` is an enum with possible values like `HUMAN` and `BOT`.\n"]]