-
Notifications
You must be signed in to change notification settings - Fork 378
Expand file tree
/
Copy pathbase_dto.py
More file actions
159 lines (129 loc) · 4.6 KB
/
Copy pathbase_dto.py
File metadata and controls
159 lines (129 loc) · 4.6 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from pydantic import BaseModel, ConfigDict
from pydantic.alias_generators import to_camel
class MimeTypeEnum(str, Enum):
"""MIME type for the media."""
IMAGE_JPEG = "image/jpeg"
IMAGE_PNG = "image/png"
VIDEO_MP4 = "video/mp4"
AUDIO_WAV = "audio/wav"
class GenerationModelEnum(str, Enum):
"""Enum representing the available generation models."""
# Image-Specific Models
IMAGEN_4_001 = "imagen-4.0-generate-001"
IMAGEN_4_ULTRA = "imagen-4.0-ultra-generate-001"
IMAGEN_4_ULTRA_PREVIEW = "imagen-4.0-ultra-generate-preview-06-06"
IMAGEN_4_FAST = "imagen-4.0-fast-generate-001"
IMAGEN_4_FAST_PREVIEW = "imagen-4.0-fast-generate-preview-06-06"
IMAGEN_3_001 = "imagen-3.0-generate-001"
IMAGEN_3_FAST = "imagen-3.0-fast-generate-001"
IMAGEN_3_002 = "imagen-3.0-generate-002"
IMAGEGEN_006 = "imagegeneration@006"
IMAGEGEN_005 = "imagegeneration@005"
IMAGEGEN_002 = "imagegeneration@002"
GEMINI_2_5_PRO = "gemini-2.5-pro"
GEMINI_2_5_FLASH = "gemini-2.5-flash"
GEMINI_2_5_FLASH_IMAGE_PREVIEW = "gemini-2.5-flash-image-preview"
GEMINI_3_PRO_PREVIEW = "gemini-3-pro-preview"
GEMINI_3_PRO_IMAGE_PREVIEW = "gemini-3-pro-image-preview"
GEMINI_3_FLASH_PREVIEW = "gemini-3-flash-preview"
VTO = "virtual-try-on-preview-08-04"
# Video-Specific Models
VEO_3_1_PREVIEW = "veo-3.1-generate-preview"
VEO_3_FAST = "veo-3.0-fast-generate-001"
VEO_3_QUALITY = "veo-3.0-generate-001"
VEO_3_FAST_PREVIEW = "veo-3.0-fast-generate-preview"
VEO_3_QUALITY_PREVIEW = "veo-3.0-generate-preview"
VEO_2_FAST = "veo-2.0-generate-001"
VEO_2_QUALITY = "veo-2.0-fast-generate-001"
VEO_2_GENERATE_EXP = "veo-2.0-generate-exp"
# Audio-Specific Models
LYRIA_002 = "lyria-002"
CHIRP_3 = "chirp_3"
GEMINI_2_5_FLASH_TTS = "gemini-2.5-flash-tts"
GEMINI_2_5_FLASH_LITE_PREVIEW_TTS = "gemini-2.5-flash-lite-preview-tts"
GEMINI_2_5_PRO_TTS = "gemini-2.5-pro-tts"
class AspectRatioEnum(str, Enum):
"""Enum representing the supported aspect ratios."""
# Common Ratios
RATIO_9_16 = "9:16"
RATIO_16_9 = "16:9"
# Image-Specific Ratios
RATIO_1_1 = "1:1"
RATIO_3_4 = "3:4"
RATIO_4_3 = "4:3"
RATIO_2_3 = "2:3"
RATIO_3_2 = "3:2"
RATIO_4_5 = "4:5"
RATIO_5_4 = "5:4"
RATIO_21_9 = "21:9"
class StyleEnum(str, Enum):
"""Enum representing the supported image styles."""
MODERN = "Modern"
REALISTIC = "Realistic"
VINTAGE = "Vintage"
MONOCHROME = "Monochrome"
FANTASY = "Fantasy"
SKETCH = "Sketch"
PHOTOREALISTIC = "Photorealistic"
CINEMATIC = "Cinematic"
class ColorAndToneEnum(str, Enum):
"""Enum for color and tone styles."""
BLACK_AND_WHITE = "Black & White"
GOLDEN = "Golden"
MONOCHROMATIC = "Monochromatic"
MUTED = "Muted"
PASTEL = "Pastel"
TONED = "Toned"
VIBRANT = "Vibrant"
WARM = "Warm"
COOL = "Cool"
MONOCHROME = "Monochrome"
class LightingEnum(str, Enum):
"""Enum for lighting styles."""
BACKLIGHTING = "Backlighting"
DRAMATIC_LIGHT = "Dramatic Light"
GOLDEN_HOUR = "Golden Hour"
EXPOSURE = "Exposure"
LOW_LIGHTING = "Low Lighting"
MULTIEXPOSURE = "Multiexposure"
STUDIO_LIGHT = "Studio Light"
CINEMATIC = "Cinematic"
STUDIO = "Studio"
NATURAL = "Natural"
DRAMATIC = "Dramatic"
AMBIENT = "Ambient"
class CompositionEnum(str, Enum):
"""Enum for image composition styles."""
CLOSEUP = "Closeup"
KNOLLING = "Knolling"
LANDSCAPE_PHOTOGRAPHY = "Landscape photography"
THROUGH_WINDOW = "Photographed through window"
SHALLOW_DEPTH_OF_FIELD = "Shallow depth of field"
SHOT_FROM_ABOVE = "Shot from above"
SHOT_FROM_BELOW = "Shot from below"
SURFACE_DETAIL = "Surface detail"
WIDE_ANGLE = "Wide angle"
class ReferenceImageTypeEnum(str, Enum):
ASSET = "ASSET"
STYLE = "STYLE"
class BaseDto(BaseModel):
model_config = ConfigDict(
alias_generator=to_camel,
extra="forbid",
populate_by_name=True,
from_attributes=True,
)