aioimmich.users.models API documentation
Description: aioimmich server models.

# Module `aioimmich.users.models`

aioimmich server models.

## Classes

`class AvatarColor (*args, **kwds)`
  Expand source code

      class AvatarColor(StrEnum):
          """Avatar colors."""

          AMBER = "amber"
          BLUE = "blue"
          GRAY = "gray"
          GREEN = "green"
          ORANGE = "orange"
          PINK = "pink"
          PRIMARY = "primary"
          PURPEL = "purple"
          RED = "red"
          YELLOW = "yellow"

  Avatar colors.

  ### Ancestors

  - enum.StrEnum
  - builtins.str
  - enum.ReprEnum
  - enum.Enum

  ### Class variables

  `var AMBER`
  `var BLUE`
  `var GRAY`
  `var GREEN`
  `var ORANGE`
  `var PINK`
  `var PRIMARY`
  `var PURPEL`
  `var RED`
  `var YELLOW`
`class ImmichUser (avatar_color: AvatarColor,
email: str,
name: str,
profile_changed_at: datetime,
profile_image_path: str,
user_id: str)`
  Expand source code

      @dataclass
      class ImmichUser(DataClassJSONMixin):
          """Representation of an immich user."""

          avatar_color: AvatarColor = field(metadata=field_options(alias="avatarColor"))
          email: str
          name: str
          profile_changed_at: datetime = field(
              metadata=field_options(alias="profileChangedAt")
          )
          profile_image_path: str = field(metadata=field_options(alias="profileImagePath"))
          user_id: str = field(metadata=field_options(alias="id"))

  Representation of an immich user.

  ### Ancestors

  - mashumaro.mixins.json.DataClassJSONMixin
  - mashumaro.mixins.dict.DataClassDictMixin

  ### Subclasses

  - ImmichUserObject

  ### Static methods

  `def from_dict(d, *, dialect=None)`

  ### Instance variables

  `var avatar_color : AvatarColor`
  `var email : str`
  `var name : str`
  `var profile_changed_at : datetime.datetime`
  `var profile_image_path : str`
  `var user_id : str`

  ### Methods

  `def to_dict(self)`
`class ImmichUserObject (avatar_color: AvatarColor,
email: str,
name: str,
profile_changed_at: datetime,
profile_image_path: str,
user_id: str,
created_at: datetime,
is_admin: bool,
oauth_id: str,
should_change_password: bool,
status: UserStatus,
storage_label: str,
deleted_at: datetime | None,
quota_size_in_bytes: int | None,
quota_usage_in_bytes: int | None,
updated_at: datetime | None)`
  Expand source code

      @dataclass
      class ImmichUserObject(ImmichUser):
          """Representation of an immich user configuration object."""

          # non-default parameters
          created_at: datetime = field(metadata=field_options(alias="createdAt"))
          is_admin: bool = field(metadata=field_options(alias="isAdmin"))
          oauth_id: str = field(metadata=field_options(alias="oauthId"))
          should_change_password: bool = field(
              metadata=field_options(alias="shouldChangePassword")
          )
          status: UserStatus
          storage_label: str = field(metadata=field_options(alias="storageLabel"))

          # default parameters
          deleted_at: datetime | None = field(metadata=field_options(alias="deletedAt"))
          quota_size_in_bytes: int | None = field(
              metadata=field_options(alias="quotaSizeInBytes")
          )
          quota_usage_in_bytes: int | None = field(
              metadata=field_options(alias="quotaUsageInBytes")
          )
          updated_at: datetime | None = field(metadata=field_options(alias="updatedAt"))

  Representation of an immich user configuration object.

  ### Ancestors

  - ImmichUser
  - mashumaro.mixins.json.DataClassJSONMixin
  - mashumaro.mixins.dict.DataClassDictMixin

  ### Static methods

  `def from_dict(d, *, dialect=None)`

  ### Instance variables

  `var created_at : datetime.datetime`
  `var deleted_at : datetime.datetime | None`
  `var is_admin : bool`
  `var oauth_id : str`
  `var quota_size_in_bytes : int | None`
  `var quota_usage_in_bytes : int | None`
  `var should_change_password : bool`
  `var status : UserStatus`
  `var storage_label : str`
  `var updated_at : datetime.datetime | None`

  ### Methods

  `def to_dict(self)`
`class UserStatus (*args, **kwds)`
  Expand source code

      class UserStatus(StrEnum):
          """User status."""

          ACTIVE = "active"
          DELETED = "deleted"
          REMOVING = "removing"

  User status.

  ### Ancestors

  - enum.StrEnum
  - builtins.str
  - enum.ReprEnum
  - enum.Enum

  ### Class variables

  `var ACTIVE`
  `var DELETED`
  `var REMOVING`