此结构在哪里使用
以下链接根据协议快照中的直接引用生成。认证、可写字段和运行行为应以调用操作为准;可复用资源结构本身并不是完整的写入请求。
被以下组件结构引用:
结构与字段
object
| 字段 | 类型 / 是否必需 | 描述 |
|---|---|---|
name | string | The resource name of the user. Format: users/{user} |
role | string (enum)ROLE_UNSPECIFIED · ADMIN · USER必需 | The role of the user. |
username | string 必需 | Required. The unique username for login. |
email | string | Optional. The email address of the user. Stored trimmed and lowercased; empty means no address. An address belongs to at most one user on the instance, so writes that would reuse one fail with ALREADY_EXISTS. |
displayName | string | Optional. The display name of the user. |
avatarUrl | string | Optional. The avatar URL of the user. |
description | string | Optional. The description of the user. |
password | string | Input only. The password for the user. |
state | string (enum)STATE_UNSPECIFIED · NORMAL · ARCHIVED必需 | The state of the user. |
createTime | string (date-time) | Output only. The creation timestamp. |
updateTime | string (date-time) | Output only. The last update timestamp. |
完整结构
约束与嵌套结构请以这份完整 JSON 定义为准。字段出现在这里,并不意味着每位调用者都能修改它。
{
"required": [
"role",
"username",
"state"
],
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The resource name of the user.\n Format: users/{user}"
},
"role": {
"enum": [
"ROLE_UNSPECIFIED",
"ADMIN",
"USER"
],
"type": "string",
"description": "The role of the user.",
"format": "enum"
},
"username": {
"type": "string",
"description": "Required. The unique username for login."
},
"email": {
"type": "string",
"description": "Optional. The email address of the user. Stored trimmed and lowercased;\n empty means no address. An address belongs to at most one user on the\n instance, so writes that would reuse one fail with ALREADY_EXISTS."
},
"displayName": {
"type": "string",
"description": "Optional. The display name of the user."
},
"avatarUrl": {
"type": "string",
"description": "Optional. The avatar URL of the user."
},
"description": {
"type": "string",
"description": "Optional. The description of the user."
},
"password": {
"writeOnly": true,
"type": "string",
"description": "Input only. The password for the user."
},
"state": {
"enum": [
"STATE_UNSPECIFIED",
"NORMAL",
"ARCHIVED"
],
"type": "string",
"description": "The state of the user.",
"format": "enum"
},
"createTime": {
"readOnly": true,
"type": "string",
"description": "Output only. The creation timestamp.",
"format": "date-time"
},
"updateTime": {
"readOnly": true,
"type": "string",
"description": "Output only. The last update timestamp.",
"format": "date-time"
}
}
}