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

FieldType / requirementDescription
namestringThe resource name of the user. Format: users/{user}
rolestring (enum)
ROLE_UNSPECIFIED · ADMIN · USER
Required
The role of the user.
usernamestring
Required
Required. The unique username for login.
emailstringOptional. 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.
displayNamestringOptional. The display name of the user.
avatarUrlstringOptional. The avatar URL of the user.
descriptionstringOptional. The description of the user.
passwordstringInput only. The password for the user.
statestring (enum)
STATE_UNSPECIFIED · NORMAL · ARCHIVED
Required
The state of the user.
createTimestring (date-time)Output only. The creation timestamp.
updateTimestring (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"
    }
  }
}