File size: 224,649 Bytes
4cef980
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
{
"auth": {
"oauth2": {
"scopes": {
"https://www.googleapis.com/auth/chat.admin.delete": {
"description": "Delete conversations and spaces owned by your organization and remove access to associated files in Google Chat"
},
"https://www.googleapis.com/auth/chat.admin.memberships": {
"description": "View, add, update and remove members and managers in conversations owned by your organization"
},
"https://www.googleapis.com/auth/chat.admin.memberships.readonly": {
"description": "View members and managers in conversations owned by your organization"
},
"https://www.googleapis.com/auth/chat.admin.spaces": {
"description": "View or edit display name, description, and other metadata for all Google Chat conversations owned by your organization"
},
"https://www.googleapis.com/auth/chat.admin.spaces.readonly": {
"description": "View display name, description, and other metadata for all Google Chat conversations owned by your organization"
},
"https://www.googleapis.com/auth/chat.bot": {
"description": "Private Service: https://www.googleapis.com/auth/chat.bot"
},
"https://www.googleapis.com/auth/chat.delete": {
"description": "Delete conversations and spaces & remove access to associated files in Google Chat"
},
"https://www.googleapis.com/auth/chat.import": {
"description": "Import spaces, messages, and memberships into Google Chat."
},
"https://www.googleapis.com/auth/chat.memberships": {
"description": "View, add, update, and remove members from conversations in Google Chat"
},
"https://www.googleapis.com/auth/chat.memberships.app": {
"description": "Add and remove itself from conversations in Google Chat"
},
"https://www.googleapis.com/auth/chat.memberships.readonly": {
"description": "View members in Google Chat conversations."
},
"https://www.googleapis.com/auth/chat.messages": {
"description": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages."
},
"https://www.googleapis.com/auth/chat.messages.create": {
"description": "Compose and send messages in Google Chat"
},
"https://www.googleapis.com/auth/chat.messages.reactions": {
"description": "View, add, and delete reactions to messages in Google Chat"
},
"https://www.googleapis.com/auth/chat.messages.reactions.create": {
"description": "Add reactions to messages in Google Chat"
},
"https://www.googleapis.com/auth/chat.messages.reactions.readonly": {
"description": "View reactions to messages in Google Chat"
},
"https://www.googleapis.com/auth/chat.messages.readonly": {
"description": "View messages and reactions in Google Chat"
},
"https://www.googleapis.com/auth/chat.spaces": {
"description": "Create conversations and spaces and see or edit metadata (including history settings and access settings) in Google Chat"
},
"https://www.googleapis.com/auth/chat.spaces.create": {
"description": "Create new conversations in Google Chat"
},
"https://www.googleapis.com/auth/chat.spaces.readonly": {
"description": "View chat and spaces in Google Chat"
},
"https://www.googleapis.com/auth/chat.users.readstate": {
"description": "View and modify last read time for Google Chat conversations"
},
"https://www.googleapis.com/auth/chat.users.readstate.readonly": {
"description": "View last read time for Google Chat conversations"
}
}
}
},
"basePath": "",
"baseUrl": "https://chat.googleapis.com/",
"batchPath": "batch",
"canonicalName": "Hangouts Chat",
"description": "The Google Chat API lets you build Chat apps to integrate your services with Google Chat and manage Chat resources such as spaces, members, and messages.",
"discoveryVersion": "v1",
"documentationLink": "https://developers.google.com/hangouts/chat",
"fullyEncodeReservedExpansion": true,
"icons": {
"x16": "http://www.google.com/images/icons/product/search-16.gif",
"x32": "http://www.google.com/images/icons/product/search-32.gif"
},
"id": "chat:v1",
"kind": "discovery#restDescription",
"mtlsRootUrl": "https://chat.mtls.googleapis.com/",
"name": "chat",
"ownerDomain": "google.com",
"ownerName": "Google",
"parameters": {
"$.xgafv": {
"description": "V1 error format.",
"enum": [
"1",
"2"
],
"enumDescriptions": [
"v1 error format",
"v2 error format"
],
"location": "query",
"type": "string"
},
"access_token": {
"description": "OAuth access token.",
"location": "query",
"type": "string"
},
"alt": {
"default": "json",
"description": "Data format for response.",
"enum": [
"json",
"media",
"proto"
],
"enumDescriptions": [
"Responses with Content-Type of application/json",
"Media download with context-dependent Content-Type",
"Responses with Content-Type of application/x-protobuf"
],
"location": "query",
"type": "string"
},
"callback": {
"description": "JSONP",
"location": "query",
"type": "string"
},
"fields": {
"description": "Selector specifying which fields to include in a partial response.",
"location": "query",
"type": "string"
},
"key": {
"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
"location": "query",
"type": "string"
},
"oauth_token": {
"description": "OAuth 2.0 token for the current user.",
"location": "query",
"type": "string"
},
"prettyPrint": {
"default": "true",
"description": "Returns response with indentations and line breaks.",
"location": "query",
"type": "boolean"
},
"quotaUser": {
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query",
"type": "string"
},
"uploadType": {
"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
"location": "query",
"type": "string"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
"location": "query",
"type": "string"
}
},
"protocol": "rest",
"resources": {
"media": {
"methods": {
"download": {
"description": "Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.",
"flatPath": "v1/media/{mediaId}",
"httpMethod": "GET",
"id": "chat.media.download",
"parameterOrder": [
"resourceName"
],
"parameters": {
"resourceName": {
"description": "Name of the media that is being downloaded. See ReadRequest.resource_name.",
"location": "path",
"pattern": "^.*$",
"required": true,
"type": "string"
}
},
"path": "v1/media/{+resourceName}",
"response": {
"$ref": "Media"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.readonly"
],
"supportsMediaDownload": true
},
"upload": {
"description": "Uploads an attachment. For an example, see [Upload media as a file attachment](https://developers.google.com/workspace/chat/upload-media-attachments). Requires user [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). You can upload attachments up to 200 MB. Certain file types aren't supported. For details, see [File types blocked by Google Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat).",
"flatPath": "v1/spaces/{spacesId}/attachments:upload",
"httpMethod": "POST",
"id": "chat.media.upload",
"mediaUpload": {
"accept": [
"*/*"
],
"maxSize": "209715200",
"protocols": {
"resumable": {
"multipart": true,
"path": "/resumable/upload/v1/{+parent}/attachments:upload"
},
"simple": {
"multipart": true,
"path": "/upload/v1/{+parent}/attachments:upload"
}
}
},
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. Resource name of the Chat space in which the attachment is uploaded. Format \"spaces/{space}\".",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/attachments:upload",
"request": {
"$ref": "UploadAttachmentRequest"
},
"response": {
"$ref": "UploadAttachmentResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.create"
],
"supportsMediaUpload": true
}
}
},
"spaces": {
"methods": {
"completeImport": {
"description": "Completes the [import process](https://developers.google.com/workspace/chat/import-data) for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see [Authorize Google Chat apps to import data](https://developers.google.com/workspace/chat/authorize-import).",
"flatPath": "v1/spaces/{spacesId}:completeImport",
"httpMethod": "POST",
"id": "chat.spaces.completeImport",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the import mode space. Format: `spaces/{space}`",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}:completeImport",
"request": {
"$ref": "CompleteImportSpaceRequest"
},
"response": {
"$ref": "CompleteImportSpaceResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.import"
]
},
"create": {
"description": "Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/workspace/chat/create-spaces). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces",
"httpMethod": "POST",
"id": "chat.spaces.create",
"parameterOrder": [],
"parameters": {
"requestId": {
"description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.",
"location": "query",
"type": "string"
}
},
"path": "v1/spaces",
"request": {
"$ref": "Space"
},
"response": {
"$ref": "Space"
},
"scopes": [
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.create"
]
},
"delete": {
"description": "Deletes a named space. Always performs a cascading delete, which means that the space's child resources\u2014like messages posted in the space and memberships in the space\u2014are also deleted. For an example, see [Delete a space](https://developers.google.com/workspace/chat/delete-spaces). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) from a user who has permission to delete the space.",
"flatPath": "v1/spaces/{spacesId}",
"httpMethod": "DELETE",
"id": "chat.spaces.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the space to delete. Format: `spaces/{space}`",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.delete",
"https://www.googleapis.com/auth/chat.delete",
"https://www.googleapis.com/auth/chat.import"
]
},
"findDirectMessage": {
"description": "Returns the existing direct message with the specified user. If no direct message space is found, returns a `404 NOT_FOUND` error. For an example, see [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). With [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), returns the direct message space between the specified user and the authenticated user. With [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), returns the direct message space between the specified user and the calling Chat app. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) or [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).",
"flatPath": "v1/spaces:findDirectMessage",
"httpMethod": "GET",
"id": "chat.spaces.findDirectMessage",
"parameterOrder": [],
"parameters": {
"name": {
"description": "Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `id` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API profile ID is `123456789`, you can find a direct message with that person by using `users/123456789` as the `name`. When [authenticated as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.",
"location": "query",
"type": "string"
}
},
"path": "v1/spaces:findDirectMessage",
"response": {
"$ref": "Space"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.readonly"
]
},
"get": {
"description": "Returns details about a space. For an example, see [Get details about a space](https://developers.google.com/workspace/chat/get-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}",
"httpMethod": "GET",
"id": "chat.spaces.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the space, in the form `spaces/{space}`. Format: `spaces/{space}`",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Space"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.spaces",
"https://www.googleapis.com/auth/chat.admin.spaces.readonly",
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.readonly"
]
},
"list": {
"description": "Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see [List spaces](https://developers.google.com/workspace/chat/list-spaces). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Lists spaces visible to the caller or authenticated user. Group chats and DMs aren't listed until the first message is sent. To list all named spaces by Google Workspace organization, use the [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) method using Workspace administrator privileges instead.",
"flatPath": "v1/spaces",
"httpMethod": "GET",
"id": "chat.spaces.list",
"parameterOrder": [],
"parameters": {
"filter": {
"description": "Optional. A query filter. You can filter spaces by the space type ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). To filter by space type, you must specify valid enum value, such as `SPACE` or `GROUP_CHAT` (the `space_type` can't be `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` operator. For example, the following queries are valid: ``` space_type = \"SPACE\" spaceType = \"GROUP_CHAT\" OR spaceType = \"DIRECT_MESSAGE\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results.",
"location": "query",
"type": "string"
}
},
"path": "v1/spaces",
"response": {
"$ref": "ListSpacesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.readonly"
]
},
"patch": {
"description": "Updates a space. For an example, see [Update a space](https://developers.google.com/workspace/chat/update-spaces). If you're updating the `displayName` field and receive the error message `ALREADY_EXISTS`, try a different display name.. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}",
"httpMethod": "PATCH",
"id": "chat.spaces.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Resource name of the space. Format: `spaces/{space}`",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Required. The updated field paths, comma separated if there are multiple. Currently supported field paths: - `display_name` (Only supports changing the display name of a space with the `SPACE` type, or when also including the `space_type` mask to change a `GROUP_CHAT` space type to `SPACE`. Trying to update the display name of a `GROUP_CHAT` or a `DIRECT_MESSAGE` space results in an invalid argument error. If you receive the error message `ALREADY_EXISTS` when updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name.) - `space_type` (Only supports changing a `GROUP_CHAT` space type to `SPACE`. Include `display_name` together with `space_type` in the update mask and ensure that the specified space has a non-empty display name and the `SPACE` space type. Including the `space_type` mask and the `SPACE` type in the specified space when updating the display name is optional if the existing space already has the `SPACE` type. Trying to update the space type in other ways results in an invalid argument error). `space_type` is not supported with admin access. - `space_details` - `space_history_state` (Supports [turning history on or off for the space](https://support.google.com/chat/answer/7664687) if [the organization allows users to change their history setting](https://support.google.com/a/answer/7664184). Warning: mutually exclusive with all other field paths.) `space_history_state` is not supported with admin access. - `access_settings.audience` (Supports changing the [access setting](https://support.google.com/chat/answer/11971020) of who can discover the space, join the space, and preview the messages in space. If no audience is specified in the access setting, the space's access setting is updated to private. Warning: mutually exclusive with all other field paths.) `access_settings.audience` is not supported with admin access. - Developer Preview: Supports changing the [permission settings](https://support.google.com/chat/answer/13340792) of a space, supported field paths include: `permission_settings.manage_members_and_groups`, `permission_settings.modify_space_details`, `permission_settings.toggle_history`, `permission_settings.use_at_mention_all`, `permission_settings.manage_apps`, `permission_settings.manage_webhooks`, `permission_settings.reply_messages` (Warning: mutually exclusive with all other non-permission settings field paths). `permission_settings` is not supported with admin access.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "Space"
},
"response": {
"$ref": "Space"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.spaces",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.spaces"
]
},
"setup": {
"description": "Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space with initial members](https://developers.google.com/workspace/chat/set-up-spaces). To specify the human members to add, add memberships with the appropriate `membership.member.name`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. To specify the Google groups to add, add memberships with the appropriate `membership.group_member.name`. To add or invite a Google group, use `groups/{group}`, where `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can use [Cloud Identity Groups lookup API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID `123456789` for group email `group@example.com`, then you can add the group to the space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not supported, and Google groups can only be added as members in named spaces. For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [Invite or add a user or app to a space](https://developers.google.com/workspace/chat/create-members). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces:setup",
"httpMethod": "POST",
"id": "chat.spaces.setup",
"parameterOrder": [],
"parameters": {},
"path": "v1/spaces:setup",
"request": {
"$ref": "SetUpSpaceRequest"
},
"response": {
"$ref": "Space"
},
"scopes": [
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.create"
]
}
},
"resources": {
"members": {
"methods": {
"create": {
"description": "Creates a human membership or app membership for the calling app. Creating memberships for other apps isn't supported. For an example, see [Invite or add a user or a Google Chat app to a space](https://developers.google.com/workspace/chat/create-members). When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To specify the member to add, set the `membership.member.name` for the human or app member, or set the `membership.group_member.name` for the group member. - To add the calling app to a space or a direct message between two human users, use `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `id` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. - To add or invite a Google group in a named space, use `groups/{group}`, where `{group}` is the `id` for the group from the Cloud Identity Groups API. For example, you can use [Cloud Identity Groups lookup API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) to retrieve the ID `123456789` for group email `group@example.com`, then you can add or invite the group to a named space by setting the `membership.group_member.name` to `groups/123456789`. Group email is not supported, and Google groups can only be added as members in named spaces.",
"flatPath": "v1/spaces/{spacesId}/members",
"httpMethod": "POST",
"id": "chat.spaces.members.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The resource name of the space for which to create the membership. Format: spaces/{space}",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/members",
"request": {
"$ref": "Membership"
},
"response": {
"$ref": "Membership"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.memberships",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.memberships",
"https://www.googleapis.com/auth/chat.memberships.app"
]
},
"delete": {
"description": "Deletes a membership. For an example, see [Remove a user or a Google Chat app from a space](https://developers.google.com/workspace/chat/delete-members). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/members/{membersId}",
"httpMethod": "DELETE",
"id": "chat.spaces.members.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. You can use the email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. When deleting an app membership, requires the `chat.memberships.app` scope and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.",
"location": "path",
"pattern": "^spaces/[^/]+/members/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Membership"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.memberships",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.memberships",
"https://www.googleapis.com/auth/chat.memberships.app"
]
},
"get": {
"description": "Returns details about a membership. For an example, see [Get details about a user's or Google Chat app's membership](https://developers.google.com/workspace/chat/get-members). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/members/{membersId}",
"httpMethod": "GET",
"id": "chat.spaces.members.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the membership to retrieve. To get the app's own membership [by using user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can optionally use `spaces/{space}/members/app`. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` When [authenticated as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), you can use the user's email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.",
"location": "path",
"pattern": "^spaces/[^/]+/members/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Membership"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.memberships",
"https://www.googleapis.com/auth/chat.admin.memberships.readonly",
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.memberships",
"https://www.googleapis.com/auth/chat.memberships.readonly"
]
},
"list": {
"description": "Lists memberships in a space. For an example, see [List users and Google Chat apps in a space](https://developers.google.com/workspace/chat/list-members). Listing memberships with [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with [User authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) lists memberships in spaces that the authenticated user has access to. Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/members",
"httpMethod": "GET",
"id": "chat.spaces.members.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "Optional. A query filter. You can filter memberships by a member's role ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) and type ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer Preview: You can also filter for `member.type` using the `!=` operator. To filter by both role and type, use the `AND` operator. To filter by either role or type, use the `OR` operator. Either `member.type = \"HUMAN\"` or `member.type != \"BOT\"` is required when `use_admin_access` is set to true. Other member type filters will be rejected. For example, the following queries are valid: ``` role = \"ROLE_MANAGER\" OR role = \"ROLE_MEMBER\" member.type = \"HUMAN\" AND role = \"ROLE_MANAGER\" member.type != \"BOT\" ``` The following queries are invalid: ``` member.type = \"HUMAN\" AND member.type = \"BOT\" role = \"ROLE_MANAGER\" AND role = \"ROLE_MEMBER\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space}",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
},
"showGroups": {
"description": "Optional. When `true`, also returns memberships associated with a Google Group, in addition to other types of memberships. If a filter is set, Google Group memberships that don't match the filter criteria aren't returned.",
"location": "query",
"type": "boolean"
},
"showInvited": {
"description": "Optional. When `true`, also returns memberships associated with invited members, in addition to other types of memberships. If a filter is set, invited memberships that don't match the filter criteria aren't returned. Currently requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"location": "query",
"type": "boolean"
}
},
"path": "v1/{+parent}/members",
"response": {
"$ref": "ListMembershipsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.memberships",
"https://www.googleapis.com/auth/chat.admin.memberships.readonly",
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.memberships",
"https://www.googleapis.com/auth/chat.memberships.readonly"
]
},
"patch": {
"description": "Updates a membership. For an example, see [Update a user's membership in a space](https://developers.google.com/workspace/chat/update-members). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/members/{membersId}",
"httpMethod": "PATCH",
"id": "chat.spaces.members.patch",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`",
"location": "path",
"pattern": "^spaces/[^/]+/members/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `role`",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "Membership"
},
"response": {
"$ref": "Membership"
},
"scopes": [
"https://www.googleapis.com/auth/chat.admin.memberships",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.memberships"
]
}
}
},
"messages": {
"methods": {
"create": {
"description": "Creates a message in a Google Chat space. The maximum message size, including text and cards, is 32,000 bytes. For an example, see [Send a message](https://developers.google.com/workspace/chat/create-messages). Calling this method requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize) and supports the following authentication types: - For text messages, user authentication or app authentication are supported. - For card messages, only app authentication is supported. (Only Chat apps can create card messages.)",
"flatPath": "v1/spaces/{spacesId}/messages",
"httpMethod": "POST",
"id": "chat.spaces.messages.create",
"parameterOrder": [
"parent"
],
"parameters": {
"messageId": {
"description": "Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message `name` field). The value for this field must meet the following requirements: * Begins with `client-`. For example, `client-custom-name` is a valid custom ID, but `custom-name` is not. * Contains up to 63 characters and only lowercase letters, numbers, and hyphens. * Is unique within a space. A Chat app can't use the same custom ID for different messages. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"location": "query",
"type": "string"
},
"messageReplyOption": {
"description": "Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces.",
"enum": [
"MESSAGE_REPLY_OPTION_UNSPECIFIED",
"REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD",
"REPLY_MESSAGE_OR_FAIL"
],
"enumDescriptions": [
"Default. Starts a new thread. Using this option ignores any thread ID or `thread_key` that's included.",
"Creates the message as a reply to the thread specified by thread ID or `thread_key`. If it fails, the message starts a new thread instead.",
"Creates the message as a reply to the thread specified by thread ID or `thread_key`. If a new `thread_key` is used, a new thread is created. If the message creation fails, a `NOT_FOUND` error is returned instead."
],
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The resource name of the space in which to create a message. Format: `spaces/{space}`",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
},
"requestId": {
"description": "Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message.",
"location": "query",
"type": "string"
},
"threadKey": {
"deprecated": true,
"description": "Optional. Deprecated: Use thread.thread_key instead. ID for the thread. Supports up to 4000 characters. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread).",
"location": "query",
"type": "string"
}
},
"path": "v1/{+parent}/messages",
"request": {
"$ref": "Message"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.create"
]
},
"delete": {
"description": "Deletes a message. For an example, see [Delete a message](https://developers.google.com/workspace/chat/delete-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only delete messages created by the calling Chat app.",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
"httpMethod": "DELETE",
"id": "chat.spaces.messages.delete",
"parameterOrder": [
"name"
],
"parameters": {
"force": {
"description": "When `true`, deleting a message also deletes its threaded replies. When `false`, if a message has threaded replies, deletion fails. Only applies when [authenticating as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Has no effect when [authenticating as a Chat app] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).",
"location": "query",
"type": "boolean"
},
"name": {
"description": "Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{message}`. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages"
]
},
"get": {
"description": "Returns details about a message. For an example, see [Get details about a message](https://developers.google.com/workspace/chat/get-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). Note: Might return a message from a blocked member or space.",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
"httpMethod": "GET",
"id": "chat.spaces.messages.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the message. Format: `spaces/{space}/messages/{message}` If you've set a custom ID for your message, you can use the value from the `clientAssignedMessageId` field for `{message}`. For details, see [Name a message] (https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Message"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.readonly"
]
},
"list": {
"description": "Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. For an example, see [List messages](/chat/api/guides/v1/messages/list). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/messages",
"httpMethod": "GET",
"id": "chat.spaces.messages.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "A query filter. You can filter messages by date (`create_time`) and thread (`thread.name`). To filter messages by the date they were created, specify the `create_time` with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and double quotation marks. For example, `\"2023-04-21T11:30:00-04:00\"`. You can use the greater than operator `>` to list messages that were created after a timestamp, or the less than operator `<` to list messages that were created before a timestamp. To filter messages within a time interval, use the `AND` operator between two timestamps. To filter by thread, specify the `thread.name`, formatted as `spaces/{space}/threads/{thread}`. You can only specify one `thread.name` per query. To filter by both thread and date, use the `AND` operator in your query. For example, the following queries are valid: ``` create_time > \"2012-04-21T11:30:00-04:00\" create_time > \"2012-04-21T11:30:00-04:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 create_time > \"2012-04-21T11:30:00+00:00\" AND create_time < \"2013-01-01T00:00:00+00:00\" AND thread.name = spaces/AAAAAAAAAAA/threads/123 thread.name = spaces/AAAAAAAAAAA/threads/123 ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
"location": "query",
"type": "string"
},
"orderBy": {
"description": "Optional, if resuming from a previous query. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows: - `ASC` for ascending. - `DESC` for descending. The default ordering is `create_time ASC`.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an `INVALID_ARGUMENT` error.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Optional, if resuming from a previous query. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The resource name of the space to list messages from. Format: `spaces/{space}`",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
},
"showDeleted": {
"description": "Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable.",
"location": "query",
"type": "boolean"
}
},
"path": "v1/{+parent}/messages",
"response": {
"$ref": "ListMessagesResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.readonly"
]
},
"patch": {
"description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/workspace/chat/update-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only update messages created by the calling Chat app.",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
"httpMethod": "PATCH",
"id": "chat.spaces.messages.patch",
"parameterOrder": [
"name"
],
"parameters": {
"allowMissing": {
"description": "Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) or the request fails.",
"location": "query",
"type": "boolean"
},
"name": {
"description": "Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `accessory_widgets` (Requires [app authentication](/chat/api/guides/auth/service-accounts).)",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "Message"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages"
]
},
"update": {
"description": "Updates a message. There's a difference between the `patch` and `update` methods. The `patch` method uses a `patch` request while the `update` method uses a `put` request. We recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/workspace/chat/update-messages). Requires [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). Supports [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) and [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). When using app authentication, requests can only update messages created by the calling Chat app.",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}",
"httpMethod": "PUT",
"id": "chat.spaces.messages.update",
"parameterOrder": [
"name"
],
"parameters": {
"allowMissing": {
"description": "Optional. If `true` and the message isn't found, a new message is created and `updateMask` is ignored. The specified message ID must be [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) or the request fails.",
"location": "query",
"type": "boolean"
},
"name": {
"description": "Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Required. The field paths to update. Separate multiple values with commas or use `*` to update all field paths. Currently supported field paths: - `text` - `attachment` - `cards` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `cards_v2` (Requires [app authentication](/chat/api/guides/auth/service-accounts).) - `accessory_widgets` (Requires [app authentication](/chat/api/guides/auth/service-accounts).)",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "Message"
},
"response": {
"$ref": "Message"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot",
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages"
]
}
},
"resources": {
"attachments": {
"methods": {
"get": {
"description": "Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). For an example, see [Get metadata about a message attachment](https://developers.google.com/workspace/chat/get-media-attachments). Requires [app authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}",
"httpMethod": "GET",
"id": "chat.spaces.messages.attachments.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the attachment, in the form `spaces/{space}/messages/{message}/attachments/{attachment}`.",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+/attachments/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Attachment"
},
"scopes": [
"https://www.googleapis.com/auth/chat.bot"
]
}
}
},
"reactions": {
"methods": {
"create": {
"description": "Creates a reaction and adds it to a message. Only unicode emojis are supported. For an example, see [Add a reaction to a message](https://developers.google.com/workspace/chat/create-reactions). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions",
"httpMethod": "POST",
"id": "chat.spaces.messages.reactions.create",
"parameterOrder": [
"parent"
],
"parameters": {
"parent": {
"description": "Required. The message where the reaction is created. Format: `spaces/{space}/messages/{message}`",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/reactions",
"request": {
"$ref": "Reaction"
},
"response": {
"$ref": "Reaction"
},
"scopes": [
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.reactions",
"https://www.googleapis.com/auth/chat.messages.reactions.create"
]
},
"delete": {
"description": "Deletes a reaction to a message. Only unicode emojis are supported. For an example, see [Delete a reaction](https://developers.google.com/workspace/chat/delete-reactions). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions/{reactionsId}",
"httpMethod": "DELETE",
"id": "chat.spaces.messages.reactions.delete",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Name of the reaction to delete. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+/reactions/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "Empty"
},
"scopes": [
"https://www.googleapis.com/auth/chat.import",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.reactions"
]
},
"list": {
"description": "Lists reactions to a message. For an example, see [List reactions for a message](https://developers.google.com/workspace/chat/list-reactions). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/spaces/{spacesId}/messages/{messagesId}/reactions",
"httpMethod": "GET",
"id": "chat.spaces.messages.reactions.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "Optional. A query filter. You can filter reactions by [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) (either `emoji.unicode` or `emoji.custom_emoji.uid`) and [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) (`user.name`). To filter reactions for multiple emojis or users, join similar fields with the `OR` operator, such as `emoji.unicode = \"\ud83d\ude42\" OR emoji.unicode = \"\ud83d\udc4d\"` and `user.name = \"users/AAAAAA\" OR user.name = \"users/BBBBBB\"`. To filter reactions by emoji and user, use the `AND` operator, such as `emoji.unicode = \"\ud83d\ude42\" AND user.name = \"users/AAAAAA\"`. If your query uses both `AND` and `OR`, group them with parentheses. For example, the following queries are valid: ``` user.name = \"users/{user}\" emoji.unicode = \"\ud83d\ude42\" emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"\ud83d\ude42\" OR emoji.unicode = \"\ud83d\udc4d\" emoji.unicode = \"\ud83d\ude42\" OR emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"\ud83d\ude42\" AND user.name = \"users/{user}\" (emoji.unicode = \"\ud83d\ude42\" OR emoji.custom_emoji.uid = \"{uid}\") AND user.name = \"users/{user}\" ``` The following queries are invalid: ``` emoji.unicode = \"\ud83d\ude42\" AND emoji.unicode = \"\ud83d\udc4d\" emoji.unicode = \"\ud83d\ude42\" AND emoji.custom_emoji.uid = \"{uid}\" emoji.unicode = \"\ud83d\ude42\" OR user.name = \"users/{user}\" emoji.unicode = \"\ud83d\ude42\" OR emoji.custom_emoji.uid = \"{uid}\" OR user.name = \"users/{user}\" emoji.unicode = \"\ud83d\ude42\" OR emoji.custom_emoji.uid = \"{uid}\" AND user.name = \"users/{user}\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. The message users reacted to. Format: `spaces/{space}/messages/{message}`",
"location": "path",
"pattern": "^spaces/[^/]+/messages/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/reactions",
"response": {
"$ref": "ListReactionsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.reactions",
"https://www.googleapis.com/auth/chat.messages.reactions.readonly",
"https://www.googleapis.com/auth/chat.messages.readonly"
]
}
}
}
}
},
"spaceEvents": {
"methods": {
"get": {
"description": "Returns an event from a Google Chat space. The [event payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated `Message` resource in the event payload. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To get an event, the authenticated user must be a member of the space. For an example, see [Get details about an event from a Google Chat space](https://developers.google.com/workspace/chat/get-space-event).",
"flatPath": "v1/spaces/{spacesId}/spaceEvents/{spaceEventsId}",
"httpMethod": "GET",
"id": "chat.spaces.spaceEvents.get",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. The resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`",
"location": "path",
"pattern": "^spaces/[^/]+/spaceEvents/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "SpaceEvent"
},
"scopes": [
"https://www.googleapis.com/auth/chat.memberships",
"https://www.googleapis.com/auth/chat.memberships.readonly",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.reactions",
"https://www.googleapis.com/auth/chat.messages.reactions.readonly",
"https://www.googleapis.com/auth/chat.messages.readonly",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.readonly"
]
},
"list": {
"description": "Lists events from a Google Chat space. For each event, the [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns `Membership` resources that contain the latest membership details. If new members were removed during the requested period, the event payload contains an empty `Membership` resource. Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). To list events, the authenticated user must be a member of the space. For an example, see [List events from a Google Chat space](https://developers.google.com/workspace/chat/list-space-events).",
"flatPath": "v1/spaces/{spacesId}/spaceEvents",
"httpMethod": "GET",
"id": "chat.spaces.spaceEvents.list",
"parameterOrder": [
"parent"
],
"parameters": {
"filter": {
"description": "Required. A query filter. You must specify at least one event type (`event_type`) using the has `:` operator. To filter by multiple event types, use the `OR` operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions (`google.workspace.chat.reaction.v1.created`), the server also returns batch new reactions events (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported event types, see the [`SpaceEvents` reference documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). Optionally, you can also filter by start time (`start_time`) and end time (`end_time`): * `start_time`: Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days. * `end_time`: Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request. To specify a start or end time, use the equals `=` operator and format in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both `start_time` and `end_time`, use the `AND` operator. For example, the following queries are valid: ``` start_time=\"2023-08-23T19:20:33+00:00\" AND end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` start_time=\"2023-08-23T19:20:33+00:00\" AND (event_types:\"google.workspace.chat.space.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\") ``` The following queries are invalid: ``` start_time=\"2023-08-23T19:20:33+00:00\" OR end_time=\"2023-08-23T19:21:54+00:00\" ``` ``` event_types:\"google.workspace.chat.space.v1.updated\" AND event_types:\"google.workspace.chat.message.v1.created\" ``` Invalid queries are rejected by the server with an `INVALID_ARGUMENT` error.",
"location": "query",
"type": "string"
},
"pageSize": {
"description": "Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an `INVALID_ARGUMENT` error.",
"format": "int32",
"location": "query",
"type": "integer"
},
"pageToken": {
"description": "A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results.",
"location": "query",
"type": "string"
},
"parent": {
"description": "Required. Resource name of the [Google Chat space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) where the events occurred. Format: `spaces/{space}`.",
"location": "path",
"pattern": "^spaces/[^/]+$",
"required": true,
"type": "string"
}
},
"path": "v1/{+parent}/spaceEvents",
"response": {
"$ref": "ListSpaceEventsResponse"
},
"scopes": [
"https://www.googleapis.com/auth/chat.memberships",
"https://www.googleapis.com/auth/chat.memberships.readonly",
"https://www.googleapis.com/auth/chat.messages",
"https://www.googleapis.com/auth/chat.messages.reactions",
"https://www.googleapis.com/auth/chat.messages.reactions.readonly",
"https://www.googleapis.com/auth/chat.messages.readonly",
"https://www.googleapis.com/auth/chat.spaces",
"https://www.googleapis.com/auth/chat.spaces.readonly"
]
}
}
}
}
},
"users": {
"resources": {
"spaces": {
"methods": {
"getSpaceReadState": {
"description": "Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see [Get details about a user's space read state](https://developers.google.com/workspace/chat/get-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/users/{usersId}/spaces/{spacesId}/spaceReadState",
"httpMethod": "GET",
"id": "chat.users.spaces.getSpaceReadState",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the space read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/spaceReadState`. - Their user id. For example, `users/123456789/spaces/{space}/spaceReadState`. Format: users/{user}/spaces/{space}/spaceReadState",
"location": "path",
"pattern": "^users/[^/]+/spaces/[^/]+/spaceReadState$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "SpaceReadState"
},
"scopes": [
"https://www.googleapis.com/auth/chat.users.readstate",
"https://www.googleapis.com/auth/chat.users.readstate.readonly"
]
},
"updateSpaceReadState": {
"description": "Updates a user's read state within a space, used to identify read and unread messages. For an example, see [Update a user's space read state](https://developers.google.com/workspace/chat/update-space-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/users/{usersId}/spaces/{spacesId}/spaceReadState",
"httpMethod": "PATCH",
"id": "chat.users.spaces.updateSpaceReadState",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`",
"location": "path",
"pattern": "^users/[^/]+/spaces/[^/]+/spaceReadState$",
"required": true,
"type": "string"
},
"updateMask": {
"description": "Required. The field paths to update. Currently supported field paths: - `last_read_time` When the `last_read_time` is before the latest message create time, the space appears as unread in the UI. To mark the space as read, set `last_read_time` to any value later (larger) than the latest message create time. The `last_read_time` is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state.",
"format": "google-fieldmask",
"location": "query",
"type": "string"
}
},
"path": "v1/{+name}",
"request": {
"$ref": "SpaceReadState"
},
"response": {
"$ref": "SpaceReadState"
},
"scopes": [
"https://www.googleapis.com/auth/chat.users.readstate"
]
}
},
"resources": {
"threads": {
"methods": {
"getThreadReadState": {
"description": "Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see [Get details about a user's thread read state](https://developers.google.com/workspace/chat/get-thread-read-state). Requires [user authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).",
"flatPath": "v1/users/{usersId}/spaces/{spacesId}/threads/{threadsId}/threadReadState",
"httpMethod": "GET",
"id": "chat.users.spaces.threads.getThreadReadState",
"parameterOrder": [
"name"
],
"parameters": {
"name": {
"description": "Required. Resource name of the thread read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following: - The `me` alias. For example, `users/me/spaces/{space}/threads/{thread}/threadReadState`. - Their Workspace email address. For example, `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - Their user id. For example, `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState",
"location": "path",
"pattern": "^users/[^/]+/spaces/[^/]+/threads/[^/]+/threadReadState$",
"required": true,
"type": "string"
}
},
"path": "v1/{+name}",
"response": {
"$ref": "ThreadReadState"
},
"scopes": [
"https://www.googleapis.com/auth/chat.users.readstate",
"https://www.googleapis.com/auth/chat.users.readstate.readonly"
]
}
}
}
}
}
}
}
},
"revision": "20240701",
"rootUrl": "https://chat.googleapis.com/",
"schemas": {
"AccessSettings": {
"description": "Represents the [access setting](https://support.google.com/chat/answer/11971020) of the space.",
"id": "AccessSettings",
"properties": {
"accessState": {
"description": "Output only. Indicates the access state of the space.",
"enum": [
"ACCESS_STATE_UNSPECIFIED",
"PRIVATE",
"DISCOVERABLE"
],
"enumDescriptions": [
"Access state is unknown or not supported in this API.",
"Space is discoverable by added or invited members or groups.",
"Space is discoverable by the selected [target audience](https://support.google.com/a/answer/9934697), as well as added or invited members or groups."
],
"readOnly": true,
"type": "string"
},
"audience": {
"description": "Optional. The resource name of the [target audience](https://support.google.com/a/answer/9934697) who can discover the space, join the space, and preview the messages in the space. For details, see [Make a space discoverable to a target audience](https://developers.google.com/workspace/chat/space-target-audience). Format: `audiences/{audience}` To use the default target audience for the Google Workspace organization, set to `audiences/default`.",
"type": "string"
}
},
"type": "object"
},
"AccessoryWidget": {
"description": "One or more interactive widgets that appear at the bottom of a message. For details, see [Add interactive widgets at the bottom of a message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets).",
"id": "AccessoryWidget",
"properties": {
"buttonList": {
"$ref": "GoogleAppsCardV1ButtonList",
"description": "A list of buttons."
}
},
"type": "object"
},
"ActionParameter": {
"description": "List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters.",
"id": "ActionParameter",
"properties": {
"key": {
"description": "The name of the parameter for the action script.",
"type": "string"
},
"value": {
"description": "The value of the parameter.",
"type": "string"
}
},
"type": "object"
},
"ActionResponse": {
"description": "Parameters that a Chat app can use to configure how its response is posted.",
"id": "ActionResponse",
"properties": {
"dialogAction": {
"$ref": "DialogAction",
"description": "Input only. A response to an interaction event related to a [dialog](https://developers.google.com/workspace/chat/dialogs). Must be accompanied by `ResponseType.Dialog`."
},
"type": {
"description": "Input only. The type of Chat app response.",
"enum": [
"TYPE_UNSPECIFIED",
"NEW_MESSAGE",
"UPDATE_MESSAGE",
"UPDATE_USER_MESSAGE_CARDS",
"REQUEST_CONFIG",
"DIALOG",
"UPDATE_WIDGET"
],
"enumDescriptions": [
"Default type that's handled as `NEW_MESSAGE`.",
"Post as a new message in the topic.",
"Update the Chat app's message. This is only permitted on a `CARD_CLICKED` event where the message sender type is `BOT`.",
"Update the cards on a user's message. This is only permitted as a response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED` event where the message sender type is `HUMAN`. Text is ignored.",
"Privately ask the user for additional authentication or configuration.",
"Presents a [dialog](https://developers.google.com/workspace/chat/dialogs).",
"Widget text autocomplete options query."
],
"type": "string"
},
"updatedWidget": {
"$ref": "UpdatedWidget",
"description": "Input only. The response of the updated widget."
},
"url": {
"description": "Input only. URL for users to authenticate or configure. (Only for `REQUEST_CONFIG` response types.)",
"type": "string"
}
},
"type": "object"
},
"ActionStatus": {
"description": "Represents the status for a request to either invoke or submit a [dialog](https://developers.google.com/workspace/chat/dialogs).",
"id": "ActionStatus",
"properties": {
"statusCode": {
"description": "The status code.",
"enum": [
"OK",
"CANCELLED",
"UNKNOWN",
"INVALID_ARGUMENT",
"DEADLINE_EXCEEDED",
"NOT_FOUND",
"ALREADY_EXISTS",
"PERMISSION_DENIED",
"UNAUTHENTICATED",
"RESOURCE_EXHAUSTED",
"FAILED_PRECONDITION",
"ABORTED",
"OUT_OF_RANGE",
"UNIMPLEMENTED",
"INTERNAL",
"UNAVAILABLE",
"DATA_LOSS"
],
"enumDescriptions": [
"Not an error; returned on success. HTTP Mapping: 200 OK",
"The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request",
"Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error",
"The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request",
"The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout",
"Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found",
"The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict",
"The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden",
"The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized",
"Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests",
"The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an \"rmdir\" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request",
"The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict",
"The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request",
"The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented",
"Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error",
"The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable",
"Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error"
],
"type": "string"
},
"userFacingMessage": {
"description": "The message to send users about the status of their request. If unset, a generic message based on the `status_code` is sent.",
"type": "string"
}
},
"type": "object"
},
"Annotation": {
"description": "Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see [Format text messages](https://developers.google.com/workspace/chat/format-messages). Example plain-text message body: ``` Hello @FooBot how are you!\" ``` The corresponding annotations metadata: ``` \"annotations\":[{ \"type\":\"USER_MENTION\", \"startIndex\":6, \"length\":7, \"userMention\": { \"user\": { \"name\":\"users/{user}\", \"displayName\":\"FooBot\", \"avatarUrl\":\"https://goo.gl/aeDtrS\", \"type\":\"BOT\" }, \"type\":\"MENTION\" } }] ```",
"id": "Annotation",
"properties": {
"length": {
"description": "Length of the substring in the plain-text message body this annotation corresponds to.",
"format": "int32",
"type": "integer"
},
"richLinkMetadata": {
"$ref": "RichLinkMetadata",
"description": "The metadata for a rich link."
},
"slashCommand": {
"$ref": "SlashCommandMetadata",
"description": "The metadata for a slash command."
},
"startIndex": {
"description": "Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to.",
"format": "int32",
"type": "integer"
},
"type": {
"description": "The type of this annotation.",
"enum": [
"ANNOTATION_TYPE_UNSPECIFIED",
"USER_MENTION",
"SLASH_COMMAND",
"RICH_LINK"
],
"enumDescriptions": [
"Default value for the enum. Don't use.",
"A user is mentioned.",
"A slash command is invoked.",
"A rich link annotation."
],
"type": "string"
},
"userMention": {
"$ref": "UserMentionMetadata",
"description": "The metadata of user mention."
}
},
"type": "object"
},
"AttachedGif": {
"description": "A GIF image that's specified by a URL.",
"id": "AttachedGif",
"properties": {
"uri": {
"description": "Output only. The URL that hosts the GIF image.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"Attachment": {
"description": "An attachment in Google Chat.",
"id": "Attachment",
"properties": {
"attachmentDataRef": {
"$ref": "AttachmentDataRef",
"description": "A reference to the attachment data. This field is used with the media API to download the attachment data."
},
"contentName": {
"description": "Output only. The original file name for the content, not the full path.",
"readOnly": true,
"type": "string"
},
"contentType": {
"description": "Output only. The content type (MIME type) of the file.",
"readOnly": true,
"type": "string"
},
"downloadUri": {
"description": "Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.",
"readOnly": true,
"type": "string"
},
"driveDataRef": {
"$ref": "DriveDataRef",
"description": "Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API.",
"readOnly": true
},
"name": {
"description": "Resource name of the attachment, in the form `spaces/{space}/messages/{message}/attachments/{attachment}`.",
"type": "string"
},
"source": {
"description": "Output only. The source of the attachment.",
"enum": [
"SOURCE_UNSPECIFIED",
"DRIVE_FILE",
"UPLOADED_CONTENT"
],
"enumDescriptions": [
"Reserved.",
"The file is a Google Drive file.",
"The file is uploaded to Chat."
],
"readOnly": true,
"type": "string"
},
"thumbnailUri": {
"description": "Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"AttachmentDataRef": {
"description": "A reference to the attachment data.",
"id": "AttachmentDataRef",
"properties": {
"attachmentUploadToken": {
"description": "Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments.",
"type": "string"
},
"resourceName": {
"description": "The resource name of the attachment data. This field is used with the media API to download the attachment data.",
"type": "string"
}
},
"type": "object"
},
"Button": {
"description": "A button. Can be a text button or an image button.",
"id": "Button",
"properties": {
"imageButton": {
"$ref": "ImageButton",
"description": "A button with image and `onclick` action."
},
"textButton": {
"$ref": "TextButton",
"description": "A button with text and `onclick` action."
}
},
"type": "object"
},
"Card": {
"description": "A card is a UI element that can contain UI widgets such as text and images.",
"id": "Card",
"properties": {
"cardActions": {
"description": "The actions of this card.",
"items": {
"$ref": "CardAction"
},
"type": "array"
},
"header": {
"$ref": "CardHeader",
"description": "The header of the card. A header usually contains a title and an image."
},
"name": {
"description": "Name of the card.",
"type": "string"
},
"sections": {
"description": "Sections are separated by a line divider.",
"items": {
"$ref": "Section"
},
"type": "array"
}
},
"type": "object"
},
"CardAction": {
"description": "A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser. Not supported by Google Chat apps.",
"id": "CardAction",
"properties": {
"actionLabel": {
"description": "The label used to be displayed in the action menu item.",
"type": "string"
},
"onClick": {
"$ref": "OnClick",
"description": "The onclick action for this action item."
}
},
"type": "object"
},
"CardHeader": {
"id": "CardHeader",
"properties": {
"imageStyle": {
"description": "The image's type (for example, square border or circular border).",
"enum": [
"IMAGE_STYLE_UNSPECIFIED",
"IMAGE",
"AVATAR"
],
"enumDescriptions": [
"",
"Square border.",
"Circular border."
],
"type": "string"
},
"imageUrl": {
"description": "The URL of the image in the card header.",
"type": "string"
},
"subtitle": {
"description": "The subtitle of the card header.",
"type": "string"
},
"title": {
"description": "The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each takes up one line. If only the title is specified, it takes up both lines.",
"type": "string"
}
},
"type": "object"
},
"CardWithId": {
"description": "A [card](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards) in a Google Chat message. Only Chat apps can create cards. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the message can't contain cards. [Card builder](https://addons.gsuite.google.com/uikit/builder)",
"id": "CardWithId",
"properties": {
"card": {
"$ref": "GoogleAppsCardV1Card",
"description": "A card. Maximum size is 32 KB."
},
"cardId": {
"description": "Required if the message contains multiple cards. A unique identifier for a card in a message.",
"type": "string"
}
},
"type": "object"
},
"ChatAppLogEntry": {
"description": "JSON payload of error messages. If the Cloud Logging API is enabled, these error messages are logged to [Google Cloud Logging](https://cloud.google.com/logging/docs).",
"id": "ChatAppLogEntry",
"properties": {
"deployment": {
"description": "The deployment that caused the error. For Chat apps built in Apps Script, this is the deployment ID defined by Apps Script.",
"type": "string"
},
"deploymentFunction": {
"description": "The unencrypted `callback_method` name that was running when the error was encountered.",
"type": "string"
},
"error": {
"$ref": "Status",
"description": "The error code and message."
}
},
"type": "object"
},
"ChatClientDataSourceMarkup": {
"description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Chat. The data source populates selection items for the multiselect menu. For example, a user can select Google Chat spaces that they're a member of. [Google Chat apps](https://developers.google.com/workspace/chat):",
"id": "ChatClientDataSourceMarkup",
"properties": {
"spaceDataSource": {
"$ref": "SpaceDataSource",
"description": "Google Chat spaces that the user is a member of."
}
},
"type": "object"
},
"Color": {
"description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value\u2014for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...",
"id": "Color",
"properties": {
"alpha": {
"description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).",
"format": "float",
"type": "number"
},
"blue": {
"description": "The amount of blue in the color as a value in the interval [0, 1].",
"format": "float",
"type": "number"
},
"green": {
"description": "The amount of green in the color as a value in the interval [0, 1].",
"format": "float",
"type": "number"
},
"red": {
"description": "The amount of red in the color as a value in the interval [0, 1].",
"format": "float",
"type": "number"
}
},
"type": "object"
},
"CommonEventObject": {
"description": "Represents information about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes data submitted by users interacting with cards, like data entered in [dialogs](https://developers.google.com/chat/how-tos/dialogs).",
"id": "CommonEventObject",
"properties": {
"formInputs": {
"additionalProperties": {
"$ref": "Inputs"
},
"description": "A map containing the values that a user inputs in a widget from a card or dialog. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. For details, see [Process information inputted by users](https://developers.google.com/chat/ui/read-form-data).",
"type": "object"
},
"hostApp": {
"description": "The hostApp enum which indicates the app the add-on is invoked from. Always `CHAT` for Chat apps.",
"enum": [
"UNSPECIFIED_HOST_APP",
"GMAIL",
"CALENDAR",
"DRIVE",
"DEMO",
"DOCS",
"MEET",
"SHEETS",
"SLIDES",
"DRAWINGS",
"CHAT"
],
"enumDescriptions": [
"Google can't identify a host app.",
"The add-on launches from Gmail.",
"The add-on launches from Google Calendar.",
"The add-on launches from Google Drive.",
"Not used.",
"The add-on launches from Google Docs.",
"The add-on launches from Google Meet.",
"The add-on launches from Google Sheets.",
"The add-on launches from Google Slides.",
"The add-on launches from Google Drawings.",
"A Google Chat app."
],
"type": "string"
},
"invokedFunction": {
"description": "Name of the invoked function associated with the widget. Only set for Chat apps.",
"type": "string"
},
"parameters": {
"additionalProperties": {
"type": "string"
},
"description": "Custom [parameters](/chat/api/reference/rest/v1/cards#ActionParameter) passed to the invoked function. Both keys and values must be strings.",
"type": "object"
},
"platform": {
"description": "The platform enum which indicates the platform where the event originates (`WEB`, `IOS`, or `ANDROID`). Not supported by Chat apps.",
"enum": [
"UNKNOWN_PLATFORM",
"WEB",
"IOS",
"ANDROID"
],
"enumDescriptions": [
"",
"",
"",
""
],
"type": "string"
},
"timeZone": {
"$ref": "TimeZone",
"description": "The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types [`CARD_CLICKED`](https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG)."
},
"userLocale": {
"description": "The full `locale.displayName` in the format of [ISO 639 language code]-[ISO 3166 country/region code] such as \"en-US\".",
"type": "string"
}
},
"type": "object"
},
"CompleteImportSpaceRequest": {
"description": "Request message for completing the import process for a space.",
"id": "CompleteImportSpaceRequest",
"properties": {},
"type": "object"
},
"CompleteImportSpaceResponse": {
"description": "Response message for completing the import process for a space.",
"id": "CompleteImportSpaceResponse",
"properties": {
"space": {
"$ref": "Space",
"description": "The import mode space."
}
},
"type": "object"
},
"CustomEmoji": {
"description": "Represents a custom emoji.",
"id": "CustomEmoji",
"properties": {
"uid": {
"description": "Output only. Unique key for the custom emoji resource.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"DateInput": {
"description": "Date input values.",
"id": "DateInput",
"properties": {
"msSinceEpoch": {
"description": "Time since epoch time, in milliseconds.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"DateTimeInput": {
"description": "Date and time input values.",
"id": "DateTimeInput",
"properties": {
"hasDate": {
"description": "Whether the `datetime` input includes a calendar date.",
"type": "boolean"
},
"hasTime": {
"description": "Whether the `datetime` input includes a timestamp.",
"type": "boolean"
},
"msSinceEpoch": {
"description": "Time since epoch time, in milliseconds.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"DeletionMetadata": {
"description": "Information about a deleted message. A message is deleted when `delete_time` is set.",
"id": "DeletionMetadata",
"properties": {
"deletionType": {
"description": "Indicates who deleted the message.",
"enum": [
"DELETION_TYPE_UNSPECIFIED",
"CREATOR",
"SPACE_OWNER",
"ADMIN",
"APP_MESSAGE_EXPIRY",
"CREATOR_VIA_APP",
"SPACE_OWNER_VIA_APP"
],
"enumDescriptions": [
"This value is unused.",
"User deleted their own message.",
"The space owner deleted the message.",
"A Google Workspace admin deleted the message.",
"A Chat app deleted its own message when it expired.",
"A Chat app deleted the message on behalf of the user.",
"A Chat app deleted the message on behalf of the space owner."
],
"type": "string"
}
},
"type": "object"
},
"DeprecatedEvent": {
"description": "A Google Chat app interaction event. To learn about interaction events, see [Receive and respond to interactions with your Google Chat app](https://developers.google.com/workspace/chat/api/guides/message-formats). To learn about event types and for example event payloads, see [Types of Google Chat app interaction events](https://developers.google.com/workspace/chat/events). In addition to receiving events from user interactions, Chat apps can receive events about changes to spaces, such as when a new member is added to a space. To learn about space events, see [Work with events from Google Chat](https://developers.google.com/workspace/chat/events-overview).",
"id": "DeprecatedEvent",
"properties": {
"action": {
"$ref": "FormAction",
"description": "For `CARD_CLICKED` interaction events, the form action data associated when a user clicks a card or dialog. To learn more, see [Read form data input by users on cards](https://developers.google.com/workspace/chat/read-form-data)."
},
"common": {
"$ref": "CommonEventObject",
"description": "Represents informatmessage_visibilityion about the user's client, such as locale, host app, and platform. For Chat apps, `CommonEventObject` includes information submitted by users interacting with [dialogs](https://developers.google.com/workspace/chat/dialogs), like data entered on a card."
},
"configCompleteRedirectUrl": {
"description": "The URL the Chat app should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. For more information, see [Connect a Chat app with other services & tools](https://developers.google.com/workspace/chat/connect-web-services-tools).",
"type": "string"
},
"dialogEventType": {
"description": "The type of [dialog](https://developers.google.com/workspace/chat/dialogs) interaction event received.",
"enum": [
"TYPE_UNSPECIFIED",
"REQUEST_DIALOG",
"SUBMIT_DIALOG",
"CANCEL_DIALOG"
],
"enumDescriptions": [
"Default value. Unspecified.",
"A user opens a dialog.",
"A user clicks an interactive element of a dialog. For example, a user fills out information in a dialog and clicks a button to submit the information.",
"A user closes a dialog without submitting information, or the dialog is canceled."
],
"type": "string"
},
"eventTime": {
"description": "The timestamp indicating when the interaction event occurred.",
"format": "google-datetime",
"type": "string"
},
"isDialogEvent": {
"description": "For `CARD_CLICKED` and `MESSAGE` interaction events, whether the user is interacting with or about to interact with a [dialog](https://developers.google.com/workspace/chat/dialogs).",
"type": "boolean"
},
"message": {
"$ref": "Message",
"description": "The message that triggered the interaction event, if applicable."
},
"space": {
"$ref": "Space",
"description": "The space in which the interaction event occurred."
},
"threadKey": {
"description": "The Chat app-defined key for the thread related to the interaction event. See [`spaces.messages.thread.threadKey`](/chat/api/reference/rest/v1/spaces.messages#Thread.FIELDS.thread_key) for more information.",
"type": "string"
},
"token": {
"description": "A secret value that legacy Chat apps can use to verify if a request is from Google. Google randomly generates the token, and its value remains static. You can obtain, revoke, or regenerate the token from the [Chat API configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat) in the Google Cloud Console. Modern Chat apps don't use this field. It is absent from API responses and the [Chat API configuration page](https://console.cloud.google.com/apis/api/chat.googleapis.com/hangouts-chat).",
"type": "string"
},
"type": {
"description": "The type of interaction event. For details, see [Types of Google Chat app interaction events](https://developers.google.com/workspace/chat/events).",
"enum": [
"UNSPECIFIED",
"MESSAGE",
"ADDED_TO_SPACE",
"REMOVED_FROM_SPACE",
"CARD_CLICKED",
"WIDGET_UPDATED"
],
"enumDescriptions": [
"Default value for the enum. DO NOT USE.",
"A user sends the Chat app a message, or invokes the Chat app in a space.",
"A user adds the Chat app to a space, or a Google Workspace administrator installs the Chat app in direct message spaces for users in their organization.",
"A user removes the Chat app from a space.",
"A user clicks an interactive element of a card or dialog from a Chat app, such as a button. If a user interacts with a dialog, the `CARD_CLICKED` interaction event's `isDialogEvent` field is set to `true` and includes a [`DialogEventType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/DialogEventType).",
"A user updates a widget in a card message or dialog."
],
"type": "string"
},
"user": {
"$ref": "User",
"description": "The user that triggered the interaction event."
}
},
"type": "object"
},
"Dialog": {
"description": "Wrapper around the card body of the dialog.",
"id": "Dialog",
"properties": {
"body": {
"$ref": "GoogleAppsCardV1Card",
"description": "Input only. Body of the dialog, which is rendered in a modal. Google Chat apps don't support the following card entities: `DateTimePicker`, `OnChangeAction`."
}
},
"type": "object"
},
"DialogAction": {
"description": "Contains a [dialog](https://developers.google.com/workspace/chat/dialogs) and request status code.",
"id": "DialogAction",
"properties": {
"actionStatus": {
"$ref": "ActionStatus",
"description": "Input only. Status for a request to either invoke or submit a [dialog](https://developers.google.com/workspace/chat/dialogs). Displays a status and message to users, if necessary. For example, in case of an error or success."
},
"dialog": {
"$ref": "Dialog",
"description": "Input only. [Dialog](https://developers.google.com/workspace/chat/dialogs) for the request."
}
},
"type": "object"
},
"DriveDataRef": {
"description": "A reference to the data of a drive attachment.",
"id": "DriveDataRef",
"properties": {
"driveFileId": {
"description": "The ID for the drive file. Use with the Drive API.",
"type": "string"
}
},
"type": "object"
},
"DriveLinkData": {
"description": "Data for Google Drive links.",
"id": "DriveLinkData",
"properties": {
"driveDataRef": {
"$ref": "DriveDataRef",
"description": "A [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) which references a Google Drive file."
},
"mimeType": {
"description": "The mime type of the linked Google Drive resource.",
"type": "string"
}
},
"type": "object"
},
"Emoji": {
"description": "An emoji that is used as a reaction to a message.",
"id": "Emoji",
"properties": {
"customEmoji": {
"$ref": "CustomEmoji",
"description": "Output only. A custom emoji.",
"readOnly": true
},
"unicode": {
"description": "A basic emoji represented by a unicode string.",
"type": "string"
}
},
"type": "object"
},
"EmojiReactionSummary": {
"description": "The number of people who reacted to a message with a specific emoji.",
"id": "EmojiReactionSummary",
"properties": {
"emoji": {
"$ref": "Emoji",
"description": "Emoji associated with the reactions."
},
"reactionCount": {
"description": "The total number of reactions using the associated emoji.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"Empty": {
"description": "A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }",
"id": "Empty",
"properties": {},
"type": "object"
},
"FormAction": {
"description": "A form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.",
"id": "FormAction",
"properties": {
"actionMethodName": {
"description": "The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior.",
"type": "string"
},
"parameters": {
"description": "List of action parameters.",
"items": {
"$ref": "ActionParameter"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1Action": {
"description": "An action that describes the behavior when the form is submitted. For example, you can invoke an Apps Script script to handle the form. If the action is triggered, the form values are sent to the server. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Action",
"properties": {
"function": {
"description": "A custom function to invoke when the containing element is clicked or otherwise activated. For example usage, see [Read form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
},
"interaction": {
"description": "Optional. Required when opening a [dialog](https://developers.google.com/workspace/chat/dialogs). What to do in response to an interaction with a user, such as a user clicking a button in a card message. If unspecified, the app responds by executing an `action`\u2014like opening a link or running a function\u2014as normal. By specifying an `interaction`, the app can respond in special interactive ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can open a [dialog](https://developers.google.com/workspace/chat/dialogs). When specified, a loading indicator isn't shown. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):",
"enum": [
"INTERACTION_UNSPECIFIED",
"OPEN_DIALOG"
],
"enumDescriptions": [
"Default value. The `action` executes as normal.",
"Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a windowed, card-based interface that Chat apps use to interact with users. Only supported by Chat apps in response to button-clicks on card messages. If specified for an add-on, the entire card is stripped and nothing is shown in the client. [Google Chat apps](https://developers.google.com/workspace/chat):"
],
"type": "string"
},
"loadIndicator": {
"description": "Specifies the loading indicator that the action displays while making the call to the action.",
"enum": [
"SPINNER",
"NONE"
],
"enumDescriptions": [
"Displays a spinner to indicate that content is loading.",
"Nothing is displayed."
],
"type": "string"
},
"parameters": {
"description": "List of action parameters.",
"items": {
"$ref": "GoogleAppsCardV1ActionParameter"
},
"type": "array"
},
"persistValues": {
"description": "Indicates whether form values persist after the action. The default value is `false`. If `true`, form values remain after the action is triggered. To let the user make changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `NONE`. For [card messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) in Chat apps, you must also set the action's [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) to `UPDATE_MESSAGE` and use the same [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) from the card that contained the action. If `false`, the form values are cleared when the action is triggered. To prevent the user from making changes while the action is being processed, set [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) to `SPINNER`.",
"type": "boolean"
}
},
"type": "object"
},
"GoogleAppsCardV1ActionParameter": {
"description": "List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, or snooze next week. You might use `action method = snooze()`, passing the snooze type and snooze time in the list of string parameters. To learn more, see [`CommonEventObject`](https://developers.google.com/workspace/chat/api/reference/rest/v1/Event#commoneventobject). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1ActionParameter",
"properties": {
"key": {
"description": "The name of the parameter for the action script.",
"type": "string"
},
"value": {
"description": "The value of the parameter.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1BorderStyle": {
"description": "The style options for the border of a card or widget, including the border type and color. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1BorderStyle",
"properties": {
"cornerRadius": {
"description": "The corner radius for the border.",
"format": "int32",
"type": "integer"
},
"strokeColor": {
"$ref": "Color",
"description": "The colors to use when the type is `BORDER_TYPE_STROKE`."
},
"type": {
"description": "The border type.",
"enum": [
"BORDER_TYPE_UNSPECIFIED",
"NO_BORDER",
"STROKE"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default value. No border.",
"Outline."
],
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1Button": {
"description": "A text, icon, or text and icon button that users can click. For an example in Google Chat apps, see [Add a button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). To make an image a clickable button, specify an `Image` (not an `ImageComponent`) and set an `onClick` action. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Button",
"properties": {
"altText": {
"description": "The alternative text that's used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: \"Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat\".",
"type": "string"
},
"color": {
"$ref": "Color",
"description": "If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background likely results in white text. If unset, the image background is white and the font color is blue. For red, green, and blue, the value of each field is a `float` number that you can express in either of two ways: as a number between 0 and 255 divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents the absence of a color and 1 or 255/255 represent the full presence of that color on the RGB scale. Optionally set `alpha`, which sets a level of transparency using this equation: ``` pixel color = alpha * (this color) + (1.0 - alpha) * (background color) ``` For `alpha`, a value of `1` corresponds with a solid color, and a value of `0` corresponds with a completely transparent color. For example, the following color represents a half transparent red: ``` \"color\": { \"red\": 1, \"green\": 0, \"blue\": 0, \"alpha\": 0.5 } ```"
},
"disabled": {
"description": "If `true`, the button is displayed in an inactive state and doesn't respond to user actions.",
"type": "boolean"
},
"icon": {
"$ref": "GoogleAppsCardV1Icon",
"description": "The icon image. If both `icon` and `text` are set, then the icon appears before the text."
},
"onClick": {
"$ref": "GoogleAppsCardV1OnClick",
"description": "Required. The action to perform when a user clicks the button, such as opening a hyperlink or running a custom function."
},
"text": {
"description": "The text displayed inside the button.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1ButtonList": {
"description": "A list of buttons layed out horizontally. For an example in Google Chat apps, see [Add a button](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_button). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1ButtonList",
"properties": {
"buttons": {
"description": "An array of buttons.",
"items": {
"$ref": "GoogleAppsCardV1Button"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1Card": {
"description": "A card interface displayed in a Google Chat message or Google Workspace Add-on. Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use cards to present detailed information, gather information from users, and guide users to take a next step. [Card builder](https://addons.gsuite.google.com/uikit/builder) To learn how to build cards, see the following documentation: * For Google Chat apps, see [Design the components of a card or dialog](https://developers.google.com/workspace/chat/design-components-card-dialog). * For Google Workspace Add-ons, see [Card-based interfaces](https://developers.google.com/apps-script/add-ons/concepts/cards). **Example: Card message for a Google Chat app** ![Example contact card](https://developers.google.com/workspace/chat/images/card_api_reference.png) To create the sample card message in Google Chat, use the following JSON: ``` { \"cardsV2\": [ { \"cardId\": \"unique-card-id\", \"card\": { \"header\": { \"title\": \"Sasha\", \"subtitle\": \"Software Engineer\", \"imageUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\", \"imageType\": \"CIRCLE\", \"imageAltText\": \"Avatar for Sasha\" }, \"sections\": [ { \"header\": \"Contact Info\", \"collapsible\": true, \"uncollapsibleWidgetsCount\": 1, \"widgets\": [ { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"EMAIL\" }, \"text\": \"sasha@example.com\" } }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PERSON\" }, \"text\": \"Online\" } }, { \"decoratedText\": { \"startIcon\": { \"knownIcon\": \"PHONE\" }, \"text\": \"+1 (555) 555-1234\" } }, { \"buttonList\": { \"buttons\": [ { \"text\": \"Share\", \"onClick\": { \"openLink\": { \"url\": \"https://example.com/share\" } } }, { \"text\": \"Edit\", \"onClick\": { \"action\": { \"function\": \"goToView\", \"parameters\": [ { \"key\": \"viewType\", \"value\": \"EDIT\" } ] } } } ] } } ] } ] } } ] } ```",
"id": "GoogleAppsCardV1Card",
"properties": {
"cardActions": {
"description": "The card's actions. Actions are added to the card's toolbar menu. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons): For example, the following JSON constructs a card action menu with `Settings` and `Send Feedback` options: ``` \"card_actions\": [ { \"actionLabel\": \"Settings\", \"onClick\": { \"action\": { \"functionName\": \"goToView\", \"parameters\": [ { \"key\": \"viewType\", \"value\": \"SETTING\" } ], \"loadIndicator\": \"LoadIndicator.SPINNER\" } } }, { \"actionLabel\": \"Send Feedback\", \"onClick\": { \"openLink\": { \"url\": \"https://example.com/feedback\" } } } ] ```",
"items": {
"$ref": "GoogleAppsCardV1CardAction"
},
"type": "array"
},
"displayStyle": {
"description": "In Google Workspace Add-ons, sets the display properties of the `peekCardHeader`. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
"enum": [
"DISPLAY_STYLE_UNSPECIFIED",
"PEEK",
"REPLACE"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"The header of the card appears at the bottom of the sidebar, partially covering the current top card of the stack. Clicking the header pops the card into the card stack. If the card has no header, a generated header is used instead.",
"Default value. The card is shown by replacing the view of the top card in the card stack."
],
"type": "string"
},
"fixedFooter": {
"$ref": "GoogleAppsCardV1CardFixedFooter",
"description": "The fixed footer shown at the bottom of this card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. For Chat apps, you can use fixed footers in [dialogs](https://developers.google.com/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):"
},
"header": {
"$ref": "GoogleAppsCardV1CardHeader",
"description": "The header of the card. A header usually contains a leading image and a title. Headers always appear at the top of a card."
},
"name": {
"description": "Name of the card. Used as a card identifier in card navigation. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
"type": "string"
},
"peekCardHeader": {
"$ref": "GoogleAppsCardV1CardHeader",
"description": "When displaying contextual content, the peek card header acts as a placeholder so that the user can navigate forward between the homepage cards and the contextual cards. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):"
},
"sectionDividerStyle": {
"description": "The divider style between sections.",
"enum": [
"DIVIDER_STYLE_UNSPECIFIED",
"SOLID_DIVIDER",
"NO_DIVIDER"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default option. Render a solid divider between sections.",
"If set, no divider is rendered between sections."
],
"type": "string"
},
"sections": {
"description": "Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider. For an example in Google Chat apps, see [Define a section of a card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card).",
"items": {
"$ref": "GoogleAppsCardV1Section"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1CardAction": {
"description": "A card action is the action associated with the card. For example, an invoice card might include actions such as delete invoice, email invoice, or open the invoice in a browser. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
"id": "GoogleAppsCardV1CardAction",
"properties": {
"actionLabel": {
"description": "The label that displays as the action menu item.",
"type": "string"
},
"onClick": {
"$ref": "GoogleAppsCardV1OnClick",
"description": "The `onClick` action for this action item."
}
},
"type": "object"
},
"GoogleAppsCardV1CardFixedFooter": {
"description": "A persistent (sticky) footer that that appears at the bottom of the card. Setting `fixedFooter` without specifying a `primaryButton` or a `secondaryButton` causes an error. For Chat apps, you can use fixed footers in [dialogs](https://developers.google.com/workspace/chat/dialogs), but not [card messages](https://developers.google.com/workspace/chat/create-messages#create). For an example in Google Chat apps, see [Add a persistent footer](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_persistent_footer). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1CardFixedFooter",
"properties": {
"primaryButton": {
"$ref": "GoogleAppsCardV1Button",
"description": "The primary button of the fixed footer. The button must be a text button with text and color set."
},
"secondaryButton": {
"$ref": "GoogleAppsCardV1Button",
"description": "The secondary button of the fixed footer. The button must be a text button with text and color set. If `secondaryButton` is set, you must also set `primaryButton`."
}
},
"type": "object"
},
"GoogleAppsCardV1CardHeader": {
"description": "Represents a card header. For an example in Google Chat apps, see [Add a header](https://developers.google.com/workspace/chat/design-components-card-dialog#add_a_header). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1CardHeader",
"properties": {
"imageAltText": {
"description": "The alternative text of this image that's used for accessibility.",
"type": "string"
},
"imageType": {
"description": "The shape used to crop the image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"enum": [
"SQUARE",
"CIRCLE"
],
"enumDescriptions": [
"Default value. Applies a square mask to the image. For example, a 4x3 image becomes 3x3.",
"Applies a circular mask to the image. For example, a 4x3 image becomes a circle with a diameter of 3."
],
"type": "string"
},
"imageUrl": {
"description": "The HTTPS URL of the image in the card header.",
"type": "string"
},
"subtitle": {
"description": "The subtitle of the card header. If specified, appears on its own line below the `title`.",
"type": "string"
},
"title": {
"description": "Required. The title of the card header. The header has a fixed height: if both a title and subtitle are specified, each takes up one line. If only the title is specified, it takes up both lines.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1Column": {
"description": "A column. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend)",
"id": "GoogleAppsCardV1Column",
"properties": {
"horizontalAlignment": {
"description": "Specifies whether widgets align to the left, right, or center of a column.",
"enum": [
"HORIZONTAL_ALIGNMENT_UNSPECIFIED",
"START",
"CENTER",
"END"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.",
"Aligns widgets to the center of the column.",
"Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left."
],
"type": "string"
},
"horizontalSizeStyle": {
"description": "Specifies how a column fills the width of the card.",
"enum": [
"HORIZONTAL_SIZE_STYLE_UNSPECIFIED",
"FILL_AVAILABLE_SPACE",
"FILL_MINIMUM_SPACE"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default value. Column fills the available space, up to 70% of the card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each column fills 50% of the space.",
"Column fills the least amount of space possible and no more than 30% of the card's width."
],
"type": "string"
},
"verticalAlignment": {
"description": "Specifies whether widgets align to the top, bottom, or center of a column.",
"enum": [
"VERTICAL_ALIGNMENT_UNSPECIFIED",
"CENTER",
"TOP",
"BOTTOM"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default value. Aligns widgets to the center of a column.",
"Aligns widgets to the top of a column.",
"Aligns widgets to the bottom of a column."
],
"type": "string"
},
"widgets": {
"description": "An array of widgets included in a column. Widgets appear in the order that they are specified.",
"items": {
"$ref": "GoogleAppsCardV1Widgets"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1Columns": {
"description": "The `Columns` widget displays up to 2 columns in a card or dialog. You can add widgets to each column; the widgets appear in the order that they are specified. For an example in Google Chat apps, see [Display cards and dialogs in columns](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_cards_and_dialogs_in_columns). The height of each column is determined by the taller column. For example, if the first column is taller than the second column, both columns have the height of the first column. Because each column can contain a different number of widgets, you can't define rows or align widgets between the columns. Columns are displayed side-by-side. You can customize the width of each column using the `HorizontalSizeStyle` field. If the user's screen width is too narrow, the second column wraps below the first: * On web, the second column wraps if the screen width is less than or equal to 480 pixels. * On iOS devices, the second column wraps if the screen width is less than or equal to 300 pt. * On Android devices, the second column wraps if the screen width is less than or equal to 320 dp. To include more than 2 columns, or to use rows, use the `Grid` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Columns for Google Workspace Add-ons are in Developer Preview.",
"id": "GoogleAppsCardV1Columns",
"properties": {
"columnItems": {
"description": "An array of columns. You can include up to 2 columns in a card or dialog.",
"items": {
"$ref": "GoogleAppsCardV1Column"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1DateTimePicker": {
"description": "Lets users input a date, a time, or both a date and a time. For an example in Google Chat apps, see [Let a user pick a date and time](https://developers.google.com/workspace/chat/design-interactive-card-dialog#let_a_user_pick_a_date_and_time). Users can input text or use the picker to select dates and times. If users input an invalid date or time, the picker shows an error that prompts users to input the information correctly. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1DateTimePicker",
"properties": {
"label": {
"description": "The text that prompts users to input a date, a time, or a date and time. For example, if users are scheduling an appointment, use a label such as `Appointment date` or `Appointment date and time`.",
"type": "string"
},
"name": {
"description": "The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
},
"onChangeAction": {
"$ref": "GoogleAppsCardV1Action",
"description": "Triggered when the user clicks **Save** or **Clear** from the `DateTimePicker` interface."
},
"timezoneOffsetDate": {
"description": "The number representing the time zone offset from UTC, in minutes. If set, the `value_ms_epoch` is displayed in the specified time zone. If unset, the value defaults to the user's time zone setting.",
"format": "int32",
"type": "integer"
},
"type": {
"description": "Whether the widget supports inputting a date, a time, or the date and time.",
"enum": [
"DATE_AND_TIME",
"DATE_ONLY",
"TIME_ONLY"
],
"enumDescriptions": [
"Users input a date and time.",
"Users input a date.",
"Users input a time."
],
"type": "string"
},
"valueMsEpoch": {
"description": "The default value displayed in the widget, in milliseconds since [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time). Specify the value based on the type of picker (`DateTimePickerType`): * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent January 1, 2023, use `1672531200000`. * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use `43200000` (or `12 * 60 * 60 * 1000`).",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1DecoratedText": {
"description": "A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see [Display text with decorative text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1DecoratedText",
"properties": {
"bottomLabel": {
"description": "The text that appears below `text`. Always wraps.",
"type": "string"
},
"button": {
"$ref": "GoogleAppsCardV1Button",
"description": "A button that a user can click to trigger an action."
},
"endIcon": {
"$ref": "GoogleAppsCardV1Icon",
"description": "An icon displayed after the text. Supports [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) and [custom](https://developers.google.com/workspace/chat/format-messages#customicons) icons."
},
"icon": {
"$ref": "GoogleAppsCardV1Icon",
"deprecated": true,
"description": "Deprecated in favor of `startIcon`."
},
"onClick": {
"$ref": "GoogleAppsCardV1OnClick",
"description": "This action is triggered when users click `topLabel` or `bottomLabel`."
},
"startIcon": {
"$ref": "GoogleAppsCardV1Icon",
"description": "The icon displayed in front of the text."
},
"switchControl": {
"$ref": "GoogleAppsCardV1SwitchControl",
"description": "A switch widget that a user can click to change its state and trigger an action."
},
"text": {
"description": "Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
},
"topLabel": {
"description": "The text that appears above `text`. Always truncates.",
"type": "string"
},
"wrapText": {
"description": "The wrap text setting. If `true`, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies to `text`, not `topLabel` and `bottomLabel`.",
"type": "boolean"
}
},
"type": "object"
},
"GoogleAppsCardV1Divider": {
"description": "Displays a divider between widgets as a horizontal line. For an example in Google Chat apps, see [Add a horizontal divider between widgets](https://developers.google.com/workspace/chat/format-structure-card-dialog#add_a_horizontal_divider_between_widgets). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a divider: ``` \"divider\": {} ```",
"id": "GoogleAppsCardV1Divider",
"properties": {},
"type": "object"
},
"GoogleAppsCardV1Grid": {
"description": "Displays a grid with a collection of items. Items can only include text or images. For responsive columns, or to include more than text or images, use `Columns`. For an example in Google Chat apps, see [Display a Grid with a collection of items](https://developers.google.com/workspace/chat/format-structure-card-dialog#display_a_grid_with_a_collection_of_items). A grid supports any number of columns and items. The number of rows is determined by items divided by columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```",
"id": "GoogleAppsCardV1Grid",
"properties": {
"borderStyle": {
"$ref": "GoogleAppsCardV1BorderStyle",
"description": "The border style to apply to each grid item."
},
"columnCount": {
"description": "The number of columns to display in the grid. A default value is used if this field isn't specified, and that default value is different depending on where the grid is shown (dialog versus companion).",
"format": "int32",
"type": "integer"
},
"items": {
"description": "The items to display in the grid.",
"items": {
"$ref": "GoogleAppsCardV1GridItem"
},
"type": "array"
},
"onClick": {
"$ref": "GoogleAppsCardV1OnClick",
"description": "This callback is reused by each individual grid item, but with the item's identifier and index in the items list added to the callback's parameters."
},
"title": {
"description": "The text that displays in the grid header.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1GridItem": {
"description": "Represents an item in a grid layout. Items can contain text, an image, or both text and an image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1GridItem",
"properties": {
"id": {
"description": "A user-specified identifier for this grid item. This identifier is returned in the parent grid's `onClick` callback parameters.",
"type": "string"
},
"image": {
"$ref": "GoogleAppsCardV1ImageComponent",
"description": "The image that displays in the grid item."
},
"layout": {
"description": "The layout to use for the grid item.",
"enum": [
"GRID_ITEM_LAYOUT_UNSPECIFIED",
"TEXT_BELOW",
"TEXT_ABOVE"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"The title and subtitle are shown below the grid item's image.",
"The title and subtitle are shown above the grid item's image."
],
"type": "string"
},
"subtitle": {
"description": "The grid item's subtitle.",
"type": "string"
},
"title": {
"description": "The grid item's title.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1Icon": {
"description": "An icon displayed in a widget on a card. For an example in Google Chat apps, see [Add an icon](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_icon). Supports [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) and [custom](https://developers.google.com/workspace/chat/format-messages#customicons) icons. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Icon",
"properties": {
"altText": {
"description": "Optional. A description of the icon used for accessibility. If unspecified, the default value `Button` is provided. As a best practice, you should set a helpful description for what the icon displays, and if applicable, what it does. For example, `A user's account portrait`, or `Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat`. If the icon is set in a `Button`, the `altText` appears as helper text when the user hovers over the button. However, if the button also sets `text`, the icon's `altText` is ignored.",
"type": "string"
},
"iconUrl": {
"description": "Display a custom icon hosted at an HTTPS URL. For example: ``` \"iconUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\" ``` Supported file types include `.png` and `.jpg`.",
"type": "string"
},
"imageType": {
"description": "The crop style applied to the image. In some cases, applying a `CIRCLE` crop causes the image to be drawn larger than a built-in icon.",
"enum": [
"SQUARE",
"CIRCLE"
],
"enumDescriptions": [
"Default value. Applies a square mask to the image. For example, a 4x3 image becomes 3x3.",
"Applies a circular mask to the image. For example, a 4x3 image becomes a circle with a diameter of 3."
],
"type": "string"
},
"knownIcon": {
"description": "Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify `AIRPLANE`. For a bus, specify `BUS`. For a full list of supported icons, see [built-in icons](https://developers.google.com/workspace/chat/format-messages#builtinicons).",
"type": "string"
},
"materialIcon": {
"$ref": "GoogleAppsCardV1MaterialIcon",
"description": "Display one of the [Google Material Icons](https://fonts.google.com/icons). For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), use ``` \"material_icon\": { \"name\": \"check_box\" } ``` [Google Chat apps](https://developers.google.com/workspace/chat):"
}
},
"type": "object"
},
"GoogleAppsCardV1Image": {
"description": "An image that is specified by a URL and can have an `onClick` action. For an example, see [Add an image](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_an_image). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Image",
"properties": {
"altText": {
"description": "The alternative text of this image that's used for accessibility.",
"type": "string"
},
"imageUrl": {
"description": "The HTTPS URL that hosts the image. For example: ``` https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png ```",
"type": "string"
},
"onClick": {
"$ref": "GoogleAppsCardV1OnClick",
"description": "When a user clicks the image, the click triggers this action."
}
},
"type": "object"
},
"GoogleAppsCardV1ImageComponent": {
"description": "Represents an image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1ImageComponent",
"properties": {
"altText": {
"description": "The accessibility label for the image.",
"type": "string"
},
"borderStyle": {
"$ref": "GoogleAppsCardV1BorderStyle",
"description": "The border style to apply to the image."
},
"cropStyle": {
"$ref": "GoogleAppsCardV1ImageCropStyle",
"description": "The crop style to apply to the image."
},
"imageUri": {
"description": "The image URL.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1ImageCropStyle": {
"description": "Represents the crop style applied to an image. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle { \"type\": \"RECTANGLE_CUSTOM\", \"aspectRatio\": 16/9 } ```",
"id": "GoogleAppsCardV1ImageCropStyle",
"properties": {
"aspectRatio": {
"description": "The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. For example, here's how to apply a 16:9 aspect ratio: ``` cropStyle { \"type\": \"RECTANGLE_CUSTOM\", \"aspectRatio\": 16/9 } ```",
"format": "double",
"type": "number"
},
"type": {
"description": "The crop type.",
"enum": [
"IMAGE_CROP_TYPE_UNSPECIFIED",
"SQUARE",
"CIRCLE",
"RECTANGLE_CUSTOM",
"RECTANGLE_4_3"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default value. Applies a square crop.",
"Applies a circular crop.",
"Applies a rectangular crop with a custom aspect ratio. Set the custom aspect ratio with `aspectRatio`.",
"Applies a rectangular crop with a 4:3 aspect ratio."
],
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1MaterialIcon": {
"description": "A [Google Material Icon](https://fonts.google.com/icons), which includes over 2500+ options. For example, to display a [checkbox icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048) with customized weight and grade, write the following: ``` { \"name\": \"check_box\", \"fill\": true, \"weight\": 300, \"grade\": -25 } ``` [Google Chat apps](https://developers.google.com/workspace/chat):",
"id": "GoogleAppsCardV1MaterialIcon",
"properties": {
"fill": {
"description": "Whether the icon renders as filled. Default value is false. To preview different icon settings, go to [Google Font Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.",
"type": "boolean"
},
"grade": {
"description": "Weight and grade affect a symbol\u2019s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used. To preview different icon settings, go to [Google Font Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.",
"format": "int32",
"type": "integer"
},
"name": {
"description": "The icon name defined in the [Google Material Icon](https://fonts.google.com/icons), for example, `check_box`. Any invalid names are abandoned and replaced with empty string and results in the icon failing to render.",
"type": "string"
},
"weight": {
"description": "The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used. To preview different icon settings, go to [Google Font Icons](https://fonts.google.com/icons) and adjust the settings under **Customize**.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"GoogleAppsCardV1OnClick": {
"description": "Represents how to respond when users click an interactive element on a card, such as a button. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1OnClick",
"properties": {
"action": {
"$ref": "GoogleAppsCardV1Action",
"description": "If specified, an action is triggered by this `onClick`."
},
"card": {
"$ref": "GoogleAppsCardV1Card",
"description": "A new card is pushed to the card stack after clicking if specified. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):"
},
"openDynamicLinkAction": {
"$ref": "GoogleAppsCardV1Action",
"description": "An add-on triggers this action when the action needs to open a link. This differs from the `open_link` above in that this needs to talk to server to get the link. Thus some preparation work is required for web client to do before the open link action response comes back. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):"
},
"openLink": {
"$ref": "GoogleAppsCardV1OpenLink",
"description": "If specified, this `onClick` triggers an open link action."
}
},
"type": "object"
},
"GoogleAppsCardV1OpenLink": {
"description": "Represents an `onClick` event that opens a hyperlink. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1OpenLink",
"properties": {
"onClose": {
"description": "Whether the client forgets about a link after opening it, or observes it until the window closes. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
"enum": [
"NOTHING",
"RELOAD"
],
"enumDescriptions": [
"Default value. The card doesn't reload; nothing happens.",
"Reloads the card after the child window closes. If used in conjunction with [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas), the child window acts as a modal dialog and the parent card is blocked until the child window closes."
],
"type": "string"
},
"openAs": {
"description": "How to open a link. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):",
"enum": [
"FULL_SIZE",
"OVERLAY"
],
"enumDescriptions": [
"The link opens as a full-size window (if that's the frame used by the client).",
"The link opens as an overlay, such as a pop-up."
],
"type": "string"
},
"url": {
"description": "The URL to open.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1PlatformDataSource": {
"description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from Google Workspace. Used to populate items in a multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):",
"id": "GoogleAppsCardV1PlatformDataSource",
"properties": {
"commonDataSource": {
"description": "A data source shared by all Google Workspace applications, such as users in a Google Workspace organization.",
"enum": [
"UNKNOWN",
"USER",
"DRIVE"
],
"enumDescriptions": [
"Default value. Don't use.",
"Google Workspace users. The user can only view and select users from their Google Workspace organization.",
"Represents a data source from Google Drive OnePick."
],
"type": "string"
},
"hostAppDataSource": {
"$ref": "HostAppDataSourceMarkup",
"description": "A data source that's unique to a Google Workspace host application, such spaces in Google Chat."
}
},
"type": "object"
},
"GoogleAppsCardV1Section": {
"description": "A section contains a collection of widgets that are rendered vertically in the order that they're specified. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Section",
"properties": {
"collapsible": {
"description": "Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clicking **Show more**. Users can hide the widgets again by clicking **Show less**. To determine which widgets are hidden, specify `uncollapsibleWidgetsCount`.",
"type": "boolean"
},
"header": {
"description": "Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
},
"uncollapsibleWidgetsCount": {
"description": "The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, the first two widgets are always shown and the last three are collapsed by default. The `uncollapsibleWidgetsCount` is taken into account only when `collapsible` is `true`.",
"format": "int32",
"type": "integer"
},
"widgets": {
"description": "All the widgets in the section. Must contain at least one widget.",
"items": {
"$ref": "GoogleAppsCardV1Widget"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1SelectionInput": {
"description": "A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see [Add selectable UI elements](/workspace/chat/design-interactive-card-dialog#add_selectable_ui_elements). Chat apps can process the value of items that users select or input. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). To collect undefined or abstract data from users, use the TextInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1SelectionInput",
"properties": {
"externalDataSource": {
"$ref": "GoogleAppsCardV1Action",
"description": "An external data source, such as a relational data base."
},
"items": {
"description": "An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.",
"items": {
"$ref": "GoogleAppsCardV1SelectionItem"
},
"type": "array"
},
"label": {
"description": "The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be \"Urgency\" or \"Select urgency\".",
"type": "string"
},
"multiSelectMaxSelectedItems": {
"description": "For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.",
"format": "int32",
"type": "integer"
},
"multiSelectMinQueryLength": {
"description": "For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu. If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.",
"format": "int32",
"type": "integer"
},
"name": {
"description": "The name that identifies the selection input in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
},
"onChangeAction": {
"$ref": "GoogleAppsCardV1Action",
"description": "If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data)."
},
"platformDataSource": {
"$ref": "GoogleAppsCardV1PlatformDataSource",
"description": "A data source from Google Workspace."
},
"type": {
"description": "The type of items that are displayed to users in a `SelectionInput` widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.",
"enum": [
"CHECK_BOX",
"RADIO_BUTTON",
"SWITCH",
"DROPDOWN",
"MULTI_SELECT"
],
"enumDescriptions": [
"A set of checkboxes. Users can select one or more checkboxes.",
"A set of radio buttons. Users can select one radio button.",
"A set of switches. Users can turn on one or more switches.",
"A dropdown menu. Users can select one item from the menu.",
"A multiselect menu for static or dynamic data. From the menu bar, users select one or more items. Users can also input values to populate dynamic data. For example, users can start typing the name of a Google Chat space and the widget autosuggests the space. To populate items for a multiselect menu, you can use one of the following types of data sources: * Static data: Items are specified as `SelectionItem` objects in the widget. Up to 100 items. * Google Workspace data: Items are populated using data from Google Workspace, such as Google Workspace users or Google Chat spaces. * External data: Items are populated from an external data source outside of Google Workspace. For examples of how to implement multiselect menus, see [Add a multiselect menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Multiselect for Google Workspace Add-ons are in Developer Preview."
],
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1SelectionItem": {
"description": "An item that users can select in a selection input, such as a checkbox or switch. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1SelectionItem",
"properties": {
"bottomText": {
"description": "For multiselect menus, a text description or label that's displayed below the item's `text` field.",
"type": "string"
},
"selected": {
"description": "Whether the item is selected by default. If the selection input only accepts one value (such as for radio buttons or a dropdown menu), only set this field for one item.",
"type": "boolean"
},
"startIconUri": {
"description": "For multiselect menus, the URL for the icon displayed next to the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` URL. For example, `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`.",
"type": "string"
},
"text": {
"description": "The text that identifies or describes the item to users.",
"type": "string"
},
"value": {
"description": "The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1SuggestionItem": {
"description": "One suggested value that users can enter in a text input field. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1SuggestionItem",
"properties": {
"text": {
"description": "The value of a suggested input to a text input field. This is equivalent to what users enter themselves.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1Suggestions": {
"description": "Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1Suggestions",
"properties": {
"items": {
"description": "A list of suggestions used for autocomplete recommendations in text input fields.",
"items": {
"$ref": "GoogleAppsCardV1SuggestionItem"
},
"type": "array"
}
},
"type": "object"
},
"GoogleAppsCardV1SwitchControl": {
"description": "Either a toggle-style switch or a checkbox inside a `decoratedText` widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): Only supported in the `decoratedText` widget.",
"id": "GoogleAppsCardV1SwitchControl",
"properties": {
"controlType": {
"description": "How the switch appears in the user interface. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"enum": [
"SWITCH",
"CHECKBOX",
"CHECK_BOX"
],
"enumDescriptions": [
"A toggle-style switch.",
"Deprecated in favor of `CHECK_BOX`.",
"A checkbox."
],
"type": "string"
},
"name": {
"description": "The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
},
"onChangeAction": {
"$ref": "GoogleAppsCardV1Action",
"description": "The action to perform when the switch state is changed, such as what function to run."
},
"selected": {
"description": "When `true`, the switch is selected.",
"type": "boolean"
},
"value": {
"description": "The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1TextInput": {
"description": "A field in which users can enter text. Supports suggestions and on-change actions. For an example in Google Chat apps, see [Add a field in which a user can enter text](https://developers.google.com/workspace/chat/design-interactive-card-dialog#add_a_field_in_which_a_user_can_enter_text). Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data). When you need to collect undefined or abstract data from users, use a text input. To collect defined or enumerated data from users, use the SelectionInput widget. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1TextInput",
"properties": {
"autoCompleteAction": {
"$ref": "GoogleAppsCardV1Action",
"description": "Optional. Specify what action to take when the text input field provides suggestions to users who interact with it. If unspecified, the suggestions are set by `initialSuggestions` and are processed by the client. If specified, the app takes the action specified here, such as running a custom function. [Google Workspace Add-ons](https://developers.google.com/workspace/add-ons):"
},
"hintText": {
"description": "Text that appears below the text input field meant to assist users by prompting them to enter a certain value. This text is always visible. Required if `label` is unspecified. Otherwise, optional.",
"type": "string"
},
"initialSuggestions": {
"$ref": "GoogleAppsCardV1Suggestions",
"description": "Suggested values that users can enter. These values appear when users click inside the text input field. As users type, the suggested values dynamically filter to match what the users have typed. For example, a text input field for programming language might suggest Java, JavaScript, Python, and C++. When users start typing `Jav`, the list of suggestions filters to show just `Java` and `JavaScript`. Suggested values help guide users to enter values that your app can make sense of. When referring to JavaScript, some users might enter `javascript` and others `java script`. Suggesting `JavaScript` can standardize how users interact with your app. When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set to `MULTIPLE_LINE`. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):"
},
"label": {
"description": "The text that appears above the text input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if you are asking someone's name, but specifically need their surname, write `surname` instead of `name`. Required if `hintText` is unspecified. Otherwise, optional.",
"type": "string"
},
"name": {
"description": "The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
},
"onChangeAction": {
"$ref": "GoogleAppsCardV1Action",
"description": "What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/workspace/chat/dialogs) in Google Chat."
},
"placeholderText": {
"description": "Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. [Google Chat apps](https://developers.google.com/workspace/chat):",
"type": "string"
},
"type": {
"description": "How a text input field appears in the user interface. For example, whether the field is single or multi-line.",
"enum": [
"SINGLE_LINE",
"MULTIPLE_LINE"
],
"enumDescriptions": [
"The text input field has a fixed height of one line.",
"The text input field has a fixed height of multiple lines."
],
"type": "string"
},
"value": {
"description": "The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form data](https://developers.google.com/workspace/chat/read-form-data).",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1TextParagraph": {
"description": "A paragraph of text that supports formatting. For an example in Google Chat apps, see [Add a paragraph of formatted text](https://developers.google.com/workspace/chat/add-text-image-card-dialog#add_a_paragraph_of_formatted_text). For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend):",
"id": "GoogleAppsCardV1TextParagraph",
"properties": {
"text": {
"description": "The text that's shown in the widget.",
"type": "string"
}
},
"type": "object"
},
"GoogleAppsCardV1Widget": {
"description": "Each card is made up of widgets. A widget is a composite object that can represent one of text, images, buttons, and other object types.",
"id": "GoogleAppsCardV1Widget",
"properties": {
"buttonList": {
"$ref": "GoogleAppsCardV1ButtonList",
"description": "A list of buttons. For example, the following JSON creates two buttons. The first is a blue text button and the second is an image button that opens a link: ``` \"buttonList\": { \"buttons\": [ { \"text\": \"Edit\", \"color\": { \"red\": 0, \"green\": 0, \"blue\": 1, \"alpha\": 1 }, \"disabled\": true, }, { \"icon\": { \"knownIcon\": \"INVITE\", \"altText\": \"check calendar\" }, \"onClick\": { \"openLink\": { \"url\": \"https://example.com/calendar\" } } } ] } ```"
},
"columns": {
"$ref": "GoogleAppsCardV1Columns",
"description": "Displays up to 2 columns. To include more than 2 columns, or to use rows, use the `Grid` widget. For example, the following JSON creates 2 columns that each contain text paragraphs: ``` \"columns\": { \"columnItems\": [ { \"horizontalSizeStyle\": \"FILL_AVAILABLE_SPACE\", \"horizontalAlignment\": \"CENTER\", \"verticalAlignment\": \"CENTER\", \"widgets\": [ { \"textParagraph\": { \"text\": \"First column text paragraph\" } } ] }, { \"horizontalSizeStyle\": \"FILL_AVAILABLE_SPACE\", \"horizontalAlignment\": \"CENTER\", \"verticalAlignment\": \"CENTER\", \"widgets\": [ { \"textParagraph\": { \"text\": \"Second column text paragraph\" } } ] } ] } ```"
},
"dateTimePicker": {
"$ref": "GoogleAppsCardV1DateTimePicker",
"description": "Displays a widget that lets users input a date, time, or date and time. For example, the following JSON creates a date time picker to schedule an appointment: ``` \"dateTimePicker\": { \"name\": \"appointment_time\", \"label\": \"Book your appointment at:\", \"type\": \"DATE_AND_TIME\", \"valueMsEpoch\": \"796435200000\" } ```"
},
"decoratedText": {
"$ref": "GoogleAppsCardV1DecoratedText",
"description": "Displays a decorated text item. For example, the following JSON creates a decorated text widget showing email address: ``` \"decoratedText\": { \"icon\": { \"knownIcon\": \"EMAIL\" }, \"topLabel\": \"Email Address\", \"text\": \"sasha@example.com\", \"bottomLabel\": \"This is a new Email address!\", \"switchControl\": { \"name\": \"has_send_welcome_email_to_sasha\", \"selected\": false, \"controlType\": \"CHECKBOX\" } } ```"
},
"divider": {
"$ref": "GoogleAppsCardV1Divider",
"description": "Displays a horizontal line divider between widgets. For example, the following JSON creates a divider: ``` \"divider\": { } ```"
},
"grid": {
"$ref": "GoogleAppsCardV1Grid",
"description": "Displays a grid with a collection of items. A grid supports any number of columns and items. The number of rows is determined by the upper bounds of the number items divided by the number of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 items and 2 columns has 6 rows. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend): For example, the following JSON creates a 2 column grid with a single item: ``` \"grid\": { \"title\": \"A fine collection of items\", \"columnCount\": 2, \"borderStyle\": { \"type\": \"STROKE\", \"cornerRadius\": 4 }, \"items\": [ { \"image\": { \"imageUri\": \"https://www.example.com/image.png\", \"cropStyle\": { \"type\": \"SQUARE\" }, \"borderStyle\": { \"type\": \"STROKE\" } }, \"title\": \"An item\", \"textAlignment\": \"CENTER\" } ], \"onClick\": { \"openLink\": { \"url\": \"https://www.example.com\" } } } ```"
},
"horizontalAlignment": {
"description": "Specifies whether widgets align to the left, right, or center of a column.",
"enum": [
"HORIZONTAL_ALIGNMENT_UNSPECIFIED",
"START",
"CENTER",
"END"
],
"enumDescriptions": [
"Don't use. Unspecified.",
"Default value. Aligns widgets to the start position of the column. For left-to-right layouts, aligns to the left. For right-to-left layouts, aligns to the right.",
"Aligns widgets to the center of the column.",
"Aligns widgets to the end position of the column. For left-to-right layouts, aligns widgets to the right. For right-to-left layouts, aligns widgets to the left."
],
"type": "string"
},
"image": {
"$ref": "GoogleAppsCardV1Image",
"description": "Displays an image. For example, the following JSON creates an image with alternative text: ``` \"image\": { \"imageUrl\": \"https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png\", \"altText\": \"Chat app avatar\" } ```"
},
"selectionInput": {
"$ref": "GoogleAppsCardV1SelectionInput",
"description": "Displays a selection control that lets users select items. Selection controls can be checkboxes, radio buttons, switches, or dropdown menus. For example, the following JSON creates a dropdown menu that lets users choose a size: ``` \"selectionInput\": { \"name\": \"size\", \"label\": \"Size\" \"type\": \"DROPDOWN\", \"items\": [ { \"text\": \"S\", \"value\": \"small\", \"selected\": false }, { \"text\": \"M\", \"value\": \"medium\", \"selected\": true }, { \"text\": \"L\", \"value\": \"large\", \"selected\": false }, { \"text\": \"XL\", \"value\": \"extra_large\", \"selected\": false } ] } ```"
},
"textInput": {
"$ref": "GoogleAppsCardV1TextInput",
"description": "Displays a text box that users can type into. For example, the following JSON creates a text input for an email address: ``` \"textInput\": { \"name\": \"mailing_address\", \"label\": \"Mailing Address\" } ``` As another example, the following JSON creates a text input for a programming language with static suggestions: ``` \"textInput\": { \"name\": \"preferred_programing_language\", \"label\": \"Preferred Language\", \"initialSuggestions\": { \"items\": [ { \"text\": \"C++\" }, { \"text\": \"Java\" }, { \"text\": \"JavaScript\" }, { \"text\": \"Python\" } ] } } ```"
},
"textParagraph": {
"$ref": "GoogleAppsCardV1TextParagraph",
"description": "Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` \"textParagraph\": { \"text\": \" *bold text*\" } ```"
}
},
"type": "object"
},
"GoogleAppsCardV1Widgets": {
"description": "The supported widgets that you can include in a column. [Google Workspace Add-ons and Chat apps](https://developers.google.com/workspace/extend)",
"id": "GoogleAppsCardV1Widgets",
"properties": {
"buttonList": {
"$ref": "GoogleAppsCardV1ButtonList",
"description": "ButtonList widget."
},
"dateTimePicker": {
"$ref": "GoogleAppsCardV1DateTimePicker",
"description": "DateTimePicker widget."
},
"decoratedText": {
"$ref": "GoogleAppsCardV1DecoratedText",
"description": "DecoratedText widget."
},
"image": {
"$ref": "GoogleAppsCardV1Image",
"description": "Image widget."
},
"selectionInput": {
"$ref": "GoogleAppsCardV1SelectionInput",
"description": "SelectionInput widget."
},
"textInput": {
"$ref": "GoogleAppsCardV1TextInput",
"description": "TextInput widget."
},
"textParagraph": {
"$ref": "GoogleAppsCardV1TextParagraph",
"description": "TextParagraph widget."
}
},
"type": "object"
},
"Group": {
"description": "A Google Group in Google Chat.",
"id": "Group",
"properties": {
"name": {
"description": "Resource name for a Google Group. Represents a [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in Cloud Identity Groups API. Format: groups/{group}",
"type": "string"
}
},
"type": "object"
},
"HostAppDataSourceMarkup": {
"description": "For a `SelectionInput` widget that uses a multiselect menu, a data source from a Google Workspace application. The data source populates selection items for the multiselect menu. [Google Chat apps](https://developers.google.com/workspace/chat):",
"id": "HostAppDataSourceMarkup",
"properties": {
"chatDataSource": {
"$ref": "ChatClientDataSourceMarkup",
"description": "A data source from Google Chat."
}
},
"type": "object"
},
"Image": {
"description": "An image that's specified by a URL and can have an `onclick` action.",
"id": "Image",
"properties": {
"aspectRatio": {
"description": "The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image.",
"format": "double",
"type": "number"
},
"imageUrl": {
"description": "The URL of the image.",
"type": "string"
},
"onClick": {
"$ref": "OnClick",
"description": "The `onclick` action."
}
},
"type": "object"
},
"ImageButton": {
"description": "An image button with an `onclick` action.",
"id": "ImageButton",
"properties": {
"icon": {
"description": "The icon specified by an `enum` that indices to an icon provided by Chat API.",
"enum": [
"ICON_UNSPECIFIED",
"AIRPLANE",
"BOOKMARK",
"BUS",
"CAR",
"CLOCK",
"CONFIRMATION_NUMBER_ICON",
"DOLLAR",
"DESCRIPTION",
"EMAIL",
"EVENT_PERFORMER",
"EVENT_SEAT",
"FLIGHT_ARRIVAL",
"FLIGHT_DEPARTURE",
"HOTEL",
"HOTEL_ROOM_TYPE",
"INVITE",
"MAP_PIN",
"MEMBERSHIP",
"MULTIPLE_PEOPLE",
"OFFER",
"PERSON",
"PHONE",
"RESTAURANT_ICON",
"SHOPPING_CART",
"STAR",
"STORE",
"TICKET",
"TRAIN",
"VIDEO_CAMERA",
"VIDEO_PLAY"
],
"enumDescriptions": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"type": "string"
},
"iconUrl": {
"description": "The icon specified by a URL.",
"type": "string"
},
"name": {
"description": "The name of this `image_button` that's used for accessibility. Default value is provided if this name isn't specified.",
"type": "string"
},
"onClick": {
"$ref": "OnClick",
"description": "The `onclick` action."
}
},
"type": "object"
},
"Inputs": {
"description": "Types of data that users can [input on cards or dialogs](https://developers.google.com/chat/ui/read-form-data). The input type depends on the type of values that the widget accepts.",
"id": "Inputs",
"properties": {
"dateInput": {
"$ref": "DateInput",
"description": "Date input values from a [`DateTimePicker`](https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker) widget that only accepts date values."
},
"dateTimeInput": {
"$ref": "DateTimeInput",
"description": "Date and time input values from a [`DateTimePicker`](https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker) widget that accepts both a date and time."
},
"stringInputs": {
"$ref": "StringInputs",
"description": "A list of strings that represent the values that the user inputs in a widget. If the widget only accepts one value, such as a [`TextInput`](https://developers.google.com/chat/api/reference/rest/v1/cards#TextInput) widget, the list contains one string object. If the widget accepts multiple values, such as a [`SelectionInput`](https://developers.google.com/chat/api/reference/rest/v1/cards#selectioninput) widget of checkboxes, the list contains a string object for each value that the user inputs or selects."
},
"timeInput": {
"$ref": "TimeInput",
"description": "Time input values from a [`DateTimePicker`](https://developers.google.com/chat/api/reference/rest/v1/cards#DateTimePicker) widget that only accepts time values."
}
},
"type": "object"
},
"KeyValue": {
"description": "A UI element contains a key (label) and a value (content). This element can also contain some actions such as `onclick` button.",
"id": "KeyValue",
"properties": {
"bottomLabel": {
"description": "The text of the bottom label. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
},
"button": {
"$ref": "Button",
"description": "A button that can be clicked to trigger an action."
},
"content": {
"description": "The text of the content. Formatted text supported and always required. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
},
"contentMultiline": {
"description": "If the content should be multiline.",
"type": "boolean"
},
"icon": {
"description": "An enum value that's replaced by the Chat API with the corresponding icon image.",
"enum": [
"ICON_UNSPECIFIED",
"AIRPLANE",
"BOOKMARK",
"BUS",
"CAR",
"CLOCK",
"CONFIRMATION_NUMBER_ICON",
"DOLLAR",
"DESCRIPTION",
"EMAIL",
"EVENT_PERFORMER",
"EVENT_SEAT",
"FLIGHT_ARRIVAL",
"FLIGHT_DEPARTURE",
"HOTEL",
"HOTEL_ROOM_TYPE",
"INVITE",
"MAP_PIN",
"MEMBERSHIP",
"MULTIPLE_PEOPLE",
"OFFER",
"PERSON",
"PHONE",
"RESTAURANT_ICON",
"SHOPPING_CART",
"STAR",
"STORE",
"TICKET",
"TRAIN",
"VIDEO_CAMERA",
"VIDEO_PLAY"
],
"enumDescriptions": [
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
],
"type": "string"
},
"iconUrl": {
"description": "The icon specified by a URL.",
"type": "string"
},
"onClick": {
"$ref": "OnClick",
"description": "The `onclick` action. Only the top label, bottom label, and content region are clickable."
},
"topLabel": {
"description": "The text of the top label. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
}
},
"type": "object"
},
"ListMembershipsResponse": {
"description": "Response to list memberships of the space.",
"id": "ListMembershipsResponse",
"properties": {
"memberships": {
"description": "Unordered list. List of memberships in the requested (or first) page.",
"items": {
"$ref": "Membership"
},
"type": "array"
},
"nextPageToken": {
"description": "A token that you can send as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
"type": "string"
}
},
"type": "object"
},
"ListMessagesResponse": {
"description": "Response message for listing messages.",
"id": "ListMessagesResponse",
"properties": {
"messages": {
"description": "List of messages.",
"items": {
"$ref": "Message"
},
"type": "array"
},
"nextPageToken": {
"description": "You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
"type": "string"
}
},
"type": "object"
},
"ListReactionsResponse": {
"description": "Response to a list reactions request.",
"id": "ListReactionsResponse",
"properties": {
"nextPageToken": {
"description": "Continuation token to retrieve the next page of results. It's empty for the last page of results.",
"type": "string"
},
"reactions": {
"description": "List of reactions in the requested (or first) page.",
"items": {
"$ref": "Reaction"
},
"type": "array"
}
},
"type": "object"
},
"ListSpaceEventsResponse": {
"description": "Response message for listing space events.",
"id": "ListSpaceEventsResponse",
"properties": {
"nextPageToken": {
"description": "Continuation token used to fetch more events. If this field is omitted, there are no subsequent pages.",
"type": "string"
},
"spaceEvents": {
"description": "Results are returned in chronological order (oldest event first).",
"items": {
"$ref": "SpaceEvent"
},
"type": "array"
}
},
"type": "object"
},
"ListSpacesResponse": {
"description": "The response for a list spaces request.",
"id": "ListSpacesResponse",
"properties": {
"nextPageToken": {
"description": "You can send a token as `pageToken` to retrieve the next page of results. If empty, there are no subsequent pages.",
"type": "string"
},
"spaces": {
"description": "List of spaces in the requested (or first) page.",
"items": {
"$ref": "Space"
},
"type": "array"
}
},
"type": "object"
},
"MatchedUrl": {
"description": "A matched URL in a Chat message. Chat apps can preview matched URLs. For more information, see [Preview links](https://developers.google.com/chat/how-tos/preview-links).",
"id": "MatchedUrl",
"properties": {
"url": {
"description": "Output only. The URL that was matched.",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"Media": {
"description": "Media resource.",
"id": "Media",
"properties": {
"resourceName": {
"description": "Name of the media resource.",
"type": "string"
}
},
"type": "object"
},
"Membership": {
"description": "Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.",
"id": "Membership",
"properties": {
"createTime": {
"description": "Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces.",
"format": "google-datetime",
"type": "string"
},
"deleteTime": {
"description": "Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces.",
"format": "google-datetime",
"type": "string"
},
"groupMember": {
"$ref": "Group",
"description": "The Google Group the membership corresponds to."
},
"member": {
"$ref": "User",
"description": "The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) `name` and `type`."
},
"name": {
"description": "Resource name of the membership, assigned by the server. Format: `spaces/{space}/members/{member}`",
"type": "string"
},
"role": {
"description": "Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in `UpdateMembership`.",
"enum": [
"MEMBERSHIP_ROLE_UNSPECIFIED",
"ROLE_MEMBER",
"ROLE_MANAGER"
],
"enumDescriptions": [
"Default value. For users: they aren't a member of the space, but can be invited. For Google Groups: they're always assigned this role (other enum values might be used in the future).",
"A member of the space. The user has basic permissions, like sending messages to the space. In 1:1 and unnamed group conversations, everyone has this role.",
"A space manager. The user has all basic permissions plus administrative permissions that let them manage the space, like adding or removing members. Only supported in SpaceType.SPACE."
],
"type": "string"
},
"state": {
"description": "Output only. State of the membership.",
"enum": [
"MEMBERSHIP_STATE_UNSPECIFIED",
"JOINED",
"INVITED",
"NOT_A_MEMBER"
],
"enumDescriptions": [
"Default value. Don't use.",
"The user is added to the space, and can participate in the space.",
"The user is invited to join the space, but hasn't joined it.",
"The user doesn't belong to the space and doesn't have a pending invitation to join the space."
],
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"MembershipBatchCreatedEventData": {
"description": "Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`",
"id": "MembershipBatchCreatedEventData",
"properties": {
"memberships": {
"description": "A list of new memberships.",
"items": {
"$ref": "MembershipCreatedEventData"
},
"type": "array"
}
},
"type": "object"
},
"MembershipBatchDeletedEventData": {
"description": "Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`",
"id": "MembershipBatchDeletedEventData",
"properties": {
"memberships": {
"description": "A list of deleted memberships.",
"items": {
"$ref": "MembershipDeletedEventData"
},
"type": "array"
}
},
"type": "object"
},
"MembershipBatchUpdatedEventData": {
"description": "Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`",
"id": "MembershipBatchUpdatedEventData",
"properties": {
"memberships": {
"description": "A list of updated memberships.",
"items": {
"$ref": "MembershipUpdatedEventData"
},
"type": "array"
}
},
"type": "object"
},
"MembershipCreatedEventData": {
"description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`.",
"id": "MembershipCreatedEventData",
"properties": {
"membership": {
"$ref": "Membership",
"description": "The new membership."
}
},
"type": "object"
},
"MembershipDeletedEventData": {
"description": "Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`",
"id": "MembershipDeletedEventData",
"properties": {
"membership": {
"$ref": "Membership",
"description": "The deleted membership. Only the `name` and `state` fields are populated."
}
},
"type": "object"
},
"MembershipUpdatedEventData": {
"description": "Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`",
"id": "MembershipUpdatedEventData",
"properties": {
"membership": {
"$ref": "Membership",
"description": "The updated membership."
}
},
"type": "object"
},
"Message": {
"description": "A message in a Google Chat space.",
"id": "Message",
"properties": {
"accessoryWidgets": {
"description": "One or more interactive widgets that appear at the bottom of a message. You can add accessory widgets to messages that contain text, cards, or both text and cards. Not supported for messages that contain dialogs. For details, see [Add interactive widgets at the bottom of a message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). Creating a message with accessory widgets requires [app authentication] (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).",
"items": {
"$ref": "AccessoryWidget"
},
"type": "array"
},
"actionResponse": {
"$ref": "ActionResponse",
"description": "Input only. Parameters that a Chat app can use to configure how its response is posted."
},
"annotations": {
"description": "Output only. Annotations associated with the `text` in this message.",
"items": {
"$ref": "Annotation"
},
"readOnly": true,
"type": "array"
},
"argumentText": {
"description": "Output only. Plain-text body of the message with all Chat app mentions stripped out.",
"readOnly": true,
"type": "string"
},
"attachedGifs": {
"description": "Output only. GIF images that are attached to the message.",
"items": {
"$ref": "AttachedGif"
},
"readOnly": true,
"type": "array"
},
"attachment": {
"description": "User-uploaded attachment.",
"items": {
"$ref": "Attachment"
},
"type": "array"
},
"cards": {
"deprecated": true,
"description": "Deprecated: Use `cards_v2` instead. Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. `cards` and `cards_v2` can have a maximum size of 32 KB.",
"items": {
"$ref": "Card"
},
"type": "array"
},
"cardsV2": {
"description": "An array of [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). Only Chat apps can create cards. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the messages can't contain cards. To learn about cards and how to create them, see [Send card messages](https://developers.google.com/workspace/chat/create-messages#create). [Card builder](https://addons.gsuite.google.com/uikit/builder)",
"items": {
"$ref": "CardWithId"
},
"type": "array"
},
"clientAssignedMessageId": {
"description": "Optional. A custom ID for the message. You can use field to identify a message, or to get, delete, or update a message. To set a custom ID, specify the [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) field when you create the message. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"type": "string"
},
"createTime": {
"description": "Optional. Immutable. For spaces created in Chat, the time at which the message was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time.",
"format": "google-datetime",
"type": "string"
},
"deleteTime": {
"description": "Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.",
"format": "google-datetime",
"readOnly": true,
"type": "string"
},
"deletionMetadata": {
"$ref": "DeletionMetadata",
"description": "Output only. Information about a deleted message. A message is deleted when `delete_time` is set.",
"readOnly": true
},
"emojiReactionSummaries": {
"description": "Output only. The list of emoji reaction summaries on the message.",
"items": {
"$ref": "EmojiReactionSummary"
},
"readOnly": true,
"type": "array"
},
"fallbackText": {
"description": "A plain-text description of the message's cards, used when the actual cards can't be displayed\u2014for example, mobile notifications.",
"type": "string"
},
"formattedText": {
"description": "Output only. Contains the message `text` with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following: * [Markup syntax](https://developers.google.com/workspace/chat/format-messages) for bold, italic, strikethrough, monospace, monospace block, and bulleted list. * [User mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) using the format ``. * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the first string is the URL and the second is the rendered text\u2014for example, ``. * Custom emoji using the format `:{emoji_name}:`\u2014for example, `:smile:`. This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning face emoji. For more information, see [View text formatting sent in a message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message)",
"readOnly": true,
"type": "string"
},
"lastUpdateTime": {
"description": "Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty.",
"format": "google-datetime",
"readOnly": true,
"type": "string"
},
"matchedUrl": {
"$ref": "MatchedUrl",
"description": "Output only. A URL in `spaces.messages.text` that matches a link preview pattern. For more information, see [Preview links](https://developers.google.com/workspace/chat/preview-links).",
"readOnly": true
},
"name": {
"description": "Resource name of the message. Format: `spaces/{space}/messages/{message}` Where `{space}` is the ID of the space where the message is posted and `{message}` is a system-assigned ID for the message. For example, `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing `{message}` with the value from the `clientAssignedMessageId` field. For example, `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name a message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).",
"type": "string"
},
"privateMessageViewer": {
"$ref": "User",
"description": "Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. Link previews and attachments aren't supported for private messages. Only Chat apps can send private messages. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) to send a message, the message can't be private and must omit this field. For details, see [Send private messages to Google Chat users](https://developers.google.com/workspace/chat/private-messages)."
},
"quotedMessageMetadata": {
"$ref": "QuotedMessageMetadata",
"description": "Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it.",
"readOnly": true
},
"sender": {
"$ref": "User",
"description": "Output only. The user who created the message. If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) `name` and `type`.",
"readOnly": true
},
"slashCommand": {
"$ref": "SlashCommand",
"description": "Output only. Slash command information, if applicable.",
"readOnly": true
},
"space": {
"$ref": "Space",
"description": "If your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output populates the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) `name`."
},
"text": {
"description": "Plain-text body of the message. The first link to an image, video, or web page generates a [preview chip](https://developers.google.com/workspace/chat/preview-links). You can also [@mention a Google Chat user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), or everyone in the space. To learn about creating text messages, see [Send a text message](https://developers.google.com/workspace/chat/create-messages#create-text-messages).",
"type": "string"
},
"thread": {
"$ref": "Thread",
"description": "The thread the message belongs to. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread)."
},
"threadReply": {
"description": "Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies. If the space doesn't support reply in threads, this field is always `false`.",
"readOnly": true,
"type": "boolean"
}
},
"type": "object"
},
"MessageBatchCreatedEventData": {
"description": "Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`",
"id": "MessageBatchCreatedEventData",
"properties": {
"messages": {
"description": "A list of new messages.",
"items": {
"$ref": "MessageCreatedEventData"
},
"type": "array"
}
},
"type": "object"
},
"MessageBatchDeletedEventData": {
"description": "Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`",
"id": "MessageBatchDeletedEventData",
"properties": {
"messages": {
"description": "A list of deleted messages.",
"items": {
"$ref": "MessageDeletedEventData"
},
"type": "array"
}
},
"type": "object"
},
"MessageBatchUpdatedEventData": {
"description": "Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`",
"id": "MessageBatchUpdatedEventData",
"properties": {
"messages": {
"description": "A list of updated messages.",
"items": {
"$ref": "MessageUpdatedEventData"
},
"type": "array"
}
},
"type": "object"
},
"MessageCreatedEventData": {
"description": "Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`",
"id": "MessageCreatedEventData",
"properties": {
"message": {
"$ref": "Message",
"description": "The new message."
}
},
"type": "object"
},
"MessageDeletedEventData": {
"description": "Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`",
"id": "MessageDeletedEventData",
"properties": {
"message": {
"$ref": "Message",
"description": "The deleted message. Only the `name`, `createTime`, `deleteTime`, and `deletionMetadata` fields are populated."
}
},
"type": "object"
},
"MessageUpdatedEventData": {
"description": "Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`",
"id": "MessageUpdatedEventData",
"properties": {
"message": {
"$ref": "Message",
"description": "The updated message."
}
},
"type": "object"
},
"OnClick": {
"description": "An `onclick` action (for example, open a link).",
"id": "OnClick",
"properties": {
"action": {
"$ref": "FormAction",
"description": "A form action is triggered by this `onclick` action if specified."
},
"openLink": {
"$ref": "OpenLink",
"description": "This `onclick` action triggers an open link action if specified."
}
},
"type": "object"
},
"OpenLink": {
"description": "A link that opens a new window.",
"id": "OpenLink",
"properties": {
"url": {
"description": "The URL to open.",
"type": "string"
}
},
"type": "object"
},
"QuotedMessageMetadata": {
"description": "Information about a quoted message.",
"id": "QuotedMessageMetadata",
"properties": {
"lastUpdateTime": {
"description": "Output only. The timestamp when the quoted message was created or when the quoted message was last updated.",
"format": "google-datetime",
"readOnly": true,
"type": "string"
},
"name": {
"description": "Output only. Resource name of the quoted message. Format: `spaces/{space}/messages/{message}`",
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"Reaction": {
"description": "A reaction to a message.",
"id": "Reaction",
"properties": {
"emoji": {
"$ref": "Emoji",
"description": "The emoji used in the reaction."
},
"name": {
"description": "The resource name of the reaction. Format: `spaces/{space}/messages/{message}/reactions/{reaction}`",
"type": "string"
},
"user": {
"$ref": "User",
"description": "Output only. The user who created the reaction.",
"readOnly": true
}
},
"type": "object"
},
"ReactionBatchCreatedEventData": {
"description": "Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`",
"id": "ReactionBatchCreatedEventData",
"properties": {
"reactions": {
"description": "A list of new reactions.",
"items": {
"$ref": "ReactionCreatedEventData"
},
"type": "array"
}
},
"type": "object"
},
"ReactionBatchDeletedEventData": {
"description": "Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`",
"id": "ReactionBatchDeletedEventData",
"properties": {
"reactions": {
"description": "A list of deleted reactions.",
"items": {
"$ref": "ReactionDeletedEventData"
},
"type": "array"
}
},
"type": "object"
},
"ReactionCreatedEventData": {
"description": "Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`",
"id": "ReactionCreatedEventData",
"properties": {
"reaction": {
"$ref": "Reaction",
"description": "The new reaction."
}
},
"type": "object"
},
"ReactionDeletedEventData": {
"description": "Event payload for a deleted reaction. Type: `google.workspace.chat.reaction.v1.deleted`",
"id": "ReactionDeletedEventData",
"properties": {
"reaction": {
"$ref": "Reaction",
"description": "The deleted reaction."
}
},
"type": "object"
},
"RichLinkMetadata": {
"description": "A rich link to a resource.",
"id": "RichLinkMetadata",
"properties": {
"driveLinkData": {
"$ref": "DriveLinkData",
"description": "Data for a drive link."
},
"richLinkType": {
"description": "The rich link type.",
"enum": [
"RICH_LINK_TYPE_UNSPECIFIED",
"DRIVE_FILE"
],
"enumDescriptions": [
"Default value for the enum. Don't use.",
"A Google Drive rich link type."
],
"type": "string"
},
"uri": {
"description": "The URI of this link.",
"type": "string"
}
},
"type": "object"
},
"Section": {
"description": "A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).",
"id": "Section",
"properties": {
"header": {
"description": "The header of the section. Formatted text is supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"type": "string"
},
"widgets": {
"description": "A section must contain at least one widget.",
"items": {
"$ref": "WidgetMarkup"
},
"type": "array"
}
},
"type": "object"
},
"SelectionItems": {
"description": "List of widget autocomplete results.",
"id": "SelectionItems",
"properties": {
"items": {
"description": "An array of the SelectionItem objects.",
"items": {
"$ref": "GoogleAppsCardV1SelectionItem"
},
"type": "array"
}
},
"type": "object"
},
"SetUpSpaceRequest": {
"description": "Request to create a space and add specified users to it.",
"id": "SetUpSpaceRequest",
"properties": {
"memberships": {
"description": "Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 20 memberships (in addition to the caller). For human membership, the `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the `user.name` can be `users/example@gmail.com`. To invite Gmail users or users from external Google Workspace domains, user's email must be used for `{user}`. For Google group membership, the `Membership.group_member` field must contain a `group` with `name` populated (format `groups/{group}`). You can only add Google groups when setting `Space.spaceType` to `SPACE`. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).",
"items": {
"$ref": "Membership"
},
"type": "array"
},
"requestId": {
"description": "Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error.",
"type": "string"
},
"space": {
"$ref": "Space",
"description": "Required. The `Space.spaceType` field is required. To create a space, set `Space.spaceType` to `SPACE` and set `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when setting up a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. To create a group chat, set `Space.spaceType` to `GROUP_CHAT`. Don't set `Space.displayName`. To create a 1:1 conversation between humans, set `Space.spaceType` to `DIRECT_MESSAGE` and set `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or `Space.spaceDetails`. To create an 1:1 conversation between a human and the calling Chat app, set `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or `Space.spaceDetails`. If a `DIRECT_MESSAGE` space already exists, that space is returned instead of creating a new space."
}
},
"type": "object"
},
"SlashCommand": {
"description": "A [slash command](https://developers.google.com/workspace/chat/slash-commands) in Google Chat.",
"id": "SlashCommand",
"properties": {
"commandId": {
"description": "The ID of the slash command invoked.",
"format": "int64",
"type": "string"
}
},
"type": "object"
},
"SlashCommandMetadata": {
"description": "Annotation metadata for slash commands (/).",
"id": "SlashCommandMetadata",
"properties": {
"bot": {
"$ref": "User",
"description": "The Chat app whose command was invoked."
},
"commandId": {
"description": "The command ID of the invoked slash command.",
"format": "int64",
"type": "string"
},
"commandName": {
"description": "The name of the invoked slash command.",
"type": "string"
},
"triggersDialog": {
"description": "Indicates whether the slash command is for a dialog.",
"type": "boolean"
},
"type": {
"description": "The type of slash command.",
"enum": [
"TYPE_UNSPECIFIED",
"ADD",
"INVOKE"
],
"enumDescriptions": [
"Default value for the enum. Don't use.",
"Add Chat app to space.",
"Invoke slash command in space."
],
"type": "string"
}
},
"type": "object"
},
"Space": {
"description": "A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.",
"id": "Space",
"properties": {
"accessSettings": {
"$ref": "AccessSettings",
"description": "Optional. Specifies the [access setting](https://support.google.com/chat/answer/11971020) of the space. Only populated when the `space_type` is `SPACE`."
},
"adminInstalled": {
"description": "Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging.",
"readOnly": true,
"type": "boolean"
},
"createTime": {
"description": "Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`.",
"format": "google-datetime",
"type": "string"
},
"displayName": {
"description": "The space's display name. Required when [creating a space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters.",
"type": "string"
},
"externalUserAllowed": {
"description": "Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user. * The space is used to [import data to Google Chat] (https://developers.google.com/chat/api/guides/import-data-overview) because import mode spaces must only permit members from the same Google Workspace organization. However, as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), import mode spaces can permit any Google Chat user so this field can then be set for import mode spaces. For existing spaces, this field is output only.",
"type": "boolean"
},
"importMode": {
"description": "Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.",
"type": "boolean"
},
"name": {
"description": "Resource name of the space. Format: `spaces/{space}`",
"type": "string"
},
"singleUserBotDm": {
"description": "Optional. Whether the space is a DM between a Chat app and a single human.",
"type": "boolean"
},
"spaceDetails": {
"$ref": "SpaceDetails",
"description": "Details about the space including description and rules."
},
"spaceHistoryState": {
"description": "The message history state for messages and threads in this space.",
"enum": [
"HISTORY_STATE_UNSPECIFIED",
"HISTORY_OFF",
"HISTORY_ON"
],
"enumDescriptions": [
"Default value. Do not use.",
"History off. [Messages and threads are kept for 24 hours](https://support.google.com/chat/answer/7664687).",
"History on. The organization's [Vault retention rules](https://support.google.com/vault/answer/7657597) specify for how long messages and threads are kept."
],
"type": "string"
},
"spaceThreadingState": {
"description": "Output only. The threading state in the Chat space.",
"enum": [
"SPACE_THREADING_STATE_UNSPECIFIED",
"THREADED_MESSAGES",
"GROUPED_MESSAGES",
"UNTHREADED_MESSAGES"
],
"enumDescriptions": [
"Reserved.",
"Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message.",
"Named spaces where the conversation is organized by topic. Topics and their replies are grouped together.",
"Direct messages (DMs) between two people and group conversations between 3 or more people."
],
"readOnly": true,
"type": "string"
},
"spaceType": {
"description": "The type of space. Required when creating a space or updating the space type of a space. Output only for other usage.",
"enum": [
"SPACE_TYPE_UNSPECIFIED",
"SPACE",
"GROUP_CHAT",
"DIRECT_MESSAGE"
],
"enumDescriptions": [
"Reserved.",
"A place where people send messages, share files, and collaborate. A `SPACE` can include Chat apps.",
"Group conversations between 3 or more people. A `GROUP_CHAT` can include Chat apps.",
"1:1 messages between two humans or a human and a Chat app."
],
"type": "string"
},
"spaceUri": {
"description": "Output only. The URI for a user to access the space.",
"readOnly": true,
"type": "string"
},
"threaded": {
"deprecated": true,
"description": "Output only. Deprecated: Use `spaceThreadingState` instead. Whether messages are threaded in this space.",
"readOnly": true,
"type": "boolean"
},
"type": {
"deprecated": true,
"description": "Output only. Deprecated: Use `space_type` instead. The type of a space.",
"enum": [
"TYPE_UNSPECIFIED",
"ROOM",
"DM"
],
"enumDescriptions": [
"Reserved.",
"Conversations between two or more humans.",
"1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this doesn't include direct messages between two humans."
],
"readOnly": true,
"type": "string"
}
},
"type": "object"
},
"SpaceBatchUpdatedEventData": {
"description": "Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`",
"id": "SpaceBatchUpdatedEventData",
"properties": {
"spaces": {
"description": "A list of updated spaces.",
"items": {
"$ref": "SpaceUpdatedEventData"
},
"type": "array"
}
},
"type": "object"
},
"SpaceDataSource": {
"description": "A data source that populates Google Chat spaces as selection items for a multiselect menu. Only populates spaces that the user is a member of. [Google Chat apps](https://developers.google.com/workspace/chat):",
"id": "SpaceDataSource",
"properties": {
"defaultToCurrentSpace": {
"description": "If set to `true`, the multiselect menu selects the current Google Chat space as an item by default.",
"type": "boolean"
}
},
"type": "object"
},
"SpaceDetails": {
"description": "Details about the space including description and rules.",
"id": "SpaceDetails",
"properties": {
"description": {
"description": "Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters.",
"type": "string"
},
"guidelines": {
"description": "Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters.",
"type": "string"
}
},
"type": "object"
},
"SpaceEvent": {
"description": "An event that represents a change or activity in a Google Chat space. To learn more, see [Work with events from Google Chat](https://developers.google.com/workspace/chat/events-overview).",
"id": "SpaceEvent",
"properties": {
"eventTime": {
"description": "Time when the event occurred.",
"format": "google-datetime",
"type": "string"
},
"eventType": {
"description": "Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For `spaceEvents.list()` requests, omit batch event types in your query filter. By default, the server returns both event type and its batch version. Supported event types for [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): * New message: `google.workspace.chat.message.v1.created` * Updated message: `google.workspace.chat.message.v1.updated` * Deleted message: `google.workspace.chat.message.v1.deleted` * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` * Multiple updated messages: `google.workspace.chat.message.v1.batchUpdated` * Multiple deleted messages: `google.workspace.chat.message.v1.batchDeleted` Supported event types for [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): * New membership: `google.workspace.chat.membership.v1.created` * Updated membership: `google.workspace.chat.membership.v1.updated` * Deleted membership: `google.workspace.chat.membership.v1.deleted` * Multiple new memberships: `google.workspace.chat.membership.v1.batchCreated` * Multiple updated memberships: `google.workspace.chat.membership.v1.batchUpdated` * Multiple deleted memberships: `google.workspace.chat.membership.v1.batchDeleted` Supported event types for [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): * New reaction: `google.workspace.chat.reaction.v1.created` * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` * Multiple new reactions: `google.workspace.chat.reaction.v1.batchCreated` * Multiple deleted reactions: `google.workspace.chat.reaction.v1.batchDeleted` Supported event types about the [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): * Updated space: `google.workspace.chat.space.v1.updated` * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated`",
"type": "string"
},
"membershipBatchCreatedEventData": {
"$ref": "MembershipBatchCreatedEventData",
"description": "Event payload for multiple new memberships. Event type: `google.workspace.chat.membership.v1.batchCreated`"
},
"membershipBatchDeletedEventData": {
"$ref": "MembershipBatchDeletedEventData",
"description": "Event payload for multiple deleted memberships. Event type: `google.workspace.chat.membership.v1.batchDeleted`"
},
"membershipBatchUpdatedEventData": {
"$ref": "MembershipBatchUpdatedEventData",
"description": "Event payload for multiple updated memberships. Event type: `google.workspace.chat.membership.v1.batchUpdated`"
},
"membershipCreatedEventData": {
"$ref": "MembershipCreatedEventData",
"description": "Event payload for a new membership. Event type: `google.workspace.chat.membership.v1.created`"
},
"membershipDeletedEventData": {
"$ref": "MembershipDeletedEventData",
"description": "Event payload for a deleted membership. Event type: `google.workspace.chat.membership.v1.deleted`"
},
"membershipUpdatedEventData": {
"$ref": "MembershipUpdatedEventData",
"description": "Event payload for an updated membership. Event type: `google.workspace.chat.membership.v1.updated`"
},
"messageBatchCreatedEventData": {
"$ref": "MessageBatchCreatedEventData",
"description": "Event payload for multiple new messages. Event type: `google.workspace.chat.message.v1.batchCreated`"
},
"messageBatchDeletedEventData": {
"$ref": "MessageBatchDeletedEventData",
"description": "Event payload for multiple deleted messages. Event type: `google.workspace.chat.message.v1.batchDeleted`"
},
"messageBatchUpdatedEventData": {
"$ref": "MessageBatchUpdatedEventData",
"description": "Event payload for multiple updated messages. Event type: `google.workspace.chat.message.v1.batchUpdated`"
},
"messageCreatedEventData": {
"$ref": "MessageCreatedEventData",
"description": "Event payload for a new message. Event type: `google.workspace.chat.message.v1.created`"
},
"messageDeletedEventData": {
"$ref": "MessageDeletedEventData",
"description": "Event payload for a deleted message. Event type: `google.workspace.chat.message.v1.deleted`"
},
"messageUpdatedEventData": {
"$ref": "MessageUpdatedEventData",
"description": "Event payload for an updated message. Event type: `google.workspace.chat.message.v1.updated`"
},
"name": {
"description": "Resource name of the space event. Format: `spaces/{space}/spaceEvents/{spaceEvent}`",
"type": "string"
},
"reactionBatchCreatedEventData": {
"$ref": "ReactionBatchCreatedEventData",
"description": "Event payload for multiple new reactions. Event type: `google.workspace.chat.reaction.v1.batchCreated`"
},
"reactionBatchDeletedEventData": {
"$ref": "ReactionBatchDeletedEventData",
"description": "Event payload for multiple deleted reactions. Event type: `google.workspace.chat.reaction.v1.batchDeleted`"
},
"reactionCreatedEventData": {
"$ref": "ReactionCreatedEventData",
"description": "Event payload for a new reaction. Event type: `google.workspace.chat.reaction.v1.created`"
},
"reactionDeletedEventData": {
"$ref": "ReactionDeletedEventData",
"description": "Event payload for a deleted reaction. Event type: `google.workspace.chat.reaction.v1.deleted`"
},
"spaceBatchUpdatedEventData": {
"$ref": "SpaceBatchUpdatedEventData",
"description": "Event payload for multiple updates to a space. Event type: `google.workspace.chat.space.v1.batchUpdated`"
},
"spaceUpdatedEventData": {
"$ref": "SpaceUpdatedEventData",
"description": "Event payload for a space update. Event type: `google.workspace.chat.space.v1.updated`"
}
},
"type": "object"
},
"SpaceReadState": {
"description": "A user's read state within a space, used to identify read and unread messages.",
"id": "SpaceReadState",
"properties": {
"lastReadTime": {
"description": "Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space.",
"format": "google-datetime",
"type": "string"
},
"name": {
"description": "Resource name of the space read state. Format: `users/{user}/spaces/{space}/spaceReadState`",
"type": "string"
}
},
"type": "object"
},
"SpaceUpdatedEventData": {
"description": "Event payload for an updated space. Event type: `google.workspace.chat.space.v1.updated`",
"id": "SpaceUpdatedEventData",
"properties": {
"space": {
"$ref": "Space",
"description": "The updated space."
}
},
"type": "object"
},
"Status": {
"description": "The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).",
"id": "Status",
"properties": {
"code": {
"description": "The status code, which should be an enum value of google.rpc.Code.",
"format": "int32",
"type": "integer"
},
"details": {
"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.",
"items": {
"additionalProperties": {
"description": "Properties of the object. Contains field @type with type URL.",
"type": "any"
},
"type": "object"
},
"type": "array"
},
"message": {
"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.",
"type": "string"
}
},
"type": "object"
},
"StringInputs": {
"description": "Input parameter for regular widgets. For single-valued widgets, it is a single value list. For multi-valued widgets, such as checkbox, all the values are presented.",
"id": "StringInputs",
"properties": {
"value": {
"description": "An list of strings entered by the user.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"TextButton": {
"description": "A button with text and `onclick` action.",
"id": "TextButton",
"properties": {
"onClick": {
"$ref": "OnClick",
"description": "The `onclick` action of the button."
},
"text": {
"description": "The text of the button.",
"type": "string"
}
},
"type": "object"
},
"TextParagraph": {
"description": "A paragraph of text. Formatted text supported. For more information about formatting text, see [Formatting text in Google Chat apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) and [Formatting text in Google Workspace Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).",
"id": "TextParagraph",
"properties": {
"text": {
"type": "string"
}
},
"type": "object"
},
"Thread": {
"description": "A thread in a Google Chat space. For example usage, see [Start or reply to a message thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). If you specify a thread when creating a message, you can set the [`messageReplyOption`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#messagereplyoption) field to determine what happens if no matching thread is found.",
"id": "Thread",
"properties": {
"name": {
"description": "Output only. Resource name of the thread. Example: `spaces/{space}/threads/{thread}`",
"type": "string"
},
"threadKey": {
"description": "Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread `name` field instead.",
"type": "string"
}
},
"type": "object"
},
"ThreadReadState": {
"description": "A user's read state within a thread, used to identify read and unread messages.",
"id": "ThreadReadState",
"properties": {
"lastReadTime": {
"description": "The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread.",
"format": "google-datetime",
"type": "string"
},
"name": {
"description": "Resource name of the thread read state. Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState`",
"type": "string"
}
},
"type": "object"
},
"TimeInput": {
"description": "Time input values.",
"id": "TimeInput",
"properties": {
"hours": {
"description": "The hour on a 24-hour clock.",
"format": "int32",
"type": "integer"
},
"minutes": {
"description": "The number of minutes past the hour. Valid values are 0 to 59.",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"TimeZone": {
"description": "The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types [`CARD_CLICKED`](https://developers.google.com/chat/api/reference/rest/v1/EventType#ENUM_VALUES.CARD_CLICKED) and [`SUBMIT_DIALOG`](https://developers.google.com/chat/api/reference/rest/v1/DialogEventType#ENUM_VALUES.SUBMIT_DIALOG).",
"id": "TimeZone",
"properties": {
"id": {
"description": "The [IANA TZ](https://www.iana.org/time-zones) time zone database code, such as \"America/Toronto\".",
"type": "string"
},
"offset": {
"description": "The user timezone offset, in milliseconds, from Coordinated Universal Time (UTC).",
"format": "int32",
"type": "integer"
}
},
"type": "object"
},
"UpdatedWidget": {
"description": "The response of the updated widget. Used to provide autocomplete options for a widget.",
"id": "UpdatedWidget",
"properties": {
"suggestions": {
"$ref": "SelectionItems",
"description": "List of widget autocomplete results"
},
"widget": {
"description": "The ID of the updated widget. The ID must match the one for the widget that triggered the update request.",
"type": "string"
}
},
"type": "object"
},
"UploadAttachmentRequest": {
"description": "Request to upload an attachment.",
"id": "UploadAttachmentRequest",
"properties": {
"filename": {
"description": "Required. The filename of the attachment, including the file extension.",
"type": "string"
}
},
"type": "object"
},
"UploadAttachmentResponse": {
"description": "Response of uploading an attachment.",
"id": "UploadAttachmentResponse",
"properties": {
"attachmentDataRef": {
"$ref": "AttachmentDataRef",
"description": "Reference to the uploaded attachment."
}
},
"type": "object"
},
"User": {
"description": "A user in Google Chat. When returned as an output from a request, if your Chat app [authenticates as a user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), the output for a `User` resource only populates the user's `name` and `type`.",
"id": "User",
"properties": {
"displayName": {
"description": "Output only. The user's display name.",
"readOnly": true,
"type": "string"
},
"domainId": {
"description": "Unique identifier of the user's Google Workspace domain.",
"type": "string"
},
"isAnonymous": {
"description": "Output only. When `true`, the user is deleted or their profile is not visible.",
"readOnly": true,
"type": "boolean"
},
"name": {
"description": "Resource name for a Google Chat user. Format: `users/{user}`. `users/app` can be used as an alias for the calling app bot user. For human users, `{user}` is the same user identifier as: - the `id` for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API. For example, `users/123456789` in Chat API represents the same person as the `123456789` Person profile ID in People API. - the `id` for a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. - the user's email address can be used as an alias for `{user}` in API requests. For example, if the People API Person profile ID for `user@example.com` is `123456789`, you can use `users/user@example.com` as an alias to reference `users/123456789`. Only the canonical resource name (for example `users/123456789`) will be returned from the API.",
"type": "string"
},
"type": {
"description": "User type.",
"enum": [
"TYPE_UNSPECIFIED",
"HUMAN",
"BOT"
],
"enumDescriptions": [
"Default value for the enum. DO NOT USE.",
"Human user.",
"Chat app user."
],
"type": "string"
}
},
"type": "object"
},
"UserMentionMetadata": {
"description": "Annotation metadata for user mentions (@).",
"id": "UserMentionMetadata",
"properties": {
"type": {
"description": "The type of user mention.",
"enum": [
"TYPE_UNSPECIFIED",
"ADD",
"MENTION"
],
"enumDescriptions": [
"Default value for the enum. Don't use.",
"Add user to space.",
"Mention user in space."
],
"type": "string"
},
"user": {
"$ref": "User",
"description": "The user mentioned."
}
},
"type": "object"
},
"WidgetMarkup": {
"description": "A widget is a UI element that presents text and images.",
"id": "WidgetMarkup",
"properties": {
"buttons": {
"description": "A list of buttons. Buttons is also `oneof data` and only one of these fields should be set.",
"items": {
"$ref": "Button"
},
"type": "array"
},
"image": {
"$ref": "Image",
"description": "Display an image in this widget."
},
"keyValue": {
"$ref": "KeyValue",
"description": "Display a key value item in this widget."
},
"textParagraph": {
"$ref": "TextParagraph",
"description": "Display a text paragraph in this widget."
}
},
"type": "object"
}
},
"servicePath": "",
"title": "Google Chat API",
"version": "v1",
"version_module": true
}