77
88__all__ = [
99 "BrandRetrieveSimplifiedResponse" ,
10- "CacheMetadata" ,
1110 "Brand" ,
1211 "BrandBackdrop" ,
1312 "BrandBackdropColor" ,
1615 "BrandLogo" ,
1716 "BrandLogoColor" ,
1817 "BrandLogoResolution" ,
18+ "CacheMetadata" ,
1919 "KeyMetadata" ,
2020]
2121
2222
23- class CacheMetadata (BaseModel ):
24- """Cache outcome for this response.
25-
26- Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.
27- """
28-
29- age_ms : int
30- """Age of the cached data in milliseconds. Zero for miss and zdr responses."""
31-
32- status : Literal ["hit" , "miss" , "zdr" ]
33- """
34- Whether the response was served from cache, required fresh work, or honored
35- zero-data-retention cache bypass.
36- """
37-
38-
3923class BrandBackdropColor (BaseModel ):
4024 hex : Optional [str ] = None
4125 """Color in hexadecimal format"""
@@ -144,6 +128,22 @@ class Brand(BaseModel):
144128 """The title or name of the brand"""
145129
146130
131+ class CacheMetadata (BaseModel ):
132+ """Cache outcome for this response.
133+
134+ Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.
135+ """
136+
137+ age_ms : int
138+ """Age of the cached data in milliseconds. Zero for miss and zdr responses."""
139+
140+ status : Literal ["hit" , "miss" , "zdr" ]
141+ """
142+ Whether the response was served from cache, required fresh work, or honored
143+ zero-data-retention cache bypass.
144+ """
145+
146+
147147class KeyMetadata (BaseModel ):
148148 """Credit usage, included whenever a valid API key is provided."""
149149
@@ -155,24 +155,27 @@ class KeyMetadata(BaseModel):
155155
156156
157157class BrandRetrieveSimplifiedResponse (BaseModel ):
158+ brand : Brand
159+ """Simplified brand information"""
160+
158161 cache_metadata : CacheMetadata
159162 """Cache outcome for this response.
160163
161164 Composite responses are hits only when every cache-controlled fetch contributing
162165 to the output was a hit; age_ms is the oldest contributing hit.
163166 """
164167
168+ code : int
169+ """HTTP status code of the response"""
170+
165171 request_id : str
166172 """Unique id of this API call, also sent in the X-Request-Id response header.
167173
168174 Quote it when contacting support about a failed request.
169175 """
170176
171- brand : Optional [Brand ] = None
172- """Simplified brand information"""
173-
174- code : Optional [int ] = None
175- """HTTP status code of the response"""
177+ status : str
178+ """Status of the response, e.g., 'ok'"""
176179
177180 key_metadata : Optional [KeyMetadata ] = None
178181 """Credit usage, included whenever a valid API key is provided."""
@@ -182,6 +185,3 @@ class BrandRetrieveSimplifiedResponse(BaseModel):
182185 True when the timeout ended processing and only completed brand data is
183186 returned.
184187 """
185-
186- status : Optional [str ] = None
187- """Status of the response, e.g., 'ok'"""
0 commit comments