1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.chat.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21 22option csharp_namespace = "Google.Apps.Chat.V1"; 23option go_package = "cloud.google.com/go/chat/apiv1/chatpb;chatpb"; 24option java_multiple_files = true; 25option java_outer_classname = "UserProto"; 26option java_package = "com.google.chat.v1"; 27option php_namespace = "Google\\Apps\\Chat\\V1"; 28option ruby_package = "Google::Apps::Chat::V1"; 29 30// A user in Google Chat. 31// When returned as an output from a request, if your Chat app [authenticates as 32// a 33// user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), 34// the output for a `User` resource only populates the user's `name` and `type`. 35message User { 36 enum Type { 37 // Default value for the enum. DO NOT USE. 38 TYPE_UNSPECIFIED = 0; 39 40 // Human user. 41 HUMAN = 1; 42 43 // Chat app user. 44 BOT = 2; 45 } 46 47 // Resource name for a Google Chat [user][google.chat.v1.User]. 48 // 49 // Format: `users/{user}`. `users/app` can be used as an alias for the calling 50 // app [bot][google.chat.v1.User.Type.BOT] user. 51 // 52 // For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same 53 // user identifier as: 54 // 55 // - the `id` for the 56 // [Person](https://developers.google.com/people/api/rest/v1/people) in the 57 // People API. For example, `users/123456789` in Chat API represents the same 58 // person as the `123456789` Person profile ID in People API. 59 // 60 // - the `id` for a 61 // [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) 62 // in the Admin SDK Directory API. 63 // 64 // - the user's email address can be used as an alias for `{user}` in API 65 // requests. For example, if the People API Person profile ID for 66 // `[email protected]` is `123456789`, you can use `users/user@example.com` as 67 // an alias to reference `users/123456789`. Only the canonical resource name 68 // (for example `users/123456789`) will be returned from the API. 69 string name = 1; 70 71 // Output only. The user's display name. 72 string display_name = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 73 74 // Unique identifier of the user's Google Workspace domain. 75 string domain_id = 6; 76 77 // User type. 78 Type type = 5; 79 80 // Output only. When `true`, the user is deleted or their profile is not 81 // visible. 82 bool is_anonymous = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; 83} 84