main
py 36 lines 917 Bytes
Raw
1 from pydantic import BaseModel
2 from pydantic import Field
3
4
5 class UserOrganizationAddRequest(BaseModel):
6 """
7 Request model for adding a user to an organization in Grafana.
8 """
9
10 loginorEmail: str = Field(
11 ...,
12 description="Login or email of the user to be added.",
13 )
14 role: str = Field(
15 "Viewer",
16 description="Role to assign to the user in the organization.",
17 )
18 organizationId: str = Field(
19 ...,
20 description="ID of the organization to which the user will be added.",
21 )
22
23
24 class UserOrganizationAddResponse(BaseModel):
25 """
26 Response model for adding a user to an organization in Grafana.
27 """
28
29 success: bool = Field(
30 ...,
31 description="Indicates whether the operation was successful.",
32 )
33 message: str = Field(
34 ...,
35 description="Message describing the result of the operation.",
36 )