-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathtenant.py
More file actions
73 lines (49 loc) · 2.28 KB
/
tenant.py
File metadata and controls
73 lines (49 loc) · 2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import TYPE_CHECKING, Dict, Optional
from pydantic import Field as FieldInfo
from .._models import BaseModel
from .recipients.preference_set import PreferenceSet
__all__ = ["Tenant", "Settings", "SettingsBranding"]
class SettingsBranding(BaseModel):
"""The branding for the tenant."""
icon_url: Optional[str] = None
"""The icon URL for the tenant.
Must point to a valid image with an image MIME type.
"""
logo_url: Optional[str] = None
"""The logo URL for the tenant.
Must point to a valid image with an image MIME type.
"""
primary_color: Optional[str] = None
"""The primary color for the tenant, provided as a hex value."""
primary_color_contrast: Optional[str] = None
"""The primary color contrast for the tenant, provided as a hex value."""
class Settings(BaseModel):
"""The settings for the tenant. Includes branding and preference set."""
branding: Optional[SettingsBranding] = None
"""The branding for the tenant."""
preference_set: Optional[PreferenceSet] = None
"""
A preference set represents a specific set of notification preferences for a
recipient. A recipient can have multiple preference sets.
"""
class Tenant(BaseModel):
"""A tenant entity."""
id: str
"""The unique identifier for the tenant."""
api_typename: str = FieldInfo(alias="__typename")
"""The typename of the schema."""
name: Optional[str] = None
"""An optional name for the tenant."""
settings: Optional[Settings] = None
"""The settings for the tenant. Includes branding and preference set."""
if TYPE_CHECKING:
# Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a
# value to this field, so for compatibility we avoid doing it at runtime.
__pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride]
# Stub to indicate that arbitrary properties are accepted.
# To access properties that are not valid identifiers you can use `getattr`, e.g.
# `getattr(obj, '$type')`
def __getattr__(self, attr: str) -> object: ...
else:
__pydantic_extra__: Dict[str, object]