models.py•2.33 kB
# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T10:59:52+00:00
from __future__ import annotations
from enum import Enum
from typing import Optional
from pydantic import AnyUrl, BaseModel, Field, constr
class UserEnumStateType(Enum):
active = 'active'
deactivated = 'deactivated'
class V1UsersSidPostRequest(BaseModel):
Avatar: Optional[str] = Field(
None, description='The avatar URL which will be shown in Frontline application.'
)
FriendlyName: Optional[str] = Field(
None, description='The string that you assigned to describe the User.'
)
IsAvailable: Optional[bool] = Field(
None,
description='Whether the User is available for new conversations. Set to `false` to prevent User from receiving new inbound conversations if you are using [Pool Routing](https://www.twilio.com/docs/frontline/handle-incoming-conversations#3-pool-routing).',
)
State: Optional[UserEnumStateType] = Field(
None,
description='Current state of this user. Can be either `active` or `deactivated`.',
)
class FrontlineV1User(BaseModel):
avatar: Optional[str] = Field(
None, description='The avatar URL which will be shown in Frontline application.'
)
friendly_name: Optional[str] = Field(
None, description='The string that you assigned to describe the User.'
)
identity: Optional[str] = Field(
None,
description="The application-defined string that uniquely identifies the resource's User. This value is often a username or an email address, and is case-sensitive.",
)
is_available: Optional[bool] = Field(
None,
description='Whether the User is available for new conversations. Defaults to `false` for new users.',
)
sid: Optional[
constr(pattern=r'^US[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None,
description='The unique string that we created to identify the User resource.',
)
state: Optional[UserEnumStateType] = Field(
None,
description='Current state of this user. Can be either `active` or `deactivated` and defaults to `active`',
)
url: Optional[AnyUrl] = Field(
None, description='An absolute API resource URL for this user.'
)