File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -176,16 +176,22 @@ class ExternalStream(Base):
176
176
class StreamSource (Base ):
177
177
name : str
178
178
opt_start_seq : Optional [int ] = None
179
- # FIXME: Handle time type, omit for now.
180
- # opt_start_time: Optional[str] = None
179
+ opt_start_time : Optional [datetime .datetime ] = None
181
180
filter_subject : Optional [str ] = None
182
181
external : Optional [ExternalStream ] = None
183
182
184
183
@classmethod
185
184
def from_response (cls , resp : Dict [str , Any ]):
186
185
cls ._convert (resp , 'external' , ExternalStream )
186
+ cls ._convert_rfc3339 (resp , 'opt_start_time' )
187
187
return super ().from_response (resp )
188
188
189
+ def as_dict (self ) -> Dict [str , object ]:
190
+ result = super ().as_dict ()
191
+ if self .opt_start_time is not None :
192
+ result ['opt_start_time' ] = self ._to_rfc3339 (self .opt_start_time )
193
+ return result
194
+
189
195
190
196
@dataclass
191
197
class StreamSourceInfo (Base ):
You can’t perform that action at this time.
0 commit comments