29 lines
790 B
Python
29 lines
790 B
Python
|
|
from enum import Enum
|
||
|
|
from typing import Any
|
||
|
|
|
||
|
|
from pydantic import BaseModel, Field, HttpUrl
|
||
|
|
|
||
|
|
|
||
|
|
class AnalysisType(str, Enum):
|
||
|
|
AUDIO_CLASSIFICATION = "AUDIO_CLASSIFICATION"
|
||
|
|
VIDEO_ANALYSIS = "VIDEO_ANALYSIS"
|
||
|
|
|
||
|
|
|
||
|
|
class AnalysisRequest(BaseModel):
|
||
|
|
requestId: str = Field(min_length=1, max_length=200)
|
||
|
|
analysisType: AnalysisType
|
||
|
|
profileCode: str = Field(min_length=1, max_length=200)
|
||
|
|
mediaUrl: HttpUrl
|
||
|
|
options: dict[str, Any] = Field(default_factory=dict)
|
||
|
|
context: dict[str, Any] = Field(default_factory=dict)
|
||
|
|
|
||
|
|
|
||
|
|
class AnalysisResponse(BaseModel):
|
||
|
|
requestId: str
|
||
|
|
analysisType: AnalysisType
|
||
|
|
profileCode: str
|
||
|
|
status: str
|
||
|
|
result: dict[str, Any] = Field(default_factory=dict)
|
||
|
|
model: dict[str, Any] = Field(default_factory=dict)
|
||
|
|
timingMs: int
|