DocumentationAPI reference
Rust · 0.1.0
User
Application protocol schema. Field names and inherited descriptions are kept in their original language.
Where this schema is used
These links are derived from direct references in the protocol snapshot. Follow the calling operation for authentication, accepted fields and runtime behavior; a reusable resource schema is not by itself a complete write request.
Referenced by these component schemas:
Shape and fields
object
| Field | Type / requirement | Description |
|---|---|---|
name | string | The resource name of the user. Format: users/{user} |
role | string (enum)ROLE_UNSPECIFIED · ADMIN · USERRequired | The role of the user. |
username | string Required | 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 · ARCHIVEDRequired | The state of the user. |
createTime | string (date-time) | Output only. The creation timestamp. |
updateTime | string (date-time) | Output only. The last update timestamp. |
Complete schema
Use this complete JSON definition for constraints and nested structure. A field's presence here does not mean it is writable by every caller.
{
"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"
}
}
}