Module python_odpt.models
Contains all the data models used in inputs/outputs
Sub-modules
python_odpt.models.airportpython_odpt.models.airport_terminalpython_odpt.models.airport_terminal_typepython_odpt.models.airport_terminal_ugregionpython_odpt.models.airport_typepython_odpt.models.airport_ugregionpython_odpt.models.buspython_odpt.models.bus_door_statuspython_odpt.models.bus_timetablepython_odpt.models.bus_timetable_objectpython_odpt.models.bus_timetable_typepython_odpt.models.bus_typepython_odpt.models.busroute_patternpython_odpt.models.busroute_pattern_farepython_odpt.models.busroute_pattern_fare_typepython_odpt.models.busroute_pattern_typepython_odpt.models.busroute_pattern_ugregionpython_odpt.models.bussstop_pole_orderpython_odpt.models.busstop_polepython_odpt.models.busstop_pole_timetablepython_odpt.models.busstop_pole_timetable_objectpython_odpt.models.busstop_pole_timetable_typepython_odpt.models.busstop_pole_typepython_odpt.models.calendarpython_odpt.models.calendar_typepython_odpt.models.dump_rdf_typepython_odpt.models.flight_information_arrivalpython_odpt.models.flight_information_arrival_typepython_odpt.models.flight_information_departurepython_odpt.models.flight_information_departure_typepython_odpt.models.flight_schedulepython_odpt.models.flight_schedule_objectpython_odpt.models.flight_schedule_typepython_odpt.models.flight_statuspython_odpt.models.flight_status_typepython_odpt.models.multilingual_titlepython_odpt.models.occupancy_statuspython_odpt.models.opening_doorpython_odpt.models.operatorpython_odpt.models.operator_typepython_odpt.models.passenger_surveypython_odpt.models.passenger_survey_objectpython_odpt.models.passenger_survey_typepython_odpt.models.place_rdf_typepython_odpt.models.place_search_responsepython_odpt.models.rail_directionpython_odpt.models.rail_direction_typepython_odpt.models.railwaypython_odpt.models.railway_farepython_odpt.models.railway_fare_typepython_odpt.models.railway_typepython_odpt.models.railway_ugregionpython_odpt.models.stationpython_odpt.models.station_orderpython_odpt.models.station_timetablepython_odpt.models.station_timetable_objectpython_odpt.models.station_timetable_typepython_odpt.models.station_typepython_odpt.models.station_ugregionpython_odpt.models.train_informationpython_odpt.models.train_information_typepython_odpt.models.train_timetablepython_odpt.models.train_timetable_objectpython_odpt.models.train_timetable_typepython_odpt.models.train_typepython_odpt.models.train_type_type
Classes
class Airport (context: str,
id: str,
type: AirportType,
owlsame_as: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptairport_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptairport_terminal: Unset | List[str] = <python_odpt.types.Unset object>,
geolong: Unset | float = <python_odpt.types.Unset object>,
geolat: Unset | float = <python_odpt.types.Unset object>,
ugregion: Unset | ForwardRef('AirportUgregion') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties空港の情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:AirportType- クラス名
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- 空港名(日本語)
odptairport_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptairport_terminal:Union[Unset, List[str]]- 空港のターミナルを表す ID のリスト
geolong:Union[Unset, float]- 代表点の経度
geolat:Union[Unset, float]- 代表点の緯度
ugregion:Union[Unset, AirportUgregion]- GeoJSON形式による地物情報
Method generated by attrs for class Airport.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolat-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolong-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairport_terminal-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairport_title-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ugregion-
Expand source code
@_attrs_define class Airport: """空港の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港名(日本語) odptairport_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptairport_terminal (Union[Unset, List[str]]): 空港のターミナルを表す ID のリスト geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_title: Union[Unset, "MultilingualTitle"] = UNSET odptairport_terminal: Union[Unset, List[str]] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_ugregion import AirportUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_title = d.pop("odpt:airportTitle", UNSET) odptairport_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_title, Unset) or _odptairport_title is None: odptairport_title = UNSET else: odptairport_title = MultilingualTitle.from_dict(_odptairport_title) odptairport_terminal = cast(List[str], d.pop("odpt:airportTerminal", UNSET)) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportUgregion.from_dict(_ugregion) airport = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptairport_title=odptairport_title, odptairport_terminal=odptairport_terminal, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport.additional_properties = d return airport @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptairport_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_title, Unset): odptairport_title = self.odptairport_title.to_dict() odptairport_terminal: Union[Unset, List[str]] = UNSET if not isinstance(self.odptairport_terminal, Unset): odptairport_terminal = self.odptairport_terminal geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_title is not UNSET: field_dict["odpt:airportTitle"] = odptairport_title if odptairport_terminal is not UNSET: field_dict["odpt:airportTerminal"] = odptairport_terminal if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict
class AirportTerminal (context: str,
id: str,
type: AirportTerminalType,
owlsame_as: str,
odptairport: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptairport_terminal_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
geolong: Unset | float = <python_odpt.types.Unset object>,
geolat: Unset | float = <python_odpt.types.Unset object>,
ugregion: Unset | ForwardRef('AirportTerminalUgregion') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties空港のターミナルの情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:AirportTerminalType- クラス名
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptairport:str- 空港を示すID
dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- 空港ターミナル名(日本語)
odptairport_terminal_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
geolong:Union[Unset, float]- 代表点の経度
geolat:Union[Unset, float]- 代表点の緯度
ugregion:Union[Unset, AirportTerminalUgregion]- GeoJSON形式による地物情報
Method generated by attrs for class AirportTerminal.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolat-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolong-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairport-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairport_terminal_title-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ugregion-
Expand source code
@_attrs_define class AirportTerminal: """空港のターミナルの情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (AirportTerminalType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptairport (str): 空港を示すID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 空港ターミナル名(日本語) odptairport_terminal_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 代表点の経度 geolat (Union[Unset, float]): 代表点の緯度 ugregion (Union[Unset, AirportTerminalUgregion]): GeoJSON形式による地物情報 """ context: str id: str type: AirportTerminalType owlsame_as: str odptairport: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptairport_terminal_title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "AirportTerminalUgregion"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.airport_terminal_ugregion import AirportTerminalUgregion from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = AirportTerminalType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptairport = d.pop("odpt:airport") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptairport_terminal_title = d.pop("odpt:airportTerminalTitle", UNSET) odptairport_terminal_title: Union[Unset, MultilingualTitle] if isinstance(_odptairport_terminal_title, Unset) or _odptairport_terminal_title is None: odptairport_terminal_title = UNSET else: odptairport_terminal_title = MultilingualTitle.from_dict(_odptairport_terminal_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, AirportTerminalUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = AirportTerminalUgregion.from_dict(_ugregion) airport_terminal = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptairport=odptairport, dcdate=dcdate, dctitle=dctitle, odptairport_terminal_title=odptairport_terminal_title, geolong=geolong, geolat=geolat, ugregion=ugregion, ) airport_terminal.additional_properties = d return airport_terminal @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptairport = self.odptairport dcdate = self.dcdate dctitle = self.dctitle odptairport_terminal_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptairport_terminal_title, Unset): odptairport_terminal_title = self.odptairport_terminal_title.to_dict() geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:airport": odptairport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptairport_terminal_title is not UNSET: field_dict["odpt:airportTerminalTitle"] = odptairport_terminal_title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion return field_dict
class AirportTerminalType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class AirportTerminalType(str, Enum): ODPTAIRPORTTERMINAL = "odpt:AirportTerminal" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTAIRPORTTERMINAL
class AirportTerminalUgregion-
Expand source code
@_attrs_define class AirportTerminalUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() airport_terminal_ugregion = cls() airport_terminal_ugregion.additional_properties = d return airport_terminal_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesGeoJSON形式による地物情報
Method generated by attrs for class AirportTerminalUgregion.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class AirportTerminalUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() airport_terminal_ugregion = cls() airport_terminal_ugregion.additional_properties = d return airport_terminal_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict
class AirportType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class AirportType(str, Enum): ODPTAIRPORT = "odpt:Airport" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTAIRPORT
class AirportUgregion-
Expand source code
@_attrs_define class AirportUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() airport_ugregion = cls() airport_ugregion.additional_properties = d return airport_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesGeoJSON形式による地物情報
Method generated by attrs for class AirportUgregion.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class AirportUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() airport_ugregion = cls() airport_ugregion.additional_properties = d return airport_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict
class Bus (context: str,
id: str,
type: BusType,
owlsame_as: str,
odptbus_number: str,
dcdate: str,
dctvalid: str,
odptfrequency: int,
odptbusroute_pattern: str,
odptoperator: str,
odptbus_timetable: Unset | str = <python_odpt.types.Unset object>,
odptstarting_busstop_pole: Unset | str = <python_odpt.types.Unset object>,
odptterminal_busstop_pole: Unset | str = <python_odpt.types.Unset object>,
odptfrom_busstop_pole: Unset | str = <python_odpt.types.Unset object>,
odptfrom_busstop_pole_time: Unset | str = <python_odpt.types.Unset object>,
odptto_busstop_pole: Unset | str = <python_odpt.types.Unset object>,
odptprogress: Unset | float = <python_odpt.types.Unset object>,
geolong: Unset | float = <python_odpt.types.Unset object>,
geolat: Unset | float = <python_odpt.types.Unset object>,
odptspeed: Unset | float = <python_odpt.types.Unset object>,
odptazimuth: Unset | float = <python_odpt.types.Unset object>,
odptdoor_status: Unset | BusDoorStatus = <python_odpt.types.Unset object>,
odptoccupancy_status: Unset | OccupancyStatus = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバスの運行情報
odpt:busroutePatternが運行中の系統を示し、odpt:fromBusstopPole,odpt:toBusstopPoleで現在位置を示す。 接近中の判別がつかない場合は、odpt:fromBusstopPoleは null とはならない場合がある。 停車中の判別がつかない場合は、odpt:toBusstopPoleは null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: <http://vocab.odpt.org/context_odpt_Bus.jsonld.> id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]):Method generated by attrs for class Bus.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolat : Unset | float-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolong : Unset | float-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptazimuth : Unset | float-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbus_number : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbus_timetable : Unset | str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute_pattern : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdoor_status : Unset | BusDoorStatus-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrequency : int-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrom_busstop_pole : Unset | str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrom_busstop_pole_time : Unset | str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoccupancy_status : Unset | OccupancyStatus-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptprogress : Unset | float-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptspeed : Unset | float-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstarting_busstop_pole : Unset | str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptterminal_busstop_pole : Unset | str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptto_busstop_pole : Unset | str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as : str-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type : BusType-
Expand source code
@_attrs_define class Bus: """バスの運行情報 `odpt:busroutePattern` が運行中の系統を示し、 `odpt:fromBusstopPole`, `odpt:toBusstopPole` で現在位置を示す。 接近中の判別がつかない場合は、`odpt:fromBusstopPole` は null とはならない場合がある。 停車中の判別がつかない場合は、`odpt:toBusstopPole` は null とはならない場合がある。 odpt:occupancyStatus は車両の混雑度を示す。 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Bus.jsonld. id (str): 固有識別子 type (BusType): バス運行情報のクラス名 Example: odpt:Bus. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_number (str): バス車両番号 Example: 1889. dcdate (str): ISO8601 日付時刻形式 dctvalid (str): ISO8601 日付時刻形式 odptfrequency (int): 更新頻度(秒)、指定された秒数以降にリクエストを行うことで、最新値が取得される。 Example: 30. odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstarting_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptterminal_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_time (Union[Unset, str]): ISO8601 日付時刻形式 odptto_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptprogress (Union[Unset, float]): Fromを0, Toを1とした際の現在位置 (割合) geolong (Union[Unset, float]): 対象となるバスの経度 (10進表記、測地系はWGS84) Example: 139.63494873046875. geolat (Union[Unset, float]): 対象となるバスの緯度 (10進表記、測地系はWGS84) Example: 35.41614532470703. odptspeed (Union[Unset, float]): 対象となるバスの速度 (km/h) odptazimuth (Union[Unset, float]): 対象となるバスの進行方向方位角を示す。単位は度(°)。北が0度で、時計回り(東回り)に増加する。 Example: 249.9993896484375. odptdoor_status (Union[Unset, BusDoorStatus]): odptoccupancy_status (Union[Unset, OccupancyStatus]): """ context: str id: str type: BusType owlsame_as: str odptbus_number: str dcdate: str dctvalid: str odptfrequency: int odptbusroute_pattern: str odptoperator: str odptbus_timetable: Union[Unset, str] = UNSET odptstarting_busstop_pole: Union[Unset, str] = UNSET odptterminal_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole: Union[Unset, str] = UNSET odptfrom_busstop_pole_time: Union[Unset, str] = UNSET odptto_busstop_pole: Union[Unset, str] = UNSET odptprogress: Union[Unset, float] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptspeed: Union[Unset, float] = UNSET odptazimuth: Union[Unset, float] = UNSET odptdoor_status: Union[Unset, BusDoorStatus] = UNSET odptoccupancy_status: Union[Unset, OccupancyStatus] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptbus_number = d.pop("odpt:busNumber") dcdate = d.pop("dc:date") dctvalid = d.pop("dct:valid") odptfrequency = d.pop("odpt:frequency") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptoperator = d.pop("odpt:operator") odptbus_timetable = d.pop("odpt:busTimetable", UNSET) odptstarting_busstop_pole = d.pop("odpt:startingBusstopPole", UNSET) odptterminal_busstop_pole = d.pop("odpt:terminalBusstopPole", UNSET) odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole", UNSET) odptfrom_busstop_pole_time = d.pop("odpt:fromBusstopPoleTime", UNSET) odptto_busstop_pole = d.pop("odpt:toBusstopPole", UNSET) odptprogress = d.pop("odpt:progress", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptspeed = d.pop("odpt:speed", UNSET) odptazimuth = d.pop("odpt:azimuth", UNSET) _odptdoor_status = d.pop("odpt:doorStatus", UNSET) odptdoor_status: Union[Unset, BusDoorStatus] if isinstance(_odptdoor_status, Unset) or _odptdoor_status is None: odptdoor_status = UNSET else: odptdoor_status = BusDoorStatus(_odptdoor_status) _odptoccupancy_status = d.pop("odpt:occupancyStatus", UNSET) odptoccupancy_status: Union[Unset, OccupancyStatus] if isinstance(_odptoccupancy_status, Unset) or _odptoccupancy_status is None: odptoccupancy_status = UNSET else: odptoccupancy_status = OccupancyStatus(_odptoccupancy_status) bus = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptbus_number=odptbus_number, dcdate=dcdate, dctvalid=dctvalid, odptfrequency=odptfrequency, odptbusroute_pattern=odptbusroute_pattern, odptoperator=odptoperator, odptbus_timetable=odptbus_timetable, odptstarting_busstop_pole=odptstarting_busstop_pole, odptterminal_busstop_pole=odptterminal_busstop_pole, odptfrom_busstop_pole=odptfrom_busstop_pole, odptfrom_busstop_pole_time=odptfrom_busstop_pole_time, odptto_busstop_pole=odptto_busstop_pole, odptprogress=odptprogress, geolong=geolong, geolat=geolat, odptspeed=odptspeed, odptazimuth=odptazimuth, odptdoor_status=odptdoor_status, odptoccupancy_status=odptoccupancy_status, ) bus.additional_properties = d return bus @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptbus_number = self.odptbus_number dcdate = self.dcdate dctvalid = self.dctvalid odptfrequency = self.odptfrequency odptbusroute_pattern = self.odptbusroute_pattern odptoperator = self.odptoperator odptbus_timetable = self.odptbus_timetable odptstarting_busstop_pole = self.odptstarting_busstop_pole odptterminal_busstop_pole = self.odptterminal_busstop_pole odptfrom_busstop_pole = self.odptfrom_busstop_pole odptfrom_busstop_pole_time = self.odptfrom_busstop_pole_time odptto_busstop_pole = self.odptto_busstop_pole odptprogress = self.odptprogress geolong = self.geolong geolat = self.geolat odptspeed = self.odptspeed odptazimuth = self.odptazimuth odptdoor_status: Union[Unset, str] = UNSET if not isinstance(self.odptdoor_status, Unset): odptdoor_status = self.odptdoor_status.value odptoccupancy_status: Union[Unset, str] = UNSET if not isinstance(self.odptoccupancy_status, Unset): odptoccupancy_status = self.odptoccupancy_status.value field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:busNumber": odptbus_number, "dc:date": dcdate, "dct:valid": dctvalid, "odpt:frequency": odptfrequency, "odpt:busroutePattern": odptbusroute_pattern, "odpt:operator": odptoperator, } ) if odptbus_timetable is not UNSET: field_dict["odpt:busTimetable"] = odptbus_timetable if odptstarting_busstop_pole is not UNSET: field_dict["odpt:startingBusstopPole"] = odptstarting_busstop_pole if odptterminal_busstop_pole is not UNSET: field_dict["odpt:terminalBusstopPole"] = odptterminal_busstop_pole if odptfrom_busstop_pole is not UNSET: field_dict["odpt:fromBusstopPole"] = odptfrom_busstop_pole if odptfrom_busstop_pole_time is not UNSET: field_dict["odpt:fromBusstopPoleTime"] = odptfrom_busstop_pole_time if odptto_busstop_pole is not UNSET: field_dict["odpt:toBusstopPole"] = odptto_busstop_pole if odptprogress is not UNSET: field_dict["odpt:progress"] = odptprogress if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptspeed is not UNSET: field_dict["odpt:speed"] = odptspeed if odptazimuth is not UNSET: field_dict["odpt:azimuth"] = odptazimuth if odptdoor_status is not UNSET: field_dict["odpt:doorStatus"] = odptdoor_status if odptoccupancy_status is not UNSET: field_dict["odpt:occupancyStatus"] = odptoccupancy_status return field_dict
class BusDoorStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusDoorStatus(str, Enum): CLOSE = "close" OPEN = "open" SELF = "self" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var CLOSEvar OPENvar SELF
class BusTimetable (context: str,
id: str,
type: BusTimetableType,
owlsame_as: str,
odptoperator: str,
odptbusroute_pattern: str,
odptcalendar: str,
odptbus_timetable_object: List[ForwardRef('BusTimetableObject')],
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctissued: Unset | str = <python_odpt.types.Unset object>,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptkana: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバスの便の時刻表
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld.
id:str- 固有識別子
type:BusTimetableType- バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptbusroute_pattern:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptcalendar:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 - odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3',
- 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime':
- '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3',
- 'odpt:departureTime': '12:36'}].
dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctissued:Union[Unset, str]- ISO8601 日付形式
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- バス路線名称(系統名等) Example: 境91.
odptkana:Union[Unset, str]- バス路線名称のよみがな Example: さかいきゅうじゅういち.
Method generated by attrs for class BusTimetable.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctissued-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbus_timetable_object-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute_pattern-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcalendar-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptkana-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class BusTimetable: """バスの便の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusTimetable.jsonld. id (str): 固有識別子 type (BusTimetableType): バス時刻表のクラス名、"odpt:BusTimetable"が入る Example: odpt:BusTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_timetable_object (List['BusTimetableObject']): バス時刻表時分情報 Example: [{'odpt:note': '武蔵境駅南口:10140:3', 'odpt:index': 0, 'odpt:canGetOn': True, 'odpt:canGetOff': False, 'odpt:isMidnight': False, 'odpt:arrivalTime': '12:36', 'odpt:busstopPole': 'odpt.BusstopPole:OdakyuBus.Musashisakaiekiminamiguchi.10140.3', 'odpt:departureTime': '12:36'}]. dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 境91. odptkana (Union[Unset, str]): バス路線名称のよみがな Example: さかいきゅうじゅういち. """ context: str id: str type: BusTimetableType owlsame_as: str odptoperator: str odptbusroute_pattern: str odptcalendar: str odptbus_timetable_object: List["BusTimetableObject"] dcdate: Union[Unset, str] = UNSET dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.bus_timetable_object import BusTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptbusroute_pattern = d.pop("odpt:busroutePattern") odptcalendar = d.pop("odpt:calendar") odptbus_timetable_object = [] _odptbus_timetable_object = d.pop("odpt:busTimetableObject") for odptbus_timetable_object_item_data in _odptbus_timetable_object: odptbus_timetable_object_item = BusTimetableObject.from_dict(odptbus_timetable_object_item_data) odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = d.pop("dc:date", UNSET) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptkana = d.pop("odpt:kana", UNSET) bus_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptbusroute_pattern=odptbusroute_pattern, odptcalendar=odptcalendar, odptbus_timetable_object=odptbus_timetable_object, dcdate=dcdate, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptkana=odptkana, ) bus_timetable.additional_properties = d return bus_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptbusroute_pattern = self.odptbusroute_pattern odptcalendar = self.odptcalendar odptbus_timetable_object = [] for odptbus_timetable_object_item_data in self.odptbus_timetable_object: odptbus_timetable_object_item = odptbus_timetable_object_item_data.to_dict() odptbus_timetable_object.append(odptbus_timetable_object_item) dcdate = self.dcdate dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptkana = self.odptkana field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:busroutePattern": odptbusroute_pattern, "odpt:calendar": odptcalendar, "odpt:busTimetableObject": odptbus_timetable_object, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana return field_dict
class BusTimetableObject (odptindex: int,
odptbusstop_pole: str,
odptarrival_time: Unset | str = <python_odpt.types.Unset object>,
odptdeparture_time: Unset | str = <python_odpt.types.Unset object>,
odptdestination_sign: Unset | str = <python_odpt.types.Unset object>,
odptis_non_step_bus: Unset | bool = <python_odpt.types.Unset object>,
odptis_midnight: Unset | bool = <python_odpt.types.Unset object>,
odptcan_get_on: Unset | bool = <python_odpt.types.Unset object>,
odptcan_get_off: Unset | bool = <python_odpt.types.Unset object>,
odptnote: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバス時刻表時分情報
Attributes
odptindex:int- 標柱通過順
odptbusstop_pole:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptarrival_time:Union[Unset, str]- ISO8601 時刻形式
odptdeparture_time:Union[Unset, str]- ISO8601 時刻形式
odptdestination_sign:Union[Unset, str]- 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行.
odptis_non_step_bus:Union[Unset, bool]- ノンステップバスの場合 true Example: True.
odptis_midnight:Union[Unset, bool]- 深夜バスの場合 true Example: True.
odptcan_get_on:Union[Unset, bool]- 乗車可能な場合 true Example: True.
odptcan_get_off:Union[Unset, bool]- 降車可能な場合 true Example: True.
odptnote:Union[Unset, str]- 注記 Example: 蔵境駅南口:10140:3.
Method generated by attrs for class BusTimetableObject.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_time : Unset | str-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole : str-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcan_get_off : Unset | bool-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcan_get_on : Unset | bool-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_time : Unset | str-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_sign : Unset | str-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptindex : int-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_midnight : Unset | bool-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_non_step_bus : Unset | bool-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote : Unset | str-
Expand source code
@_attrs_define class BusTimetableObject: """バス時刻表時分情報 Attributes: odptindex (int): 標柱通過順 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: ( 桜ケ丘 経由 ) 横浜駅西口 行. odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 蔵境駅南口:10140:3. """ odptindex: int odptbusstop_pole: str odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptindex = d.pop("odpt:index") odptbusstop_pole = d.pop("odpt:busstopPole") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) bus_timetable_object = cls( odptindex=odptindex, odptbusstop_pole=odptbusstop_pole, odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptdestination_sign=odptdestination_sign, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) bus_timetable_object.additional_properties = d return bus_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptindex = self.odptindex odptbusstop_pole = self.odptbusstop_pole odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptdestination_sign = self.odptdestination_sign odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:index": odptindex, "odpt:busstopPole": odptbusstop_pole, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class BusTimetableType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusTimetableType(str, Enum): ODPTBUSTIMETABLE = "odpt:BusTimetable" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUSTIMETABLE
class BusType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusType(str, Enum): ODPTBUS = "odpt:Bus" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUS
class BusroutePattern (context: str,
id: str,
type: BusroutePatternType,
owlsame_as: str,
dcdate: str,
dctitle: str,
odptoperator: str,
odptbusstop_pole_order: List[ForwardRef('BussstopPoleOrder')],
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptkana: Unset | str = <python_odpt.types.Unset object>,
odptbusroute: Unset | str = <python_odpt.types.Unset object>,
odptpattern: Unset | str = <python_odpt.types.Unset object>,
odptdirection: Unset | str = <python_odpt.types.Unset object>,
ugregion: Unset | ForwardRef('BusroutePatternUgregion') = <python_odpt.types.Unset object>,
odptnote: Unset | str = <python_odpt.types.Unset object>,
odptbus_location_url: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバス路線の系統情報
odpt:busstopPoleOrderが、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション)Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: <http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld.> id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURLMethod generated by attrs for class BusroutePattern.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbus_location_url-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole_order-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdirection-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptkana-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptpattern-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ugregion-
Expand source code
@_attrs_define class BusroutePattern: """バス路線の系統情報 `odpt:busstopPoleOrder` が、運行するバスの停車する停留所 (標柱) の順序を表現している。 バス路線 ('王57'等) は、通常、複数の系統情報から構成される。 (e.g. 往路、復路、異なる停留所通過順のバリエーション) Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_BusroutePattern.jsonld. id (str): 固有識別子 type (BusroutePatternType): バス路線情報のクラス名、"odpt:BusroutePattern"が入る Example: odpt:BusroutePattern. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス路線名称(系統名・系統番号等) Example: 直通. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusstop_pole_order (List['BussstopPoleOrder']): 停留所(標柱)の順序 Example: [{'odpt:busstopPole': 'odpt.BusstopPole:NishiTokyoBus.JRHachiojiStationNorthExit.390.15', 'odpt:index': 1, 'odpt:openingDoorsToGetOn': ['odpt:OpeningDoor:FrontSide'], 'odpt:openingDoorsToGetOff': ['odpt:OpeningDoor:FrontSide']}]. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス路線名称のよみがな Example: ちょくつう. odptbusroute (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptpattern (Union[Unset, str]): 系統パターン Example: 500102. odptdirection (Union[Unset, str]): 方向 Example: 2. ugregion (Union[Unset, BusroutePatternUgregion]): GeoJSON形式による地物情報 odptnote (Union[Unset, str]): 注記 Example: 036系統::03618.03_1. odptbus_location_url (Union[Unset, str]): バス位置情報を示すWebSiteのURL """ context: str id: str type: BusroutePatternType owlsame_as: str dcdate: str dctitle: str odptoperator: str odptbusstop_pole_order: List["BussstopPoleOrder"] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET odptbusroute: Union[Unset, str] = UNSET odptpattern: Union[Unset, str] = UNSET odptdirection: Union[Unset, str] = UNSET ugregion: Union[Unset, "BusroutePatternUgregion"] = UNSET odptnote: Union[Unset, str] = UNSET odptbus_location_url: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busroute_pattern_ugregion import BusroutePatternUgregion from ..models.bussstop_pole_order import BussstopPoleOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptbusstop_pole_order = [] _odptbusstop_pole_order = d.pop("odpt:busstopPoleOrder") for odptbusstop_pole_order_item_data in _odptbusstop_pole_order: odptbusstop_pole_order_item = BussstopPoleOrder.from_dict(odptbusstop_pole_order_item_data) odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) odptbusroute = d.pop("odpt:busroute", UNSET) odptpattern = d.pop("odpt:pattern", UNSET) odptdirection = d.pop("odpt:direction", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, BusroutePatternUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = BusroutePatternUgregion.from_dict(_ugregion) odptnote = d.pop("odpt:note", UNSET) odptbus_location_url = d.pop("odpt:busLocationURL", UNSET) busroute_pattern = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, odptbusstop_pole_order=odptbusstop_pole_order, dctvalid=dctvalid, odptkana=odptkana, odptbusroute=odptbusroute, odptpattern=odptpattern, odptdirection=odptdirection, ugregion=ugregion, odptnote=odptnote, odptbus_location_url=odptbus_location_url, ) busroute_pattern.additional_properties = d return busroute_pattern @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator odptbusstop_pole_order = [] for odptbusstop_pole_order_item_data in self.odptbusstop_pole_order: odptbusstop_pole_order_item = odptbusstop_pole_order_item_data.to_dict() odptbusstop_pole_order.append(odptbusstop_pole_order_item) dctvalid = self.dctvalid odptkana = self.odptkana odptbusroute = self.odptbusroute odptpattern = self.odptpattern odptdirection = self.odptdirection ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptnote = self.odptnote odptbus_location_url = self.odptbus_location_url field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:busstopPoleOrder": odptbusstop_pole_order, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptbusroute is not UNSET: field_dict["odpt:busroute"] = odptbusroute if odptpattern is not UNSET: field_dict["odpt:pattern"] = odptpattern if odptdirection is not UNSET: field_dict["odpt:direction"] = odptdirection if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptnote is not UNSET: field_dict["odpt:note"] = odptnote if odptbus_location_url is not UNSET: field_dict["odpt:busLocationURL"] = odptbus_location_url return field_dict
class BusroutePatternFare (context: str,
id: str,
type: BusroutePatternFareType,
owlsame_as: str,
dcdate: str,
odptoperator: str,
odptfrom_busroute_pattern: str,
odptfrom_busstop_pole_order: int,
odptfrom_busstop_pole: str,
odptto_busroute_pattern: str,
odptto_busstop_pole_order: int,
odptto_busstop_pole: str,
odptticket_fare: int,
dctissued: Unset | str = <python_odpt.types.Unset object>,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptchild_ticket_fare: Unset | int = <python_odpt.types.Unset object>,
odptic_card_fare: Unset | int = <python_odpt.types.Unset object>,
odptchild_ic_card_fare: Unset | int = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties乗車バス停(標柱)、降車バス停(標柱)についての運賃情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:BusroutePatternFareType- バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:str- ISO8601 日付時刻形式
odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptfrom_busroute_pattern:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptfrom_busstop_pole_order:int- 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25.
odptfrom_busstop_pole:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptto_busroute_pattern:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptto_busstop_pole_order:int- 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27.
odptto_busstop_pole:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptticket_fare:int- 切符利用時の運賃 (円) Example: 200.
dctissued:Union[Unset, str]- ISO8601 日付形式
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptchild_ticket_fare:Union[Unset, int]- 切符利用時の子供運賃 (円) Example: 100.
odptic_card_fare:Union[Unset, int]- ICカード利用時の運賃 (円) Example: 200.
odptchild_ic_card_fare:Union[Unset, int]- ICカード利用時の子供運賃 (円) Example: 100.
Method generated by attrs for class BusroutePatternFare.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctissued : Unset | str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid : Unset | str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptchild_ic_card_fare : Unset | int-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptchild_ticket_fare : Unset | int-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrom_busroute_pattern : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrom_busstop_pole : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrom_busstop_pole_order : int-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptic_card_fare : Unset | int-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptticket_fare : int-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptto_busroute_pattern : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptto_busstop_pole : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptto_busstop_pole_order : int-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as : str-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type : BusroutePatternFareType-
Expand source code
@_attrs_define class BusroutePatternFare: """乗車バス停(標柱)、降車バス停(標柱)についての運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusroutePatternFareType): バス運賃のクラス名、"odpt:BusroutePatternFare"が入る Example: odpt:BusroutePatternFare. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_busstop_pole_order (int): 乗車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:fromBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 25. odptfrom_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busroute_pattern (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_busstop_pole_order (int): 降車停留所の系統パターン内の停留所 (標柱) 通過順。odpt:toBusroutePattern の示す odpt:BusroutePattern の、 odpt:busstopPoleOrder の odpt:index と同じ値。 Example: 27. odptto_busstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 (円) Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 (円) Example: 100. odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 (円) Example: 200. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 (円) Example: 100. """ context: str id: str type: BusroutePatternFareType owlsame_as: str dcdate: str odptoperator: str odptfrom_busroute_pattern: str odptfrom_busstop_pole_order: int odptfrom_busstop_pole: str odptto_busroute_pattern: str odptto_busstop_pole_order: int odptto_busstop_pole: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusroutePatternFareType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptoperator = d.pop("odpt:operator") odptfrom_busroute_pattern = d.pop("odpt:fromBusroutePattern") odptfrom_busstop_pole_order = d.pop("odpt:fromBusstopPoleOrder") odptfrom_busstop_pole = d.pop("odpt:fromBusstopPole") odptto_busroute_pattern = d.pop("odpt:toBusroutePattern") odptto_busstop_pole_order = d.pop("odpt:toBusstopPoleOrder") odptto_busstop_pole = d.pop("odpt:toBusstopPole") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) busroute_pattern_fare = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptoperator=odptoperator, odptfrom_busroute_pattern=odptfrom_busroute_pattern, odptfrom_busstop_pole_order=odptfrom_busstop_pole_order, odptfrom_busstop_pole=odptfrom_busstop_pole, odptto_busroute_pattern=odptto_busroute_pattern, odptto_busstop_pole_order=odptto_busstop_pole_order, odptto_busstop_pole=odptto_busstop_pole, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptchild_ticket_fare=odptchild_ticket_fare, odptic_card_fare=odptic_card_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, ) busroute_pattern_fare.additional_properties = d return busroute_pattern_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptoperator = self.odptoperator odptfrom_busroute_pattern = self.odptfrom_busroute_pattern odptfrom_busstop_pole_order = self.odptfrom_busstop_pole_order odptfrom_busstop_pole = self.odptfrom_busstop_pole odptto_busroute_pattern = self.odptto_busroute_pattern odptto_busstop_pole_order = self.odptto_busstop_pole_order odptto_busstop_pole = self.odptto_busstop_pole odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptchild_ticket_fare = self.odptchild_ticket_fare odptic_card_fare = self.odptic_card_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:operator": odptoperator, "odpt:fromBusroutePattern": odptfrom_busroute_pattern, "odpt:fromBusstopPoleOrder": odptfrom_busstop_pole_order, "odpt:fromBusstopPole": odptfrom_busstop_pole, "odpt:toBusroutePattern": odptto_busroute_pattern, "odpt:toBusstopPoleOrder": odptto_busstop_pole_order, "odpt:toBusstopPole": odptto_busstop_pole, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare return field_dict
class BusroutePatternFareType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusroutePatternFareType(str, Enum): ODPTBUSROUTEPATTERNFARE = "odpt:BusroutePatternFare" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUSROUTEPATTERNFARE
class BusroutePatternType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusroutePatternType(str, Enum): ODPTBUSROUTEPATTERN = "odpt:BusroutePattern" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUSROUTEPATTERN
class BusroutePatternUgregion-
Expand source code
@_attrs_define class BusroutePatternUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() busroute_pattern_ugregion = cls() busroute_pattern_ugregion.additional_properties = d return busroute_pattern_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesGeoJSON形式による地物情報
Method generated by attrs for class BusroutePatternUgregion.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class BusroutePatternUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() busroute_pattern_ugregion = cls() busroute_pattern_ugregion.additional_properties = d return busroute_pattern_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict
class BussstopPoleOrder (odptbusstop_pole: str,
odptindex: int,
odptopening_doors_to_get_on: Unset | List[OpeningDoor] = <python_odpt.types.Unset object>,
odptopening_doors_to_get_off: Unset | List[OpeningDoor] = <python_odpt.types.Unset object>,
odptnote: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties停留所(標柱)の順序
Attributes
odptbusstop_pole:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptindex:int- 停留所通過順。通過順の昇順の値となる Example: 1.
odptopening_doors_to_get_on:Union[Unset, List[OpeningDoor]]- 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide'].
odptopening_doors_to_get_off:Union[Unset, List[OpeningDoor]]- 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide'].
odptnote:Union[Unset, str]- 注記
Method generated by attrs for class BussstopPoleOrder.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole : str-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptindex : int-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote : Unset | str-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptopening_doors_to_get_off : Unset | List[OpeningDoor]-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptopening_doors_to_get_on : Unset | List[OpeningDoor]-
Expand source code
@_attrs_define class BussstopPoleOrder: """停留所(標柱)の順序 Attributes: odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 停留所通過順。通過順の昇順の値となる Example: 1. odptopening_doors_to_get_on (Union[Unset, List[OpeningDoor]]): 乗車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptopening_doors_to_get_off (Union[Unset, List[OpeningDoor]]): 降車時に利用可能なドア Example: ['odpt:OpeningDoor:FrontSide']. odptnote (Union[Unset, str]): 注記 """ odptbusstop_pole: str odptindex: int odptopening_doors_to_get_on: Union[Unset, List[OpeningDoor]] = UNSET odptopening_doors_to_get_off: Union[Unset, List[OpeningDoor]] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptbusstop_pole = d.pop("odpt:busstopPole") odptindex = d.pop("odpt:index") odptopening_doors_to_get_on = [] _odptopening_doors_to_get_on = d.pop("odpt:openingDoorsToGetOn", UNSET) for odptopening_doors_to_get_on_item_data in _odptopening_doors_to_get_on or []: odptopening_doors_to_get_on_item = OpeningDoor(odptopening_doors_to_get_on_item_data) odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off = [] _odptopening_doors_to_get_off = d.pop("odpt:openingDoorsToGetOff", UNSET) for odptopening_doors_to_get_off_item_data in _odptopening_doors_to_get_off or []: odptopening_doors_to_get_off_item = OpeningDoor(odptopening_doors_to_get_off_item_data) odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = d.pop("odpt:note", UNSET) bussstop_pole_order = cls( odptbusstop_pole=odptbusstop_pole, odptindex=odptindex, odptopening_doors_to_get_on=odptopening_doors_to_get_on, odptopening_doors_to_get_off=odptopening_doors_to_get_off, odptnote=odptnote, ) bussstop_pole_order.additional_properties = d return bussstop_pole_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptbusstop_pole = self.odptbusstop_pole odptindex = self.odptindex odptopening_doors_to_get_on: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_on, Unset): odptopening_doors_to_get_on = [] for odptopening_doors_to_get_on_item_data in self.odptopening_doors_to_get_on: odptopening_doors_to_get_on_item = odptopening_doors_to_get_on_item_data.value odptopening_doors_to_get_on.append(odptopening_doors_to_get_on_item) odptopening_doors_to_get_off: Union[Unset, List[str]] = UNSET if not isinstance(self.odptopening_doors_to_get_off, Unset): odptopening_doors_to_get_off = [] for odptopening_doors_to_get_off_item_data in self.odptopening_doors_to_get_off: odptopening_doors_to_get_off_item = odptopening_doors_to_get_off_item_data.value odptopening_doors_to_get_off.append(odptopening_doors_to_get_off_item) odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:busstopPole": odptbusstop_pole, "odpt:index": odptindex, } ) if odptopening_doors_to_get_on is not UNSET: field_dict["odpt:openingDoorsToGetOn"] = odptopening_doors_to_get_on if odptopening_doors_to_get_off is not UNSET: field_dict["odpt:openingDoorsToGetOff"] = odptopening_doors_to_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class BusstopPole (context: str,
id: str,
type: BusstopPoleType,
owlsame_as: str,
dcdate: str,
dctitle: str,
odptoperator: List[str],
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptkana: Unset | str = <python_odpt.types.Unset object>,
title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
geolong: Unset | float = <python_odpt.types.Unset object>,
geolat: Unset | float = <python_odpt.types.Unset object>,
odptbusroute_pattern: Unset | List[str] = <python_odpt.types.Unset object>,
odptbusstop_pole_number: Unset | str = <python_odpt.types.Unset object>,
odptplatform_number: Unset | str = <python_odpt.types.Unset object>,
odptbusstop_pole_timetable: Unset | List[str] = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバス停情報 odpt:BusstopPoleは、バス停(標柱)の情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:BusstopPoleType- バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:str- ISO8601 日付時刻形式
dctitle:str- バス停名 Example: 中里.
odptoperator:List[str]- 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus'].
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptkana:Union[Unset, str]- バス停名のよみがな Example: ナカザト.
title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
geolong:Union[Unset, float]- 標柱の経度(WGS84) Example: 139.1234.
geolat:Union[Unset, float]- 標柱の緯度(WGS84) Example: 35.1234.
odptbusroute_pattern:Union[Unset, List[str]]- 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2'].
odptbusstop_pole_number:Union[Unset, str]- 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2.
odptplatform_number:Union[Unset, str]- のりば番号 Example: 1.
odptbusstop_pole_timetable:Union[Unset, List[str]]- バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト
Method generated by attrs for class BusstopPole.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolat-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolong-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute_pattern-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole_number-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole_timetable-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptkana-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptplatform_number-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var title-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class BusstopPole: """バス停情報 odpt:BusstopPoleは、バス停(標柱)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleType): バス停 (標柱) のクラス名、"odpt:BusstopPole"が入る Example: odpt:BusstopPole. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 dctitle (str): バス停名 Example: 中里. odptoperator (List[str]): 入線するバスの運営会社を表すID (odpt:Operatorのowl:sameAs) のリスト Example: ['odpt.Operator:OdakyuBus']. dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptkana (Union[Unset, str]): バス停名のよみがな Example: ナカザト. title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル geolong (Union[Unset, float]): 標柱の経度(WGS84) Example: 139.1234. geolat (Union[Unset, float]): 標柱の緯度(WGS84) Example: 35.1234. odptbusroute_pattern (Union[Unset, List[str]]): 入線する系統パターンのID (odpt:BusroutePatternのowl:sameAs) のリスト Example: ['odpt.BusroutePattern:OdakyuBus.Shimo61.20101.2']. odptbusstop_pole_number (Union[Unset, str]): 標柱番号。同一停留所の別標柱を区別するものであり、のりば番号とは一致する保証はない Example: 2. odptplatform_number (Union[Unset, str]): のりば番号 Example: 1. odptbusstop_pole_timetable (Union[Unset, List[str]]): バス停(標柱)時刻表のID (odpt:BusstopPoleTimetableのowl:sameAs) のリスト """ context: str id: str type: BusstopPoleType owlsame_as: str dcdate: str dctitle: str odptoperator: List[str] dctvalid: Union[Unset, str] = UNSET odptkana: Union[Unset, str] = UNSET title: Union[Unset, "MultilingualTitle"] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET odptbusroute_pattern: Union[Unset, List[str]] = UNSET odptbusstop_pole_number: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") odptoperator = cast(List[str], d.pop("odpt:operator")) dctvalid = d.pop("dct:valid", UNSET) odptkana = d.pop("odpt:kana", UNSET) _title = d.pop("title", UNSET) title: Union[Unset, MultilingualTitle] if isinstance(_title, Unset) or _title is None: title = UNSET else: title = MultilingualTitle.from_dict(_title) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) odptbusroute_pattern = cast(List[str], d.pop("odpt:busroutePattern", UNSET)) odptbusstop_pole_number = d.pop("odpt:busstopPoleNumber", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) odptbusstop_pole_timetable = cast(List[str], d.pop("odpt:busstopPoleTimetable", UNSET)) busstop_pole = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator=odptoperator, dctvalid=dctvalid, odptkana=odptkana, title=title, geolong=geolong, geolat=geolat, odptbusroute_pattern=odptbusroute_pattern, odptbusstop_pole_number=odptbusstop_pole_number, odptplatform_number=odptplatform_number, odptbusstop_pole_timetable=odptbusstop_pole_timetable, ) busstop_pole.additional_properties = d return busstop_pole @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator = self.odptoperator dctvalid = self.dctvalid odptkana = self.odptkana title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.title, Unset): title = self.title.to_dict() geolong = self.geolong geolat = self.geolat odptbusroute_pattern: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusroute_pattern, Unset): odptbusroute_pattern = self.odptbusroute_pattern odptbusstop_pole_number = self.odptbusstop_pole_number odptplatform_number = self.odptplatform_number odptbusstop_pole_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptbusstop_pole_timetable, Unset): odptbusstop_pole_timetable = self.odptbusstop_pole_timetable field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "dc:title": dctitle, "odpt:operator": odptoperator, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if title is not UNSET: field_dict["title"] = title if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusstop_pole_number is not UNSET: field_dict["odpt:busstopPoleNumber"] = odptbusstop_pole_number if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptbusstop_pole_timetable is not UNSET: field_dict["odpt:busstopPoleTimetable"] = odptbusstop_pole_timetable return field_dict
class BusstopPoleTimetable (context: str,
id: str,
type: BusstopPoleTimetableType,
owlsame_as: str,
dcdate: str,
odptbusstop_pole: str,
odptbus_direction: List[str] | str,
odptbusroute: List[str] | str,
odptoperator: List[str] | str,
odptcalendar: str,
dctissued: Unset | str = <python_odpt.types.Unset object>,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptbusstop_pole_timetable_object: Unset | List[ForwardRef('BusstopPoleTimetableObject')] = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:BusstopPoleTimetableType- バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:str- ISO8601 日付時刻形式
odptbusstop_pole:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptbus_direction:Union[List[str], str]- 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki.
odptbusroute:Union[List[str], str]- 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83'].
odptoperator:Union[List[str], str]- 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus.
odptcalendar:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dctissued:Union[Unset, str]- ISO8601 日付形式
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日.
odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. Method generated by attrs for class BusstopPoleTimetable.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctissued-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbus_direction-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusstop_pole_timetable_object-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcalendar-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class BusstopPoleTimetable: """バス停(標柱)時刻表 odpt:busstopPole で示されたバス停(標柱)の時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (BusstopPoleTimetableType): バス停(標柱)時刻表のクラス名、"odpt:BusstopPoleTimetable"が入る Example: odpt:BusstopPoleTimetable. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (str): ISO8601 日付時刻形式 odptbusstop_pole (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbus_direction (Union[List[str], str]): 方面を表すID。array となる場合もある。 Example: odpt.BusDirection:KeioBus.Minamioosawaeki. odptbusroute (Union[List[str], str]): 路線を表すID。array となる場合もある。(複数路線を含む時刻表の場合等) Example: ['odpt.Busroute:KeioBus.Sakura80', 'odpt.Busroute:KeioBus.Sakura88Fu', 'odpt.Busroute:KeioBus.Sakura84', 'odpt.Busroute:KeioBus.Sakura88', 'odpt.Busroute:KeioBus.Sakura83']. odptoperator (Union[List[str], str]): 運行会社を表すID (odpt:Operatorのowl:sameAs) Example: odpt.Operator:KeioBus. odptcalendar (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): バス路線名称(系統名等) Example: 桜80、桜88-ふ、桜84、桜88、桜83:東中野:京王堀之内駅・相模原駅・南大沢駅・由木折返場行:平日. odptbusstop_pole_timetable_object (Union[Unset, List['BusstopPoleTimetableObject']]): バス停(標柱)時刻表の時分情報 Example: [{'odpt:busroutePattern': 'odpt.BusroutePattern:KeioBus.Sakura80.699.1', 'odpt:departureTime': '06:30', 'odpt:destinationBusstopPole': 'odpt.BusstopPole:KeioBus.Minamioosawaeki.1395.0', 'odpt:destinationSign': '南大沢駅', 'odpt:isMidnight': True, 'odpt:note': '南大沢駅行'}]. """ context: str id: str type: BusstopPoleTimetableType owlsame_as: str dcdate: str odptbusstop_pole: str odptbus_direction: Union[List[str], str] odptbusroute: Union[List[str], str] odptoperator: Union[List[str], str] odptcalendar: str dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptbusstop_pole_timetable_object: Union[Unset, List["BusstopPoleTimetableObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.busstop_pole_timetable_object import BusstopPoleTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = BusstopPoleTimetableType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date") odptbusstop_pole = d.pop("odpt:busstopPole") def _parse_odptbus_direction(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbus_direction_type_1 = cast(List[str], data) return odptbus_direction_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbus_direction = _parse_odptbus_direction(d.pop("odpt:busDirection")) def _parse_odptbusroute(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptbusroute_type_1 = cast(List[str], data) return odptbusroute_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptbusroute = _parse_odptbusroute(d.pop("odpt:busroute")) def _parse_odptoperator(data: object) -> Union[List[str], str]: try: if not isinstance(data, list): raise TypeError() odptoperator_type_1 = cast(List[str], data) return odptoperator_type_1 except: # noqa: E722 pass return cast(Union[List[str], str], data) odptoperator = _parse_odptoperator(d.pop("odpt:operator")) odptcalendar = d.pop("odpt:calendar") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) dctitle = d.pop("dc:title", UNSET) odptbusstop_pole_timetable_object = [] _odptbusstop_pole_timetable_object = d.pop("odpt:busstopPoleTimetableObject", UNSET) for odptbusstop_pole_timetable_object_item_data in _odptbusstop_pole_timetable_object or []: odptbusstop_pole_timetable_object_item = BusstopPoleTimetableObject.from_dict( odptbusstop_pole_timetable_object_item_data ) odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) busstop_pole_timetable = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, odptbusstop_pole=odptbusstop_pole, odptbus_direction=odptbus_direction, odptbusroute=odptbusroute, odptoperator=odptoperator, odptcalendar=odptcalendar, dctissued=dctissued, dctvalid=dctvalid, dctitle=dctitle, odptbusstop_pole_timetable_object=odptbusstop_pole_timetable_object, ) busstop_pole_timetable.additional_properties = d return busstop_pole_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate odptbusstop_pole = self.odptbusstop_pole odptbus_direction: Union[List[str], str] if isinstance(self.odptbus_direction, list): odptbus_direction = self.odptbus_direction else: odptbus_direction = self.odptbus_direction odptbusroute: Union[List[str], str] if isinstance(self.odptbusroute, list): odptbusroute = self.odptbusroute else: odptbusroute = self.odptbusroute odptoperator: Union[List[str], str] if isinstance(self.odptoperator, list): odptoperator = self.odptoperator else: odptoperator = self.odptoperator odptcalendar = self.odptcalendar dctissued = self.dctissued dctvalid = self.dctvalid dctitle = self.dctitle odptbusstop_pole_timetable_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptbusstop_pole_timetable_object, Unset): odptbusstop_pole_timetable_object = [] for odptbusstop_pole_timetable_object_item_data in self.odptbusstop_pole_timetable_object: odptbusstop_pole_timetable_object_item = odptbusstop_pole_timetable_object_item_data.to_dict() odptbusstop_pole_timetable_object.append(odptbusstop_pole_timetable_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "dc:date": dcdate, "odpt:busstopPole": odptbusstop_pole, "odpt:busDirection": odptbus_direction, "odpt:busroute": odptbusroute, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptbusstop_pole_timetable_object is not UNSET: field_dict["odpt:busstopPoleTimetableObject"] = odptbusstop_pole_timetable_object return field_dict
class BusstopPoleTimetableObject (odptdeparture_time: str,
odptarrival_time: Unset | str = <python_odpt.types.Unset object>,
odptdestination_busstop_pole: Unset | str = <python_odpt.types.Unset object>,
odptdestination_sign: Unset | str = <python_odpt.types.Unset object>,
odptbusroute_pattern: Unset | str = <python_odpt.types.Unset object>,
odptbusroute_pattern_order: Unset | int = <python_odpt.types.Unset object>,
odptis_non_step_bus: Unset | bool = <python_odpt.types.Unset object>,
odptis_midnight: Unset | bool = <python_odpt.types.Unset object>,
odptcan_get_on: Unset | bool = <python_odpt.types.Unset object>,
odptcan_get_off: Unset | bool = <python_odpt.types.Unset object>,
odptnote: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesバス停(標柱)時刻表の時分情報
Attributes
odptdeparture_time:str- ISO8601 時刻形式
odptarrival_time:Union[Unset, str]- ISO8601 時刻形式
odptdestination_busstop_pole:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptdestination_sign:Union[Unset, str]- 行先(方向幕)情報 Example: 南大沢駅.
odptbusroute_pattern:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptbusroute_pattern_order:Union[Unset, int]- 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。
odptis_non_step_bus:Union[Unset, bool]- ノンステップバスの場合 true Example: True.
odptis_midnight:Union[Unset, bool]- 深夜バスの場合 true Example: True.
odptcan_get_on:Union[Unset, bool]- 乗車可能な場合 true Example: True.
odptcan_get_off:Union[Unset, bool]- 降車可能な場合 true Example: True.
odptnote:Union[Unset, str]- 注記 Example: 南大沢駅行.
Method generated by attrs for class BusstopPoleTimetableObject.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_time : Unset | str-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute_pattern : Unset | str-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbusroute_pattern_order : Unset | int-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcan_get_off : Unset | bool-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcan_get_on : Unset | bool-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_time : str-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_busstop_pole : Unset | str-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_sign : Unset | str-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_midnight : Unset | bool-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_non_step_bus : Unset | bool-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote : Unset | str-
Expand source code
@_attrs_define class BusstopPoleTimetableObject: """バス停(標柱)時刻表の時分情報 Attributes: odptdeparture_time (str): ISO8601 時刻形式 odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdestination_busstop_pole (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdestination_sign (Union[Unset, str]): 行先(方向幕)情報 Example: 南大沢駅. odptbusroute_pattern (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptbusroute_pattern_order (Union[Unset, int]): 系統パターン内の停留所(標柱)通過順。odpt:busroutePattern の示す odpt:BusroutePattern の odpt:busstopPoleOrder の odpt:index と同じ値。 odptis_non_step_bus (Union[Unset, bool]): ノンステップバスの場合 true Example: True. odptis_midnight (Union[Unset, bool]): 深夜バスの場合 true Example: True. odptcan_get_on (Union[Unset, bool]): 乗車可能な場合 true Example: True. odptcan_get_off (Union[Unset, bool]): 降車可能な場合 true Example: True. odptnote (Union[Unset, str]): 注記 Example: 南大沢駅行. """ odptdeparture_time: str odptarrival_time: Union[Unset, str] = UNSET odptdestination_busstop_pole: Union[Unset, str] = UNSET odptdestination_sign: Union[Unset, str] = UNSET odptbusroute_pattern: Union[Unset, str] = UNSET odptbusroute_pattern_order: Union[Unset, int] = UNSET odptis_non_step_bus: Union[Unset, bool] = UNSET odptis_midnight: Union[Unset, bool] = UNSET odptcan_get_on: Union[Unset, bool] = UNSET odptcan_get_off: Union[Unset, bool] = UNSET odptnote: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptdeparture_time = d.pop("odpt:departureTime") odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdestination_busstop_pole = d.pop("odpt:destinationBusstopPole", UNSET) odptdestination_sign = d.pop("odpt:destinationSign", UNSET) odptbusroute_pattern = d.pop("odpt:busroutePattern", UNSET) odptbusroute_pattern_order = d.pop("odpt:busroutePatternOrder", UNSET) odptis_non_step_bus = d.pop("odpt:isNonStepBus", UNSET) odptis_midnight = d.pop("odpt:isMidnight", UNSET) odptcan_get_on = d.pop("odpt:canGetOn", UNSET) odptcan_get_off = d.pop("odpt:canGetOff", UNSET) odptnote = d.pop("odpt:note", UNSET) busstop_pole_timetable_object = cls( odptdeparture_time=odptdeparture_time, odptarrival_time=odptarrival_time, odptdestination_busstop_pole=odptdestination_busstop_pole, odptdestination_sign=odptdestination_sign, odptbusroute_pattern=odptbusroute_pattern, odptbusroute_pattern_order=odptbusroute_pattern_order, odptis_non_step_bus=odptis_non_step_bus, odptis_midnight=odptis_midnight, odptcan_get_on=odptcan_get_on, odptcan_get_off=odptcan_get_off, odptnote=odptnote, ) busstop_pole_timetable_object.additional_properties = d return busstop_pole_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptdeparture_time = self.odptdeparture_time odptarrival_time = self.odptarrival_time odptdestination_busstop_pole = self.odptdestination_busstop_pole odptdestination_sign = self.odptdestination_sign odptbusroute_pattern = self.odptbusroute_pattern odptbusroute_pattern_order = self.odptbusroute_pattern_order odptis_non_step_bus = self.odptis_non_step_bus odptis_midnight = self.odptis_midnight odptcan_get_on = self.odptcan_get_on odptcan_get_off = self.odptcan_get_off odptnote = self.odptnote field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:departureTime": odptdeparture_time, } ) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdestination_busstop_pole is not UNSET: field_dict["odpt:destinationBusstopPole"] = odptdestination_busstop_pole if odptdestination_sign is not UNSET: field_dict["odpt:destinationSign"] = odptdestination_sign if odptbusroute_pattern is not UNSET: field_dict["odpt:busroutePattern"] = odptbusroute_pattern if odptbusroute_pattern_order is not UNSET: field_dict["odpt:busroutePatternOrder"] = odptbusroute_pattern_order if odptis_non_step_bus is not UNSET: field_dict["odpt:isNonStepBus"] = odptis_non_step_bus if odptis_midnight is not UNSET: field_dict["odpt:isMidnight"] = odptis_midnight if odptcan_get_on is not UNSET: field_dict["odpt:canGetOn"] = odptcan_get_on if odptcan_get_off is not UNSET: field_dict["odpt:canGetOff"] = odptcan_get_off if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class BusstopPoleTimetableType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusstopPoleTimetableType(str, Enum): ODPTBUSSTOPPOLETIMETABLE = "odpt:BusstopPoleTimetable" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUSSTOPPOLETIMETABLE
class BusstopPoleType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class BusstopPoleType(str, Enum): ODPTBUSSTOPPOLE = "odpt:BusstopPole" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUSSTOPPOLE
class Calendar (context: str,
id: str,
type: CalendarType,
owlsame_as: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptcalendar_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties曜日・日付区分を扱うクラス
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:CalendarType- クラス指定
owlsame_as:str- 固有識別子
dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- カレンダー名称(日本語)
odptcalendar_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class Calendar.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcalendar_title-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class Calendar: """曜日・日付区分を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (CalendarType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): カレンダー名称(日本語) odptcalendar_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: CalendarType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptcalendar_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = CalendarType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptcalendar_title = d.pop("odpt:calendarTitle", UNSET) odptcalendar_title: Union[Unset, MultilingualTitle] if isinstance(_odptcalendar_title, Unset) or _odptcalendar_title is None: odptcalendar_title = UNSET else: odptcalendar_title = MultilingualTitle.from_dict(_odptcalendar_title) calendar = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptcalendar_title=odptcalendar_title, ) calendar.additional_properties = d return calendar @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptcalendar_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptcalendar_title, Unset): odptcalendar_title = self.odptcalendar_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptcalendar_title is not UNSET: field_dict["odpt:calendarTitle"] = odptcalendar_title return field_dict
class CalendarType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class CalendarType(str, Enum): ODPTCALENDAR = "odpt:Calendar" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTCALENDAR
class DumpRDFType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class DumpRDFType(str, Enum): ODPTAIRPORT = "odpt:Airport" ODPTAIRPORTTERMINAL = "odpt:AirportTerminal" ODPTBUSROUTEPATTERN = "odpt:BusroutePattern" ODPTBUSROUTEPATTERNFARE = "odpt:BusroutePatternFare" ODPTBUSSTOPPOLE = "odpt:BusstopPole" ODPTBUSSTOPPOLETIMETABLE = "odpt:BusstopPoleTimetable" ODPTBUSTIMETABLE = "odpt:BusTimetable" ODPTCALENDAR = "odpt:Calendar" ODPTFLIGHTSCHEDULE = "odpt:FlightSchedule" ODPTFLIGHTSTATUS = "odpt:FlightStatus" ODPTOPERATOR = "odpt:Operator" ODPTPASSENGERSURVEY = "odpt:PassengerSurvey" ODPTRAILDIRECTION = "odpt:RailDirection" ODPTRAILWAY = "odpt:Railway" ODPTRAILWAYFARE = "odpt:RailwayFare" ODPTSTATION = "odpt:Station" ODPTSTATIONTIMETABLE = "odpt:StationTimetable" ODPTTRAINTIMETABLE = "odpt:TrainTimetable" ODPTTRAINTYPE = "odpt:TrainType" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTAIRPORTvar ODPTAIRPORTTERMINALvar ODPTBUSROUTEPATTERNvar ODPTBUSROUTEPATTERNFAREvar ODPTBUSSTOPPOLEvar ODPTBUSSTOPPOLETIMETABLEvar ODPTBUSTIMETABLEvar ODPTCALENDARvar ODPTFLIGHTSCHEDULEvar ODPTFLIGHTSTATUSvar ODPTOPERATORvar ODPTPASSENGERSURVEYvar ODPTRAILDIRECTIONvar ODPTRAILWAYvar ODPTRAILWAYFAREvar ODPTSTATIONvar ODPTSTATIONTIMETABLEvar ODPTTRAINTIMETABLEvar ODPTTRAINTYPE
class FlightInformationArrival (context: str,
id: str,
type: FlightInformationArrivalType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptflight_number: List[str],
odptarrival_airport: str,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptairline: Unset | str = <python_odpt.types.Unset object>,
odptflight_status: Unset | str = <python_odpt.types.Unset object>,
odptflight_information_summary: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptflight_information_text: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptscheduled_arrival_time: Unset | str = <python_odpt.types.Unset object>,
odptestimated_arrival_time: Unset | str = <python_odpt.types.Unset object>,
odptactual_arrival_time: Unset | str = <python_odpt.types.Unset object>,
odptarrival_airport_terminal: Unset | str = <python_odpt.types.Unset object>,
odptarrival_gate: Unset | str = <python_odpt.types.Unset object>,
odptbaggage_claim: Unset | str = <python_odpt.types.Unset object>,
odptorigin_airport: Unset | str = <python_odpt.types.Unset object>,
odptvia_airport: Unset | List[str] = <python_odpt.types.Unset object>,
odptaircraft_type: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesフライト到着情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:FlightInformationArrivalType- クラス指定
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- フライト到着情報を提供する事業者を示すID
odptflight_number:List[str]- フライト番号のリスト
odptarrival_airport:str- 到着空港を示すID
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptairline:Union[Unset, str]- エアラインの運行会社を表すID
odptflight_status:Union[Unset, str]- フライト状況を表すID
odptflight_information_summary:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptflight_information_text:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptscheduled_arrival_time:Union[Unset, str]- ISO8601 時刻形式
odptestimated_arrival_time:Union[Unset, str]- ISO8601 時刻形式
odptactual_arrival_time:Union[Unset, str]- ISO8601 時刻形式
odptarrival_airport_terminal:Union[Unset, str]- 到着空港のターミナルを表すID
odptarrival_gate:Union[Unset, str]- 到着空港のゲート番号
odptbaggage_claim:Union[Unset, str]- 到着空港の預け手荷物受取所
odptorigin_airport:Union[Unset, str]- 出発地の空港を示すID
odptvia_airport:Union[Unset, List[str]]- 経由地の空港を表すIDのリスト
odptaircraft_type:Union[Unset, str]- 航空機の機種
Method generated by attrs for class FlightInformationArrival.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptactual_arrival_time-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptaircraft_type-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairline-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_airport-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_airport_terminal-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_gate-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptbaggage_claim-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptestimated_arrival_time-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_information_summary-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_information_text-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_number-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_status-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptorigin_airport-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptscheduled_arrival_time-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_airport-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class FlightInformationArrival: """フライト到着情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationArrivalType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト到着情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptarrival_airport (str): 到着空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_arrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_airport_terminal (Union[Unset, str]): 到着空港のターミナルを表すID odptarrival_gate (Union[Unset, str]): 到着空港のゲート番号 odptbaggage_claim (Union[Unset, str]): 到着空港の預け手荷物受取所 odptorigin_airport (Union[Unset, str]): 出発地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationArrivalType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptarrival_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_arrival_time: Union[Unset, str] = UNSET odptestimated_arrival_time: Union[Unset, str] = UNSET odptactual_arrival_time: Union[Unset, str] = UNSET odptarrival_airport_terminal: Union[Unset, str] = UNSET odptarrival_gate: Union[Unset, str] = UNSET odptbaggage_claim: Union[Unset, str] = UNSET odptorigin_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationArrivalType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptarrival_airport = d.pop("odpt:arrivalAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_arrival_time = d.pop("odpt:scheduledArrivalTime", UNSET) odptestimated_arrival_time = d.pop("odpt:estimatedArrivalTime", UNSET) odptactual_arrival_time = d.pop("odpt:actualArrivalTime", UNSET) odptarrival_airport_terminal = d.pop("odpt:arrivalAirportTerminal", UNSET) odptarrival_gate = d.pop("odpt:arrivalGate", UNSET) odptbaggage_claim = d.pop("odpt:baggageClaim", UNSET) odptorigin_airport = d.pop("odpt:originAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_arrival = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptarrival_airport=odptarrival_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_arrival_time=odptscheduled_arrival_time, odptestimated_arrival_time=odptestimated_arrival_time, odptactual_arrival_time=odptactual_arrival_time, odptarrival_airport_terminal=odptarrival_airport_terminal, odptarrival_gate=odptarrival_gate, odptbaggage_claim=odptbaggage_claim, odptorigin_airport=odptorigin_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_arrival.additional_properties = d return flight_information_arrival @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptarrival_airport = self.odptarrival_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_arrival_time = self.odptscheduled_arrival_time odptestimated_arrival_time = self.odptestimated_arrival_time odptactual_arrival_time = self.odptactual_arrival_time odptarrival_airport_terminal = self.odptarrival_airport_terminal odptarrival_gate = self.odptarrival_gate odptbaggage_claim = self.odptbaggage_claim odptorigin_airport = self.odptorigin_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:arrivalAirport": odptarrival_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_arrival_time is not UNSET: field_dict["odpt:scheduledArrivalTime"] = odptscheduled_arrival_time if odptestimated_arrival_time is not UNSET: field_dict["odpt:estimatedArrivalTime"] = odptestimated_arrival_time if odptactual_arrival_time is not UNSET: field_dict["odpt:actualArrivalTime"] = odptactual_arrival_time if odptarrival_airport_terminal is not UNSET: field_dict["odpt:arrivalAirportTerminal"] = odptarrival_airport_terminal if odptarrival_gate is not UNSET: field_dict["odpt:arrivalGate"] = odptarrival_gate if odptbaggage_claim is not UNSET: field_dict["odpt:baggageClaim"] = odptbaggage_claim if odptorigin_airport is not UNSET: field_dict["odpt:originAirport"] = odptorigin_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict
class FlightInformationArrivalType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class FlightInformationArrivalType(str, Enum): ODPTFLIGHTINFORMATIONARRIVAL = "odpt:FlightInformationArrival" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTFLIGHTINFORMATIONARRIVAL
class FlightInformationDeparture (context: str,
id: str,
type: FlightInformationDepartureType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptflight_number: List[str],
odptdeparture_airport: str,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptairline: Unset | str = <python_odpt.types.Unset object>,
odptflight_status: Unset | str = <python_odpt.types.Unset object>,
odptflight_information_summary: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptflight_information_text: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptscheduled_departure_time: Unset | str = <python_odpt.types.Unset object>,
odptestimated_departure_time: Unset | str = <python_odpt.types.Unset object>,
odptactual_departure_time: Unset | str = <python_odpt.types.Unset object>,
odptdeparture_airport_terminal: Unset | str = <python_odpt.types.Unset object>,
odptdeparture_gate: Unset | str = <python_odpt.types.Unset object>,
odptcheck_in_counter: Unset | List[str] = <python_odpt.types.Unset object>,
odptdestination_airport: Unset | str = <python_odpt.types.Unset object>,
odptvia_airport: Unset | List[str] = <python_odpt.types.Unset object>,
odptaircraft_type: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesフライト出発情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:FlightInformationDepartureType- クラス指定
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- フライト出発情報を提供する事業者を示すID
odptflight_number:List[str]- フライト番号のリスト
odptdeparture_airport:str- 出発空港を示すID
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptairline:Union[Unset, str]- エアラインの運行会社を表すID
odptflight_status:Union[Unset, str]- フライト状況を表すID
odptflight_information_summary:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptflight_information_text:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptscheduled_departure_time:Union[Unset, str]- ISO8601 時刻形式
odptestimated_departure_time:Union[Unset, str]- ISO8601 時刻形式
odptactual_departure_time:Union[Unset, str]- ISO8601 時刻形式
odptdeparture_airport_terminal:Union[Unset, str]- 出発空港のターミナルを示すID
odptdeparture_gate:Union[Unset, str]- 出発空港のゲート番号
odptcheck_in_counter:Union[Unset, List[str]]- 出発空港のチェックインカウンターのリスト
odptdestination_airport:Union[Unset, str]- 目的地の空港を示すID
odptvia_airport:Union[Unset, List[str]]- 経由地の空港を表すIDのリスト
odptaircraft_type:Union[Unset, str]- 航空機の機種
Method generated by attrs for class FlightInformationDeparture.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptactual_departure_time-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptaircraft_type-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairline-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcheck_in_counter-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_airport-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_airport_terminal-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_gate-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_airport-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptestimated_departure_time-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_information_summary-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_information_text-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_number-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_status-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptscheduled_departure_time-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_airport-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class FlightInformationDeparture: """フライト出発情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightInformationDepartureType): クラス指定 dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト出発情報を提供する事業者を示すID odptflight_number (List[str]): フライト番号のリスト odptdeparture_airport (str): 出発空港を示すID dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptairline (Union[Unset, str]): エアラインの運行会社を表すID odptflight_status (Union[Unset, str]): フライト状況を表すID odptflight_information_summary (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptflight_information_text (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptscheduled_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptestimated_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptactual_departure_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_airport_terminal (Union[Unset, str]): 出発空港のターミナルを示すID odptdeparture_gate (Union[Unset, str]): 出発空港のゲート番号 odptcheck_in_counter (Union[Unset, List[str]]): 出発空港のチェックインカウンターのリスト odptdestination_airport (Union[Unset, str]): 目的地の空港を示すID odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 """ context: str id: str type: FlightInformationDepartureType dcdate: str owlsame_as: str odptoperator: str odptflight_number: List[str] odptdeparture_airport: str dctvalid: Union[Unset, str] = UNSET odptairline: Union[Unset, str] = UNSET odptflight_status: Union[Unset, str] = UNSET odptflight_information_summary: Union[Unset, "MultilingualTitle"] = UNSET odptflight_information_text: Union[Unset, "MultilingualTitle"] = UNSET odptscheduled_departure_time: Union[Unset, str] = UNSET odptestimated_departure_time: Union[Unset, str] = UNSET odptactual_departure_time: Union[Unset, str] = UNSET odptdeparture_airport_terminal: Union[Unset, str] = UNSET odptdeparture_gate: Union[Unset, str] = UNSET odptcheck_in_counter: Union[Unset, List[str]] = UNSET odptdestination_airport: Union[Unset, str] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightInformationDepartureType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptdeparture_airport = d.pop("odpt:departureAirport") dctvalid = d.pop("dct:valid", UNSET) odptairline = d.pop("odpt:airline", UNSET) odptflight_status = d.pop("odpt:flightStatus", UNSET) _odptflight_information_summary = d.pop("odpt:flightInformationSummary", UNSET) odptflight_information_summary: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_summary, Unset) or _odptflight_information_summary is None: odptflight_information_summary = UNSET else: odptflight_information_summary = MultilingualTitle.from_dict(_odptflight_information_summary) _odptflight_information_text = d.pop("odpt:flightInformationText", UNSET) odptflight_information_text: Union[Unset, MultilingualTitle] if isinstance(_odptflight_information_text, Unset) or _odptflight_information_text is None: odptflight_information_text = UNSET else: odptflight_information_text = MultilingualTitle.from_dict(_odptflight_information_text) odptscheduled_departure_time = d.pop("odpt:scheduledDepartureTime", UNSET) odptestimated_departure_time = d.pop("odpt:estimatedDepartureTime", UNSET) odptactual_departure_time = d.pop("odpt:actualDepartureTime", UNSET) odptdeparture_airport_terminal = d.pop("odpt:departureAirportTerminal", UNSET) odptdeparture_gate = d.pop("odpt:departureGate", UNSET) odptcheck_in_counter = cast(List[str], d.pop("odpt:checkInCounter", UNSET)) odptdestination_airport = d.pop("odpt:destinationAirport", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) flight_information_departure = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptflight_number=odptflight_number, odptdeparture_airport=odptdeparture_airport, dctvalid=dctvalid, odptairline=odptairline, odptflight_status=odptflight_status, odptflight_information_summary=odptflight_information_summary, odptflight_information_text=odptflight_information_text, odptscheduled_departure_time=odptscheduled_departure_time, odptestimated_departure_time=odptestimated_departure_time, odptactual_departure_time=odptactual_departure_time, odptdeparture_airport_terminal=odptdeparture_airport_terminal, odptdeparture_gate=odptdeparture_gate, odptcheck_in_counter=odptcheck_in_counter, odptdestination_airport=odptdestination_airport, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, ) flight_information_departure.additional_properties = d return flight_information_departure @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptflight_number = self.odptflight_number odptdeparture_airport = self.odptdeparture_airport dctvalid = self.dctvalid odptairline = self.odptairline odptflight_status = self.odptflight_status odptflight_information_summary: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_summary, Unset): odptflight_information_summary = self.odptflight_information_summary.to_dict() odptflight_information_text: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_information_text, Unset): odptflight_information_text = self.odptflight_information_text.to_dict() odptscheduled_departure_time = self.odptscheduled_departure_time odptestimated_departure_time = self.odptestimated_departure_time odptactual_departure_time = self.odptactual_departure_time odptdeparture_airport_terminal = self.odptdeparture_airport_terminal odptdeparture_gate = self.odptdeparture_gate odptcheck_in_counter: Union[Unset, List[str]] = UNSET if not isinstance(self.odptcheck_in_counter, Unset): odptcheck_in_counter = self.odptcheck_in_counter odptdestination_airport = self.odptdestination_airport odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:flightNumber": odptflight_number, "odpt:departureAirport": odptdeparture_airport, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptairline is not UNSET: field_dict["odpt:airline"] = odptairline if odptflight_status is not UNSET: field_dict["odpt:flightStatus"] = odptflight_status if odptflight_information_summary is not UNSET: field_dict["odpt:flightInformationSummary"] = odptflight_information_summary if odptflight_information_text is not UNSET: field_dict["odpt:flightInformationText"] = odptflight_information_text if odptscheduled_departure_time is not UNSET: field_dict["odpt:scheduledDepartureTime"] = odptscheduled_departure_time if odptestimated_departure_time is not UNSET: field_dict["odpt:estimatedDepartureTime"] = odptestimated_departure_time if odptactual_departure_time is not UNSET: field_dict["odpt:actualDepartureTime"] = odptactual_departure_time if odptdeparture_airport_terminal is not UNSET: field_dict["odpt:departureAirportTerminal"] = odptdeparture_airport_terminal if odptdeparture_gate is not UNSET: field_dict["odpt:departureGate"] = odptdeparture_gate if odptcheck_in_counter is not UNSET: field_dict["odpt:checkInCounter"] = odptcheck_in_counter if odptdestination_airport is not UNSET: field_dict["odpt:destinationAirport"] = odptdestination_airport if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type return field_dict
class FlightInformationDepartureType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class FlightInformationDepartureType(str, Enum): ODPTFLIGHTINFORMATIONDEPARTURE = "odpt:FlightInformationDeparture" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTFLIGHTINFORMATIONDEPARTURE
class FlightSchedule (context: str,
id: str,
type: FlightScheduleType,
owlsame_as: str,
odptoperator: str,
odptcalendar: str,
odptorigin_airport: str,
odptdestination_airport: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
odptflight_schedule_object: Unset | List[ForwardRef('FlightScheduleObject')] = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesフライト時刻表
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:FlightScheduleType- クラス指定
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- フライト時刻表を提供する事業者を示すID
odptcalendar:str- カレンダー情報を示すID
odptorigin_airport:str- 出発地の空港のID
odptdestination_airport:str- 目的地の空港のID
dcdate:Union[Unset, str]- ISO8601 日付時刻形式
odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト Method generated by attrs for class FlightSchedule.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcalendar-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_airport-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_schedule_object-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptorigin_airport-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class FlightSchedule: """フライト時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightScheduleType): クラス指定 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): フライト時刻表を提供する事業者を示すID odptcalendar (str): カレンダー情報を示すID odptorigin_airport (str): 出発地の空港のID odptdestination_airport (str): 目的地の空港のID dcdate (Union[Unset, str]): ISO8601 日付時刻形式 odptflight_schedule_object (Union[Unset, List['FlightScheduleObject']]): 時刻表オブジェクト """ context: str id: str type: FlightScheduleType owlsame_as: str odptoperator: str odptcalendar: str odptorigin_airport: str odptdestination_airport: str dcdate: Union[Unset, str] = UNSET odptflight_schedule_object: Union[Unset, List["FlightScheduleObject"]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.flight_schedule_object import FlightScheduleObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightScheduleType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptcalendar = d.pop("odpt:calendar") odptorigin_airport = d.pop("odpt:originAirport") odptdestination_airport = d.pop("odpt:destinationAirport") dcdate = d.pop("dc:date", UNSET) odptflight_schedule_object = [] _odptflight_schedule_object = d.pop("odpt:flightScheduleObject", UNSET) for odptflight_schedule_object_item_data in _odptflight_schedule_object or []: odptflight_schedule_object_item = FlightScheduleObject.from_dict(odptflight_schedule_object_item_data) odptflight_schedule_object.append(odptflight_schedule_object_item) flight_schedule = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, odptcalendar=odptcalendar, odptorigin_airport=odptorigin_airport, odptdestination_airport=odptdestination_airport, dcdate=dcdate, odptflight_schedule_object=odptflight_schedule_object, ) flight_schedule.additional_properties = d return flight_schedule @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptcalendar = self.odptcalendar odptorigin_airport = self.odptorigin_airport odptdestination_airport = self.odptdestination_airport dcdate = self.dcdate odptflight_schedule_object: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odptflight_schedule_object, Unset): odptflight_schedule_object = [] for odptflight_schedule_object_item_data in self.odptflight_schedule_object: odptflight_schedule_object_item = odptflight_schedule_object_item_data.to_dict() odptflight_schedule_object.append(odptflight_schedule_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:calendar": odptcalendar, "odpt:originAirport": odptorigin_airport, "odpt:destinationAirport": odptdestination_airport, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if odptflight_schedule_object is not UNSET: field_dict["odpt:flightScheduleObject"] = odptflight_schedule_object return field_dict
class FlightScheduleObject (odptairline: str,
odptflight_number: List[str],
odptorigin_time: str,
odptdestination_time: str,
odptorigin_day_difference: Unset | int = <python_odpt.types.Unset object>,
odptdestination_day_difference: Unset | int = <python_odpt.types.Unset object>,
odptvia_airport: Unset | List[str] = <python_odpt.types.Unset object>,
odptaircraft_type: Unset | str = <python_odpt.types.Unset object>,
odptis_valid_from: Unset | str = <python_odpt.types.Unset object>,
odptis_valid_to: Unset | str = <python_odpt.types.Unset object>,
odptnote: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesフライトスケジュールオブジェクト
Attributes
odptairline:str- エアラインの運行会社のID
odptflight_number:List[str]- フライト番号のリスト
odptorigin_time:str- ISO8601 時刻形式
odptdestination_time:str- ISO8601 時刻形式
odptorigin_day_difference:Union[Unset, int]- 出発日とカレンダー情報の日数差
odptdestination_day_difference:Union[Unset, int]- 到着日とカレンダー情報の日数差
odptvia_airport:Union[Unset, List[str]]- 経由地の空港を表すIDのリスト
odptaircraft_type:Union[Unset, str]- 航空機の機種
odptis_valid_from:Union[Unset, str]- ISO8601 日付時刻形式
odptis_valid_to:Union[Unset, str]- ISO8601 日付時刻形式
odptnote:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class FlightScheduleObject.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptaircraft_type-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptairline-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_day_difference-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_time-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_number-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_valid_from-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_valid_to-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptorigin_day_difference-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptorigin_time-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_airport-
Expand source code
@_attrs_define class FlightScheduleObject: """フライトスケジュールオブジェクト Attributes: odptairline (str): エアラインの運行会社のID odptflight_number (List[str]): フライト番号のリスト odptorigin_time (str): ISO8601 時刻形式 odptdestination_time (str): ISO8601 時刻形式 odptorigin_day_difference (Union[Unset, int]): 出発日とカレンダー情報の日数差 odptdestination_day_difference (Union[Unset, int]): 到着日とカレンダー情報の日数差 odptvia_airport (Union[Unset, List[str]]): 経由地の空港を表すIDのリスト odptaircraft_type (Union[Unset, str]): 航空機の機種 odptis_valid_from (Union[Unset, str]): ISO8601 日付時刻形式 odptis_valid_to (Union[Unset, str]): ISO8601 日付時刻形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptairline: str odptflight_number: List[str] odptorigin_time: str odptdestination_time: str odptorigin_day_difference: Union[Unset, int] = UNSET odptdestination_day_difference: Union[Unset, int] = UNSET odptvia_airport: Union[Unset, List[str]] = UNSET odptaircraft_type: Union[Unset, str] = UNSET odptis_valid_from: Union[Unset, str] = UNSET odptis_valid_to: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptairline = d.pop("odpt:airline") odptflight_number = cast(List[str], d.pop("odpt:flightNumber")) odptorigin_time = d.pop("odpt:originTime") odptdestination_time = d.pop("odpt:destinationTime") odptorigin_day_difference = d.pop("odpt:originDayDifference", UNSET) odptdestination_day_difference = d.pop("odpt:destinationDayDifference", UNSET) odptvia_airport = cast(List[str], d.pop("odpt:viaAirport", UNSET)) odptaircraft_type = d.pop("odpt:aircraftType", UNSET) odptis_valid_from = d.pop("odpt:isValidFrom", UNSET) odptis_valid_to = d.pop("odpt:isValidTo", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) flight_schedule_object = cls( odptairline=odptairline, odptflight_number=odptflight_number, odptorigin_time=odptorigin_time, odptdestination_time=odptdestination_time, odptorigin_day_difference=odptorigin_day_difference, odptdestination_day_difference=odptdestination_day_difference, odptvia_airport=odptvia_airport, odptaircraft_type=odptaircraft_type, odptis_valid_from=odptis_valid_from, odptis_valid_to=odptis_valid_to, odptnote=odptnote, ) flight_schedule_object.additional_properties = d return flight_schedule_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptairline = self.odptairline odptflight_number = self.odptflight_number odptorigin_time = self.odptorigin_time odptdestination_time = self.odptdestination_time odptorigin_day_difference = self.odptorigin_day_difference odptdestination_day_difference = self.odptdestination_day_difference odptvia_airport: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_airport, Unset): odptvia_airport = self.odptvia_airport odptaircraft_type = self.odptaircraft_type odptis_valid_from = self.odptis_valid_from odptis_valid_to = self.odptis_valid_to odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:airline": odptairline, "odpt:flightNumber": odptflight_number, "odpt:originTime": odptorigin_time, "odpt:destinationTime": odptdestination_time, } ) if odptorigin_day_difference is not UNSET: field_dict["odpt:originDayDifference"] = odptorigin_day_difference if odptdestination_day_difference is not UNSET: field_dict["odpt:destinationDayDifference"] = odptdestination_day_difference if odptvia_airport is not UNSET: field_dict["odpt:viaAirport"] = odptvia_airport if odptaircraft_type is not UNSET: field_dict["odpt:aircraftType"] = odptaircraft_type if odptis_valid_from is not UNSET: field_dict["odpt:isValidFrom"] = odptis_valid_from if odptis_valid_to is not UNSET: field_dict["odpt:isValidTo"] = odptis_valid_to if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class FlightScheduleType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class FlightScheduleType(str, Enum): ODPTFLIGHTSCHEDULE = "odpt:FlightSchedule" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTFLIGHTSCHEDULE
class FlightStatus (context: str,
id: str,
type: FlightStatusType,
owlsame_as: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptflight_status_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesフライト状況
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:FlightStatusType- クラス名
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- フライト状況(日本語)
odptflight_status_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class FlightStatus.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptflight_status_title-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class FlightStatus: """フライト状況 Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (FlightStatusType): クラス名 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): フライト状況(日本語) odptflight_status_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: FlightStatusType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptflight_status_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = FlightStatusType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptflight_status_title = d.pop("odpt:flightStatusTitle", UNSET) odptflight_status_title: Union[Unset, MultilingualTitle] if isinstance(_odptflight_status_title, Unset) or _odptflight_status_title is None: odptflight_status_title = UNSET else: odptflight_status_title = MultilingualTitle.from_dict(_odptflight_status_title) flight_status = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptflight_status_title=odptflight_status_title, ) flight_status.additional_properties = d return flight_status @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptflight_status_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptflight_status_title, Unset): odptflight_status_title = self.odptflight_status_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptflight_status_title is not UNSET: field_dict["odpt:flightStatusTitle"] = odptflight_status_title return field_dict
class FlightStatusType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class FlightStatusType(str, Enum): ODPTFLIGHTSTATUS = "odpt:FlightStatus" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTFLIGHTSTATUS
class MultilingualTitle (ja: str,
en: str,
ko: Unset | str = <python_odpt.types.Unset object>,
ja_hrkt: Unset | str = <python_odpt.types.Unset object>,
zh_hans: Unset | str = <python_odpt.types.Unset object>,
zh_hant: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties多言語対応のタイトル
Attributes
ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): Method generated by attrs for class MultilingualTitle.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var en : str-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ja : str-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ja_hrkt : Unset | str-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ko : Unset | str-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var zh_hans : Unset | str-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var zh_hant : Unset | str-
Expand source code
@_attrs_define class MultilingualTitle: """多言語対応のタイトル Attributes: ja (str): en (str): ko (Union[Unset, str]): ja_hrkt (Union[Unset, str]): zh_hans (Union[Unset, str]): zh_hant (Union[Unset, str]): """ ja: str en: str ko: Union[Unset, str] = UNSET ja_hrkt: Union[Unset, str] = UNSET zh_hans: Union[Unset, str] = UNSET zh_hant: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() ja = d.pop("ja", UNSET) en = d.pop("en", UNSET) ko = d.pop("ko", UNSET) ja_hrkt = d.pop("ja-Hrkt", UNSET) zh_hans = d.pop("zh-Hans", UNSET) zh_hant = d.pop("zh-Hant", UNSET) multilingual_title = cls( ja=ja, en=en, ko=ko, ja_hrkt=ja_hrkt, zh_hans=zh_hans, zh_hant=zh_hant, ) multilingual_title.additional_properties = d return multilingual_title @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: ja = self.ja en = self.en ko = self.ko ja_hrkt = self.ja_hrkt zh_hans = self.zh_hans zh_hant = self.zh_hant field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "ja": ja, "en": en, } ) if ko is not UNSET: field_dict["ko"] = ko if ja_hrkt is not UNSET: field_dict["ja-Hrkt"] = ja_hrkt if zh_hans is not UNSET: field_dict["zh-Hans"] = zh_hans if zh_hant is not UNSET: field_dict["zh-Hant"] = zh_hant return field_dict
class OccupancyStatus (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class OccupancyStatus(str, Enum): ODPT_OCCUPANCYSTATUSCRUSHEDSTANDINGROOMONLY = "odpt.OccupancyStatus:CrushedStandingRoomOnly" ODPT_OCCUPANCYSTATUSEMPTY = "odpt.OccupancyStatus:Empty" ODPT_OCCUPANCYSTATUSFEWSEATSAVAILABLE = "odpt.OccupancyStatus:FewSeatsAvailable" ODPT_OCCUPANCYSTATUSFULLROOMONLY = "odpt.OccupancyStatus:FullRoomOnly" ODPT_OCCUPANCYSTATUSMANYSEATSAVAILABLE = "odpt.OccupancyStatus:ManySeatsAvailable" ODPT_OCCUPANCYSTATUSNOTACCEPTINGPASSENGERS = "odpt.OccupancyStatus:NotAcceptingPassengers" ODPT_OCCUPANCYSTATUSSTANDINGROOMONLY = "odpt.OccupancyStatus:StandingRoomOnly" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPT_OCCUPANCYSTATUSCRUSHEDSTANDINGROOMONLYvar ODPT_OCCUPANCYSTATUSEMPTYvar ODPT_OCCUPANCYSTATUSFEWSEATSAVAILABLEvar ODPT_OCCUPANCYSTATUSFULLROOMONLYvar ODPT_OCCUPANCYSTATUSMANYSEATSAVAILABLEvar ODPT_OCCUPANCYSTATUSNOTACCEPTINGPASSENGERSvar ODPT_OCCUPANCYSTATUSSTANDINGROOMONLY
class OpeningDoor (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class OpeningDoor(str, Enum): ODPTOPENINGDOORFRONTSIDE = "odpt:OpeningDoor:FrontSide" ODPTOPENINGDOORREARSIDE = "odpt:OpeningDoor:RearSide" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTOPENINGDOORFRONTSIDEvar ODPTOPENINGDOORREARSIDE
class Operator (context: str,
id: str,
type: OperatorType,
owlsame_as: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptoperator_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties公共交通機関の事業者を扱うクラス
Attributes
context:str- JSON-LD仕様に基づく @context のURL
id:str- 固有識別子
type:OperatorType- クラス指定
owlsame_as:str- 固有識別子
dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- 事業者名称(日本語)
odptoperator_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class Operator.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator_title-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class Operator: """公共交通機関の事業者を扱うクラス Attributes: context (str): JSON-LD仕様に基づく @context のURL id (str): 固有識別子 type (OperatorType): クラス指定 owlsame_as (str): 固有識別子 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 事業者名称(日本語) odptoperator_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: OperatorType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptoperator_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = OperatorType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptoperator_title = d.pop("odpt:operatorTitle", UNSET) odptoperator_title: Union[Unset, MultilingualTitle] if isinstance(_odptoperator_title, Unset) or _odptoperator_title is None: odptoperator_title = UNSET else: odptoperator_title = MultilingualTitle.from_dict(_odptoperator_title) operator = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptoperator_title=odptoperator_title, ) operator.additional_properties = d return operator @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptoperator_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptoperator_title, Unset): odptoperator_title = self.odptoperator_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptoperator_title is not UNSET: field_dict["odpt:operatorTitle"] = odptoperator_title return field_dict
class OperatorType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class OperatorType(str, Enum): ODPTOPERATOR = "odpt:Operator" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTOPERATOR
class PassengerSurvey (context: str,
id: str,
type: PassengerSurveyType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptstation: List[str],
odptrailway: List[str],
odptinclude_alighting: bool,
odptpassenger_survey_object: List[ForwardRef('PassengerSurveyObject')])-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties駅の乗降人員数または乗車人員数
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:PassengerSurveyType- クラス名 Example: odpt:PassengerSurvey.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptstation:List[str]- 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo'].
odptrailway:List[str]- 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid'].
odptinclude_alighting:bool- 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True.
odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. Method generated by attrs for class PassengerSurvey.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptinclude_alighting-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptpassenger_survey_object-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class PassengerSurvey: """駅の乗降人員数または乗車人員数 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (PassengerSurveyType): クラス名 Example: odpt:PassengerSurvey. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation (List[str]): 駅を表すIDのリスト Example: ['odpt.Station:JR-East.Yamanote.Tokyo', 'odpt.Station:JR- East.ChuoRapid.Tokyo']. odptrailway (List[str]): 路線を表すIDのリスト Example: ['odpt.Railway:JR-East.Yamanote', 'odpt.Railway:JR- East.ChuoRapid']. odptinclude_alighting (bool): 乗降人員(降車を含む)の場合はtrue、乗車人員(降車を含まない)の場合はfalse Example: True. odptpassenger_survey_object (List['PassengerSurveyObject']): 調査年度と平均乗降人員数(または乗車人員数)の組のリスト Example: [{'odpt:surveyYear': 2017, 'odpt:passengerJourneys': 12345}]. """ context: str id: str type: PassengerSurveyType dcdate: str owlsame_as: str odptoperator: str odptstation: List[str] odptrailway: List[str] odptinclude_alighting: bool odptpassenger_survey_object: List["PassengerSurveyObject"] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.passenger_survey_object import PassengerSurveyObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = PassengerSurveyType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptstation = cast(List[str], d.pop("odpt:station")) odptrailway = cast(List[str], d.pop("odpt:railway")) odptinclude_alighting = d.pop("odpt:includeAlighting") odptpassenger_survey_object = [] _odptpassenger_survey_object = d.pop("odpt:passengerSurveyObject") for odptpassenger_survey_object_item_data in _odptpassenger_survey_object: odptpassenger_survey_object_item = PassengerSurveyObject.from_dict(odptpassenger_survey_object_item_data) odptpassenger_survey_object.append(odptpassenger_survey_object_item) passenger_survey = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptstation=odptstation, odptrailway=odptrailway, odptinclude_alighting=odptinclude_alighting, odptpassenger_survey_object=odptpassenger_survey_object, ) passenger_survey.additional_properties = d return passenger_survey @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptstation = self.odptstation odptrailway = self.odptrailway odptinclude_alighting = self.odptinclude_alighting odptpassenger_survey_object = [] for odptpassenger_survey_object_item_data in self.odptpassenger_survey_object: odptpassenger_survey_object_item = odptpassenger_survey_object_item_data.to_dict() odptpassenger_survey_object.append(odptpassenger_survey_object_item) field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:station": odptstation, "odpt:railway": odptrailway, "odpt:includeAlighting": odptinclude_alighting, "odpt:passengerSurveyObject": odptpassenger_survey_object, } ) return field_dict
class PassengerSurveyObject (odptsurvey_year: int, odptpassenger_journeys: int)-
Expand source code
@_attrs_define class PassengerSurveyObject: """調査年度と平均乗降人員数(または乗車人員数)の組 Attributes: odptsurvey_year (int): 調査年度 Example: 2017. odptpassenger_journeys (int): 駅の1日あたりの平均乗降人員数(または乗車人員数) Example: 12345. """ odptsurvey_year: int odptpassenger_journeys: int additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptsurvey_year = self.odptsurvey_year odptpassenger_journeys = self.odptpassenger_journeys field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:surveyYear": odptsurvey_year, "odpt:passengerJourneys": odptpassenger_journeys, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptsurvey_year = d.pop("odpt:surveyYear") odptpassenger_journeys = d.pop("odpt:passengerJourneys") passenger_survey_object = cls( odptsurvey_year=odptsurvey_year, odptpassenger_journeys=odptpassenger_journeys, ) passenger_survey_object.additional_properties = d return passenger_survey_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties調査年度と平均乗降人員数(または乗車人員数)の組
Attributes
odptsurvey_year:int- 調査年度 Example: 2017.
odptpassenger_journeys:int- 駅の1日あたりの平均乗降人員数(または乗車人員数) Example: 12345.
Method generated by attrs for class PassengerSurveyObject.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class PassengerSurveyObject: """調査年度と平均乗降人員数(または乗車人員数)の組 Attributes: odptsurvey_year (int): 調査年度 Example: 2017. odptpassenger_journeys (int): 駅の1日あたりの平均乗降人員数(または乗車人員数) Example: 12345. """ odptsurvey_year: int odptpassenger_journeys: int additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptsurvey_year = self.odptsurvey_year odptpassenger_journeys = self.odptpassenger_journeys field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:surveyYear": odptsurvey_year, "odpt:passengerJourneys": odptpassenger_journeys, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptsurvey_year = d.pop("odpt:surveyYear") odptpassenger_journeys = d.pop("odpt:passengerJourneys") passenger_survey_object = cls( odptsurvey_year=odptsurvey_year, odptpassenger_journeys=odptpassenger_journeys, ) passenger_survey_object.additional_properties = d return passenger_survey_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptpassenger_journeys : int-
Expand source code
@_attrs_define class PassengerSurveyObject: """調査年度と平均乗降人員数(または乗車人員数)の組 Attributes: odptsurvey_year (int): 調査年度 Example: 2017. odptpassenger_journeys (int): 駅の1日あたりの平均乗降人員数(または乗車人員数) Example: 12345. """ odptsurvey_year: int odptpassenger_journeys: int additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptsurvey_year = self.odptsurvey_year odptpassenger_journeys = self.odptpassenger_journeys field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:surveyYear": odptsurvey_year, "odpt:passengerJourneys": odptpassenger_journeys, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptsurvey_year = d.pop("odpt:surveyYear") odptpassenger_journeys = d.pop("odpt:passengerJourneys") passenger_survey_object = cls( odptsurvey_year=odptsurvey_year, odptpassenger_journeys=odptpassenger_journeys, ) passenger_survey_object.additional_properties = d return passenger_survey_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptsurvey_year : int-
Expand source code
@_attrs_define class PassengerSurveyObject: """調査年度と平均乗降人員数(または乗車人員数)の組 Attributes: odptsurvey_year (int): 調査年度 Example: 2017. odptpassenger_journeys (int): 駅の1日あたりの平均乗降人員数(または乗車人員数) Example: 12345. """ odptsurvey_year: int odptpassenger_journeys: int additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptsurvey_year = self.odptsurvey_year odptpassenger_journeys = self.odptpassenger_journeys field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:surveyYear": odptsurvey_year, "odpt:passengerJourneys": odptpassenger_journeys, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() odptsurvey_year = d.pop("odpt:surveyYear") odptpassenger_journeys = d.pop("odpt:passengerJourneys") passenger_survey_object = cls( odptsurvey_year=odptsurvey_year, odptpassenger_journeys=odptpassenger_journeys, ) passenger_survey_object.additional_properties = d return passenger_survey_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptsurvey_year = self.odptsurvey_year odptpassenger_journeys = self.odptpassenger_journeys field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:surveyYear": odptsurvey_year, "odpt:passengerJourneys": odptpassenger_journeys, } ) return field_dict
class PassengerSurveyType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class PassengerSurveyType(str, Enum): ODPTPASSENGERSURVEY = "odpt:PassengerSurvey" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTPASSENGERSURVEY
class PlaceRDFType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class PlaceRDFType(str, Enum): ODPTBUSSTOPPOLE = "odpt:BusstopPole" ODPTSTATION = "odpt:Station" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTBUSSTOPPOLEvar ODPTSTATION
class PlaceSearchResponse (context: str,
id: str,
type: str,
dcdate: str,
dctitle: str,
geolat: float,
geolong: float,
owlsame_as: str,
odptrailway: str,
odptoperator: str,
odptstation_code: str,
odptstation_title: MultilingualTitle,
odptpassenger_survey: List[str],
odptstation_timetable: List[str],
odptconnecting_railway: List[str],
odptconnecting_station: List[str])-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties地物情報検索APIのレスポンス
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld.
id:str- 固有識別子
type:str- クラス名 Example: odpt:Station.
dcdate:str- ISO8601 日付時刻形式
dctitle:str- 駅名(日本語) Example: 日本橋.
geolat:float- 緯度 Example: 35.681796.
geolong:float- 経度 Example: 139.775814.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptrailway:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptstation_code:str- 駅コード Example: A-13.
odptstation_title:MultilingualTitle- 多言語対応のタイトル
odptpassenger_survey:List[str]- 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi'].
odptstation_timetable:List[str]- 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday'].
odptconnecting_railway:List[str]- 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai'].
odptconnecting_station:List[str]- 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi'].
Method generated by attrs for class PlaceSearchResponse.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolat-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolong-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptconnecting_railway-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptconnecting_station-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptpassenger_survey-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_code-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_timetable-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_title-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class PlaceSearchResponse: """地物情報検索APIのレスポンス Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt_Station.jsonld. id (str): 固有識別子 type (str): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 dctitle (str): 駅名(日本語) Example: 日本橋. geolat (float): 緯度 Example: 35.681796. geolong (float): 経度 Example: 139.775814. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_code (str): 駅コード Example: A-13. odptstation_title (MultilingualTitle): 多言語対応のタイトル odptpassenger_survey (List[str]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:Toei.Nihombashi']. odptstation_timetable (List[str]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.Weekday', 'odpt.StationTimetable:Toei.Asakusa.Nihombashi.Southbound.SaturdayHoliday']. odptconnecting_railway (List[str]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:TokyoMetro.Ginza', 'odpt.Railway:TokyoMetro.Tozai']. odptconnecting_station (List[str]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:TokyoMetro.Ginza.Nihombashi', 'odpt.Station:TokyoMetro.Tozai.Nihombashi']. """ context: str id: str type: str dcdate: str dctitle: str geolat: float geolong: float owlsame_as: str odptrailway: str odptoperator: str odptstation_code: str odptstation_title: "MultilingualTitle" odptpassenger_survey: List[str] odptstation_timetable: List[str] odptconnecting_railway: List[str] odptconnecting_station: List[str] additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = d.pop("@type") dcdate = d.pop("dc:date") dctitle = d.pop("dc:title") geolat = d.pop("geo:lat") geolong = d.pop("geo:long") owlsame_as = d.pop("owl:sameAs") odptrailway = d.pop("odpt:railway") odptoperator = d.pop("odpt:operator") odptstation_code = d.pop("odpt:stationCode") odptstation_title = MultilingualTitle.from_dict(d.pop("odpt:stationTitle")) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey")) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable")) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway")) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation")) place_search_response = cls( context=context, id=id, type=type, dcdate=dcdate, dctitle=dctitle, geolat=geolat, geolong=geolong, owlsame_as=owlsame_as, odptrailway=odptrailway, odptoperator=odptoperator, odptstation_code=odptstation_code, odptstation_title=odptstation_title, odptpassenger_survey=odptpassenger_survey, odptstation_timetable=odptstation_timetable, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, ) place_search_response.additional_properties = d return place_search_response @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type dcdate = self.dcdate dctitle = self.dctitle geolat = self.geolat geolong = self.geolong owlsame_as = self.owlsame_as odptrailway = self.odptrailway odptoperator = self.odptoperator odptstation_code = self.odptstation_code odptstation_title = self.odptstation_title.to_dict() odptpassenger_survey = self.odptpassenger_survey odptstation_timetable = self.odptstation_timetable odptconnecting_railway = self.odptconnecting_railway odptconnecting_station = self.odptconnecting_station field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "dc:title": dctitle, "geo:lat": geolat, "geo:long": geolong, "owl:sameAs": owlsame_as, "odpt:railway": odptrailway, "odpt:operator": odptoperator, "odpt:stationCode": odptstation_code, "odpt:stationTitle": odptstation_title, "odpt:passengerSurvey": odptpassenger_survey, "odpt:stationTimetable": odptstation_timetable, "odpt:connectingRailway": odptconnecting_railway, "odpt:connectingStation": odptconnecting_station, } ) return field_dict
class RailDirection (context: str,
id: str,
type: RailDirectionType,
owlsame_as: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptrail_direction_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties列車の進行方向
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:RailDirectionType- クラス名 Example: odpt:RailDirection.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- 進行方向(日本語) Example: 上り.
odptrail_direction_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class RailDirection.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrail_direction_title-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class RailDirection: """列車の進行方向 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailDirectionType): クラス名 Example: odpt:RailDirection. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 進行方向(日本語) Example: 上り. odptrail_direction_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: RailDirectionType owlsame_as: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odptrail_direction_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailDirectionType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odptrail_direction_title = d.pop("odpt:railDirectionTitle", UNSET) odptrail_direction_title: Union[Unset, MultilingualTitle] if isinstance(_odptrail_direction_title, Unset) or _odptrail_direction_title is None: odptrail_direction_title = UNSET else: odptrail_direction_title = MultilingualTitle.from_dict(_odptrail_direction_title) rail_direction = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, dcdate=dcdate, dctitle=dctitle, odptrail_direction_title=odptrail_direction_title, ) rail_direction.additional_properties = d return rail_direction @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as dcdate = self.dcdate dctitle = self.dctitle odptrail_direction_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrail_direction_title, Unset): odptrail_direction_title = self.odptrail_direction_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptrail_direction_title is not UNSET: field_dict["odpt:railDirectionTitle"] = odptrail_direction_title return field_dict
class RailDirectionType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class RailDirectionType(str, Enum): ODPTRAILDIRECTION = "odpt:RailDirection" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTRAILDIRECTION
class Railway (context: str,
id: str,
type: RailwayType,
dcdate: str,
owlsame_as: str,
dctitle: str,
odptoperator: str,
odptstation_order: List[ForwardRef('StationOrder')],
odptrailway_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptkana: Unset | str = <python_odpt.types.Unset object>,
odptline_code: Unset | str = <python_odpt.types.Unset object>,
odptcolor: Unset | str = <python_odpt.types.Unset object>,
ugregion: Unset | ForwardRef('RailwayUgregion') = <python_odpt.types.Unset object>,
odptascending_rail_direction: Unset | str = <python_odpt.types.Unset object>,
odptdescending_rail_direction: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties鉄道路線(運行系統)の情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:RailwayType- クラス名 Example: odpt:Railway.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dctitle:str- 路線名(日本語) Example: 山手線.
odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 - odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR-
- East.Yamanote.Tokyo', 'odpt:index': 1}].
odptrailway_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptkana:Union[Unset, str]- 路線名のよみがな(ひらがな表記) Example: やまのてせん.
odptline_code:Union[Unset, str]- 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M.
odptcolor:Union[Unset, str]- 路線のラインカラー Example: #80C241.
ugregion:Union[Unset, RailwayUgregion]- GeoJSON形式による地物情報
odptascending_rail_direction:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptdescending_rail_direction:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式
Method generated by attrs for class Railway.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptascending_rail_direction-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcolor-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdescending_rail_direction-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptkana-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptline_code-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway_title-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_order-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ugregion-
Expand source code
@_attrs_define class Railway: """鉄道路線(運行系統)の情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayType): クラス名 Example: odpt:Railway. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (str): 路線名(日本語) Example: 山手線. odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_order (List['StationOrder']): 駅の順序を表すリスト Example: [{'odpt:station': 'odpt.Station:JR- East.Yamanote.Tokyo', 'odpt:index': 1}]. odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptkana (Union[Unset, str]): 路線名のよみがな(ひらがな表記) Example: やまのてせん. odptline_code (Union[Unset, str]): 路線コード、路線シンボル表記 e.g. 丸ノ内線=>M Example: M. odptcolor (Union[Unset, str]): 路線のラインカラー Example: #80C241. ugregion (Union[Unset, RailwayUgregion]): GeoJSON形式による地物情報 odptascending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdescending_rail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 """ context: str id: str type: RailwayType dcdate: str owlsame_as: str dctitle: str odptoperator: str odptstation_order: List["StationOrder"] odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptkana: Union[Unset, str] = UNSET odptline_code: Union[Unset, str] = UNSET odptcolor: Union[Unset, str] = UNSET ugregion: Union[Unset, "RailwayUgregion"] = UNSET odptascending_rail_direction: Union[Unset, str] = UNSET odptdescending_rail_direction: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.railway_ugregion import RailwayUgregion from ..models.station_order import StationOrder d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") dctitle = d.pop("dc:title") odptoperator = d.pop("odpt:operator") odptstation_order = [] _odptstation_order = d.pop("odpt:stationOrder") for odptstation_order_item_data in _odptstation_order: odptstation_order_item = StationOrder.from_dict(odptstation_order_item_data) odptstation_order.append(odptstation_order_item) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptkana = d.pop("odpt:kana", UNSET) odptline_code = d.pop("odpt:lineCode", UNSET) odptcolor = d.pop("odpt:color", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, RailwayUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = RailwayUgregion.from_dict(_ugregion) odptascending_rail_direction = d.pop("odpt:ascendingRailDirection", UNSET) odptdescending_rail_direction = d.pop("odpt:descendingRailDirection", UNSET) railway = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, dctitle=dctitle, odptoperator=odptoperator, odptstation_order=odptstation_order, odptrailway_title=odptrailway_title, odptkana=odptkana, odptline_code=odptline_code, odptcolor=odptcolor, ugregion=ugregion, odptascending_rail_direction=odptascending_rail_direction, odptdescending_rail_direction=odptdescending_rail_direction, ) railway.additional_properties = d return railway @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as dctitle = self.dctitle odptoperator = self.odptoperator odptstation_order = [] for odptstation_order_item_data in self.odptstation_order: odptstation_order_item = odptstation_order_item_data.to_dict() odptstation_order.append(odptstation_order_item) odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptkana = self.odptkana odptline_code = self.odptline_code odptcolor = self.odptcolor ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptascending_rail_direction = self.odptascending_rail_direction odptdescending_rail_direction = self.odptdescending_rail_direction field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "dc:title": dctitle, "odpt:operator": odptoperator, "odpt:stationOrder": odptstation_order, } ) if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptkana is not UNSET: field_dict["odpt:kana"] = odptkana if odptline_code is not UNSET: field_dict["odpt:lineCode"] = odptline_code if odptcolor is not UNSET: field_dict["odpt:color"] = odptcolor if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptascending_rail_direction is not UNSET: field_dict["odpt:ascendingRailDirection"] = odptascending_rail_direction if odptdescending_rail_direction is not UNSET: field_dict["odpt:descendingRailDirection"] = odptdescending_rail_direction return field_dict
class RailwayFare (context: str,
id: str,
type: RailwayFareType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptfrom_station: str,
odptto_station: str,
odptticket_fare: int,
dctissued: Unset | str = <python_odpt.types.Unset object>,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptic_card_fare: Unset | int = <python_odpt.types.Unset object>,
odptchild_ticket_fare: Unset | int = <python_odpt.types.Unset object>,
odptchild_ic_card_fare: Unset | int = <python_odpt.types.Unset object>,
odptvia_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptvia_railway: Unset | List[str] = <python_odpt.types.Unset object>,
odptticket_type: Unset | str = <python_odpt.types.Unset object>,
odptpayment_method: Unset | List[str] = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties2駅間の運賃情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:RailwayFareType- クラス名 Example: odpt:RailwayFare.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptfrom_station:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptto_station:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptticket_fare:int- 切符利用時の運賃 Example: 200.
dctissued:Union[Unset, str]- ISO8601 日付形式
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptic_card_fare:Union[Unset, int]- ICカード利用時の運賃 Example: 196.
odptchild_ticket_fare:Union[Unset, int]- 切符利用時の子供運賃 Example: 100.
odptchild_ic_card_fare:Union[Unset, int]- ICカード利用時の子供運賃 Example: 98.
odptvia_station:Union[Unset, List[str]]- 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi'].
odptvia_railway:Union[Unset, List[str]]- 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai'].
odptticket_type:Union[Unset, str]- チケット種別 Example: string.
odptpayment_method:Union[Unset, List[str]]- 支払い方法のリスト Example: ['string'].
Method generated by attrs for class RailwayFare.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctissued : Unset | str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid : Unset | str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptchild_ic_card_fare : Unset | int-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptchild_ticket_fare : Unset | int-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptfrom_station : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptic_card_fare : Unset | int-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptpayment_method : Unset | List[str]-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptticket_fare : int-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptticket_type : Unset | str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptto_station : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_railway : Unset | List[str]-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_station : Unset | List[str]-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as : str-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type : RailwayFareType-
Expand source code
@_attrs_define class RailwayFare: """2駅間の運賃情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (RailwayFareType): クラス名 Example: odpt:RailwayFare. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptfrom_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptto_station (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptticket_fare (int): 切符利用時の運賃 Example: 200. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptic_card_fare (Union[Unset, int]): ICカード利用時の運賃 Example: 196. odptchild_ticket_fare (Union[Unset, int]): 切符利用時の子供運賃 Example: 100. odptchild_ic_card_fare (Union[Unset, int]): ICカード利用時の子供運賃 Example: 98. odptvia_station (Union[Unset, List[str]]): 運賃計算上の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 運賃計算上の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptticket_type (Union[Unset, str]): チケット種別 Example: string. odptpayment_method (Union[Unset, List[str]]): 支払い方法のリスト Example: ['string']. """ context: str id: str type: RailwayFareType dcdate: str owlsame_as: str odptoperator: str odptfrom_station: str odptto_station: str odptticket_fare: int dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptic_card_fare: Union[Unset, int] = UNSET odptchild_ticket_fare: Union[Unset, int] = UNSET odptchild_ic_card_fare: Union[Unset, int] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptticket_type: Union[Unset, str] = UNSET odptpayment_method: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = RailwayFareType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptfrom_station = d.pop("odpt:fromStation") odptto_station = d.pop("odpt:toStation") odptticket_fare = d.pop("odpt:ticketFare") dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptic_card_fare = d.pop("odpt:icCardFare", UNSET) odptchild_ticket_fare = d.pop("odpt:childTicketFare", UNSET) odptchild_ic_card_fare = d.pop("odpt:childIcCardFare", UNSET) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptticket_type = d.pop("odpt:ticketType", UNSET) odptpayment_method = cast(List[str], d.pop("odpt:paymentMethod", UNSET)) railway_fare = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptfrom_station=odptfrom_station, odptto_station=odptto_station, odptticket_fare=odptticket_fare, dctissued=dctissued, dctvalid=dctvalid, odptic_card_fare=odptic_card_fare, odptchild_ticket_fare=odptchild_ticket_fare, odptchild_ic_card_fare=odptchild_ic_card_fare, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptticket_type=odptticket_type, odptpayment_method=odptpayment_method, ) railway_fare.additional_properties = d return railway_fare @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptfrom_station = self.odptfrom_station odptto_station = self.odptto_station odptticket_fare = self.odptticket_fare dctissued = self.dctissued dctvalid = self.dctvalid odptic_card_fare = self.odptic_card_fare odptchild_ticket_fare = self.odptchild_ticket_fare odptchild_ic_card_fare = self.odptchild_ic_card_fare odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptticket_type = self.odptticket_type odptpayment_method: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpayment_method, Unset): odptpayment_method = self.odptpayment_method field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:fromStation": odptfrom_station, "odpt:toStation": odptto_station, "odpt:ticketFare": odptticket_fare, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptic_card_fare is not UNSET: field_dict["odpt:icCardFare"] = odptic_card_fare if odptchild_ticket_fare is not UNSET: field_dict["odpt:childTicketFare"] = odptchild_ticket_fare if odptchild_ic_card_fare is not UNSET: field_dict["odpt:childIcCardFare"] = odptchild_ic_card_fare if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptticket_type is not UNSET: field_dict["odpt:ticketType"] = odptticket_type if odptpayment_method is not UNSET: field_dict["odpt:paymentMethod"] = odptpayment_method return field_dict
class RailwayFareType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class RailwayFareType(str, Enum): ODPTRAILWAYFARE = "odpt:RailwayFare" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTRAILWAYFARE
class RailwayType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class RailwayType(str, Enum): ODPTRAILWAY = "odpt:Railway" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTRAILWAY
class RailwayUgregion-
Expand source code
@_attrs_define class RailwayUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() railway_ugregion = cls() railway_ugregion.additional_properties = d return railway_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesGeoJSON形式による地物情報
Method generated by attrs for class RailwayUgregion.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class RailwayUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() railway_ugregion = cls() railway_ugregion.additional_properties = d return railway_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict
class Station (context: str,
id: str,
type: StationType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptrailway: str,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odptstation_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptstation_code: Unset | str = <python_odpt.types.Unset object>,
geolong: Unset | float = <python_odpt.types.Unset object>,
geolat: Unset | float = <python_odpt.types.Unset object>,
ugregion: Unset | ForwardRef('StationUgregion') = <python_odpt.types.Unset object>,
odptexit: Unset | List[str] = <python_odpt.types.Unset object>,
odptconnecting_railway: Unset | List[str] = <python_odpt.types.Unset object>,
odptconnecting_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptstation_timetable: Unset | List[str] = <python_odpt.types.Unset object>,
odptpassenger_survey: Unset | List[str] = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties駅情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:StationType- クラス名 Example: odpt:Station.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptrailway:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dctitle:Union[Unset, str]- 駅名(日本語) Example: 東京.
odptstation_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptstation_code:Union[Unset, str]- 駅コード Example: JY01.
geolong:Union[Unset, float]- 代表点の経度 Example: 139.1234.
geolat:Union[Unset, float]- 代表点の緯度 Example: 35.1234.
ugregion:Union[Unset, StationUgregion]- GeoJSON形式による地物情報
odptexit:Union[Unset, List[str]]- 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string'].
odptconnecting_railway:Union[Unset, List[str]]- 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi'].
odptconnecting_station:Union[Unset, List[str]]- 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo'].
odptstation_timetable:Union[Unset, List[str]]- 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday'].
odptpassenger_survey:Union[Unset, List[str]]- 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo'].
Method generated by attrs for class Station.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolat-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var geolong-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptconnecting_railway-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptconnecting_station-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptexit-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptpassenger_survey-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_code-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_timetable-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_title-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var ugregion-
Expand source code
@_attrs_define class Station: """駅情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationType): クラス名 Example: odpt:Station. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dctitle (Union[Unset, str]): 駅名(日本語) Example: 東京. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_code (Union[Unset, str]): 駅コード Example: JY01. geolong (Union[Unset, float]): 代表点の経度 Example: 139.1234. geolat (Union[Unset, float]): 代表点の緯度 Example: 35.1234. ugregion (Union[Unset, StationUgregion]): GeoJSON形式による地物情報 odptexit (Union[Unset, List[str]]): 駅出入口を表すIDのリスト IDにはug:Poiの@idの値を利用 Example: ['string']. odptconnecting_railway (Union[Unset, List[str]]): 乗り換え可能路線のIDのリスト Example: ['odpt.Railway:JR-East.ChuoRapid', 'odpt.Railway:TokyoMetro.Marunouchi']. odptconnecting_station (Union[Unset, List[str]]): 乗り換え可能駅のIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Tokyo', 'odpt.Station:TokyoMetro.Marunouchi.Tokyo']. odptstation_timetable (Union[Unset, List[str]]): 駅時刻表を表すIDのリスト Example: ['odpt.StationTimetable:JR- East.Yamanote.Tokyo.Outbound.Weekday']. odptpassenger_survey (Union[Unset, List[str]]): 駅乗降人員数を表すIDのリスト Example: ['odpt.PassengerSurvey:JR-East.Tokyo']. """ context: str id: str type: StationType dcdate: str owlsame_as: str odptoperator: str odptrailway: str dctitle: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation_code: Union[Unset, str] = UNSET geolong: Union[Unset, float] = UNSET geolat: Union[Unset, float] = UNSET ugregion: Union[Unset, "StationUgregion"] = UNSET odptexit: Union[Unset, List[str]] = UNSET odptconnecting_railway: Union[Unset, List[str]] = UNSET odptconnecting_station: Union[Unset, List[str]] = UNSET odptstation_timetable: Union[Unset, List[str]] = UNSET odptpassenger_survey: Union[Unset, List[str]] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_ugregion import StationUgregion d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") dctitle = d.pop("dc:title", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptstation_code = d.pop("odpt:stationCode", UNSET) geolong = d.pop("geo:long", UNSET) geolat = d.pop("geo:lat", UNSET) _ugregion = d.pop("ug:region", UNSET) ugregion: Union[Unset, StationUgregion] if isinstance(_ugregion, Unset) or _ugregion is None: ugregion = UNSET else: ugregion = StationUgregion.from_dict(_ugregion) odptexit = cast(List[str], d.pop("odpt:exit", UNSET)) odptconnecting_railway = cast(List[str], d.pop("odpt:connectingRailway", UNSET)) odptconnecting_station = cast(List[str], d.pop("odpt:connectingStation", UNSET)) odptstation_timetable = cast(List[str], d.pop("odpt:stationTimetable", UNSET)) odptpassenger_survey = cast(List[str], d.pop("odpt:passengerSurvey", UNSET)) station = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, dctitle=dctitle, odptstation_title=odptstation_title, odptstation_code=odptstation_code, geolong=geolong, geolat=geolat, ugregion=ugregion, odptexit=odptexit, odptconnecting_railway=odptconnecting_railway, odptconnecting_station=odptconnecting_station, odptstation_timetable=odptstation_timetable, odptpassenger_survey=odptpassenger_survey, ) station.additional_properties = d return station @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway dctitle = self.dctitle odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptstation_code = self.odptstation_code geolong = self.geolong geolat = self.geolat ugregion: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.ugregion, Unset): ugregion = self.ugregion.to_dict() odptexit: Union[Unset, List[str]] = UNSET if not isinstance(self.odptexit, Unset): odptexit = self.odptexit odptconnecting_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_railway, Unset): odptconnecting_railway = self.odptconnecting_railway odptconnecting_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptconnecting_station, Unset): odptconnecting_station = self.odptconnecting_station odptstation_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptstation_timetable, Unset): odptstation_timetable = self.odptstation_timetable odptpassenger_survey: Union[Unset, List[str]] = UNSET if not isinstance(self.odptpassenger_survey, Unset): odptpassenger_survey = self.odptpassenger_survey field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, } ) if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptstation_code is not UNSET: field_dict["odpt:stationCode"] = odptstation_code if geolong is not UNSET: field_dict["geo:long"] = geolong if geolat is not UNSET: field_dict["geo:lat"] = geolat if ugregion is not UNSET: field_dict["ug:region"] = ugregion if odptexit is not UNSET: field_dict["odpt:exit"] = odptexit if odptconnecting_railway is not UNSET: field_dict["odpt:connectingRailway"] = odptconnecting_railway if odptconnecting_station is not UNSET: field_dict["odpt:connectingStation"] = odptconnecting_station if odptstation_timetable is not UNSET: field_dict["odpt:stationTimetable"] = odptstation_timetable if odptpassenger_survey is not UNSET: field_dict["odpt:passengerSurvey"] = odptpassenger_survey return field_dict
class StationOrder (odptstation: str,
odptindex: int,
odptstation_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class StationOrder: """駅の順序 Attributes: odptstation (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 駅の順序を示す整数値 原則として、列車は進行方向に応じて、この値の昇順または降順に停車する。環状線などの場合は、同一の駅が複数回記載される場合がある。 Example: 1. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptstation: str odptindex: int odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptstation = self.odptstation odptindex = self.odptindex odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:station": odptstation, "odpt:index": odptindex, } ) if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptstation = d.pop("odpt:station") odptindex = d.pop("odpt:index") _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) station_order = cls( odptstation=odptstation, odptindex=odptindex, odptstation_title=odptstation_title, ) station_order.additional_properties = d return station_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties駅の順序
Attributes
odptstation:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptindex:int- 駅の順序を示す整数値 原則として、列車は進行方向に応じて、この値の昇順または降順に停車する。環状線などの場合は、同一の駅が複数回記載される場合がある。 Example: 1.
odptstation_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class StationOrder.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class StationOrder: """駅の順序 Attributes: odptstation (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 駅の順序を示す整数値 原則として、列車は進行方向に応じて、この値の昇順または降順に停車する。環状線などの場合は、同一の駅が複数回記載される場合がある。 Example: 1. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptstation: str odptindex: int odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptstation = self.odptstation odptindex = self.odptindex odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:station": odptstation, "odpt:index": odptindex, } ) if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptstation = d.pop("odpt:station") odptindex = d.pop("odpt:index") _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) station_order = cls( odptstation=odptstation, odptindex=odptindex, odptstation_title=odptstation_title, ) station_order.additional_properties = d return station_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptindex-
Expand source code
@_attrs_define class StationOrder: """駅の順序 Attributes: odptstation (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 駅の順序を示す整数値 原則として、列車は進行方向に応じて、この値の昇順または降順に停車する。環状線などの場合は、同一の駅が複数回記載される場合がある。 Example: 1. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptstation: str odptindex: int odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptstation = self.odptstation odptindex = self.odptindex odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:station": odptstation, "odpt:index": odptindex, } ) if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptstation = d.pop("odpt:station") odptindex = d.pop("odpt:index") _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) station_order = cls( odptstation=odptstation, odptindex=odptindex, odptstation_title=odptstation_title, ) station_order.additional_properties = d return station_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation-
Expand source code
@_attrs_define class StationOrder: """駅の順序 Attributes: odptstation (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 駅の順序を示す整数値 原則として、列車は進行方向に応じて、この値の昇順または降順に停車する。環状線などの場合は、同一の駅が複数回記載される場合がある。 Example: 1. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptstation: str odptindex: int odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptstation = self.odptstation odptindex = self.odptindex odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:station": odptstation, "odpt:index": odptindex, } ) if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptstation = d.pop("odpt:station") odptindex = d.pop("odpt:index") _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) station_order = cls( odptstation=odptstation, odptindex=odptindex, odptstation_title=odptstation_title, ) station_order.additional_properties = d return station_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_title-
Expand source code
@_attrs_define class StationOrder: """駅の順序 Attributes: odptstation (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptindex (int): 駅の順序を示す整数値 原則として、列車は進行方向に応じて、この値の昇順または降順に停車する。環状線などの場合は、同一の駅が複数回記載される場合がある。 Example: 1. odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptstation: str odptindex: int odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptstation = self.odptstation odptindex = self.odptindex odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:station": odptstation, "odpt:index": odptindex, } ) if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptstation = d.pop("odpt:station") odptindex = d.pop("odpt:index") _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) station_order = cls( odptstation=odptstation, odptindex=odptindex, odptstation_title=odptstation_title, ) station_order.additional_properties = d return station_order @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptstation = self.odptstation odptindex = self.odptindex odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "odpt:station": odptstation, "odpt:index": odptindex, } ) if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title return field_dict
class StationTimetable (context: str,
id: str,
type: StationTimetableType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptrailway: str,
odptstation_timetable_object: List[ForwardRef('StationTimetableObject')],
dctissued: Unset | str = <python_odpt.types.Unset object>,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptrailway_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptstation: Unset | str = <python_odpt.types.Unset object>,
odptstation_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptrail_direction: Unset | str = <python_odpt.types.Unset object>,
odptcalendar: Unset | str = <python_odpt.types.Unset object>,
odptnote: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties駅時刻表情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:StationTimetableType- クラス名 Example: odpt:StationTimetable.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptrailway:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 - odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example:
- [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}].
dctissued:Union[Unset, str]- ISO8601 日付形式
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptrailway_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptstation:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptstation_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptrail_direction:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptcalendar:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptnote:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class StationTimetable.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctissued-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcalendar-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrail_direction-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway_title-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_timetable_object-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_title-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class StationTimetable: """駅時刻表情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (StationTimetableType): クラス名 Example: odpt:StationTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_timetable_object (List['StationTimetableObject']): 出発時刻、終着(行先)駅等の組のリスト Example: [{'odpt:departureTime': '06:00'}, {'odpt:departureTime': '07:00'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: StationTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odptstation_timetable_object: List["StationTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrailway_title: Union[Unset, "MultilingualTitle"] = UNSET odptstation: Union[Unset, str] = UNSET odptstation_title: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.station_timetable_object import StationTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = StationTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odptstation_timetable_object = [] _odptstation_timetable_object = d.pop("odpt:stationTimetableObject") for odptstation_timetable_object_item_data in _odptstation_timetable_object: odptstation_timetable_object_item = StationTimetableObject.from_dict(odptstation_timetable_object_item_data) odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) _odptrailway_title = d.pop("odpt:railwayTitle", UNSET) odptrailway_title: Union[Unset, MultilingualTitle] if isinstance(_odptrailway_title, Unset) or _odptrailway_title is None: odptrailway_title = UNSET else: odptrailway_title = MultilingualTitle.from_dict(_odptrailway_title) odptstation = d.pop("odpt:station", UNSET) _odptstation_title = d.pop("odpt:stationTitle", UNSET) odptstation_title: Union[Unset, MultilingualTitle] if isinstance(_odptstation_title, Unset) or _odptstation_title is None: odptstation_title = UNSET else: odptstation_title = MultilingualTitle.from_dict(_odptstation_title) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odptstation_timetable_object=odptstation_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrailway_title=odptrailway_title, odptstation=odptstation, odptstation_title=odptstation_title, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odptnote=odptnote, ) station_timetable.additional_properties = d return station_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odptstation_timetable_object = [] for odptstation_timetable_object_item_data in self.odptstation_timetable_object: odptstation_timetable_object_item = odptstation_timetable_object_item_data.to_dict() odptstation_timetable_object.append(odptstation_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrailway_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptrailway_title, Unset): odptrailway_title = self.odptrailway_title.to_dict() odptstation = self.odptstation odptstation_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptstation_title, Unset): odptstation_title = self.odptstation_title.to_dict() odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:stationTimetableObject": odptstation_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway_title is not UNSET: field_dict["odpt:railwayTitle"] = odptrailway_title if odptstation is not UNSET: field_dict["odpt:station"] = odptstation if odptstation_title is not UNSET: field_dict["odpt:stationTitle"] = odptstation_title if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class StationTimetableObject (odptarrival_time: Unset | str = <python_odpt.types.Unset object>,
odptdeparture_time: Unset | str = <python_odpt.types.Unset object>,
odptorigin_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptdestination_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptvia_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptvia_railway: Unset | List[str] = <python_odpt.types.Unset object>,
odpttrain: Unset | str = <python_odpt.types.Unset object>,
odpttrain_number: Unset | str = <python_odpt.types.Unset object>,
odpttrain_type: Unset | str = <python_odpt.types.Unset object>,
odpttrain_name: Unset | List[ForwardRef('MultilingualTitle')] = <python_odpt.types.Unset object>,
odpttrain_owner: Unset | str = <python_odpt.types.Unset object>,
odptis_last: Unset | bool = <python_odpt.types.Unset object>,
odptis_origin: Unset | bool = <python_odpt.types.Unset object>,
odptplatform_number: Unset | str = <python_odpt.types.Unset object>,
odptplatform_name: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptcar_composition: Unset | int = <python_odpt.types.Unset object>,
odptnote: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties駅時刻表オブジェクト
Attributes
odptarrival_time:Union[Unset, str]- ISO8601 時刻形式
odptdeparture_time:Union[Unset, str]- ISO8601 時刻形式
odptorigin_station:Union[Unset, List[str]]- 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo'].
odptdestination_station:Union[Unset, List[str]]- 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao'].
odptvia_station:Union[Unset, List[str]]- 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi'].
odptvia_railway:Union[Unset, List[str]]- 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai'].
odpttrain:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_number:Union[Unset, str]- 列車番号 Example: 123M.
odpttrain_type:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 - odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en':
- 'Musashi'}].
odpttrain_owner:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptis_last:Union[Unset, bool]- 最終電車かどうか Example: True.
odptis_origin:Union[Unset, bool]- 始発駅かどうか Example: True.
odptplatform_number:Union[Unset, str]- プラットフォームの番号 Example: 1.
odptplatform_name:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptcar_composition:Union[Unset, int]- 車両数 Example: 8.
odptnote:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class StationTimetableObject.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_time-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcar_composition-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_time-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_station-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_last-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptis_origin-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptorigin_station-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptplatform_name-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptplatform_number-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_name-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_number-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_owner-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_type-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_railway-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_station-
Expand source code
@_attrs_define class StationTimetableObject: """駅時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptorigin_station (Union[Unset, List[str]]): 始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (Union[Unset, str]): 列車番号 Example: 123M. odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptis_last (Union[Unset, bool]): 最終電車かどうか Example: True. odptis_origin (Union[Unset, bool]): 始発駅かどうか Example: True. odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptcar_composition (Union[Unset, int]): 車両数 Example: 8. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_number: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptis_last: Union[Unset, bool] = UNSET odptis_origin: Union[Unset, bool] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptcar_composition: Union[Unset, int] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odpttrain = d.pop("odpt:train", UNSET) odpttrain_number = d.pop("odpt:trainNumber", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptis_last = d.pop("odpt:isLast", UNSET) odptis_origin = d.pop("odpt:isOrigin", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) odptcar_composition = d.pop("odpt:carComposition", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) station_timetable_object = cls( odptarrival_time=odptarrival_time, odptdeparture_time=odptdeparture_time, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odpttrain=odpttrain, odpttrain_number=odpttrain_number, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptis_last=odptis_last, odptis_origin=odptis_origin, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptcar_composition=odptcar_composition, odptnote=odptnote, ) station_timetable_object.additional_properties = d return station_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptdeparture_time = self.odptdeparture_time odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odpttrain = self.odpttrain odpttrain_number = self.odpttrain_number odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptis_last = self.odptis_last odptis_origin = self.odptis_origin odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptcar_composition = self.odptcar_composition odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_number is not UNSET: field_dict["odpt:trainNumber"] = odpttrain_number if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptis_last is not UNSET: field_dict["odpt:isLast"] = odptis_last if odptis_origin is not UNSET: field_dict["odpt:isOrigin"] = odptis_origin if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptcar_composition is not UNSET: field_dict["odpt:carComposition"] = odptcar_composition if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class StationTimetableType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class StationTimetableType(str, Enum): ODPTSTATIONTIMETABLE = "odpt:StationTimetable" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTSTATIONTIMETABLE
class StationType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class StationType(str, Enum): ODPTSTATION = "odpt:Station" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTSTATION
class StationUgregion-
Expand source code
@_attrs_define class StationUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() station_ugregion = cls() station_ugregion.additional_properties = d return station_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_propertiesGeoJSON形式による地物情報
Method generated by attrs for class StationUgregion.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties : Dict[str, Any]-
Expand source code
@_attrs_define class StationUgregion: """GeoJSON形式による地物情報""" additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: d = src_dict.copy() station_ugregion = cls() station_ugregion.additional_properties = d return station_ugregion @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) return field_dict
class TrainInformation (context: str,
id: str,
type: TrainInformationType,
dcdate: str,
owlsame_as: str,
odpttime_of_origin: str,
odptoperator: str,
odpttrain_information_text: MultilingualTitle,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptrailway: Unset | str = <python_odpt.types.Unset object>,
odpttrain_information_status: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptrail_direction: Unset | str = <python_odpt.types.Unset object>,
odpttrain_information_area: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odpttrain_information_kind: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptstation_from: Unset | str = <python_odpt.types.Unset object>,
odptstation_to: Unset | str = <python_odpt.types.Unset object>,
odpttrain_information_range: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odpttrain_information_cause: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odpttransfer_railways: Unset | List[str] = <python_odpt.types.Unset object>,
odptresume_estimate: Unset | str = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties列車運行情報
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:TrainInformationType- クラス名 Example: odpt:TrainInformation.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttime_of_origin:str- ISO8601 日付時刻形式
odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_information_text:MultilingualTitle- 多言語対応のタイトル
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptrailway:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_information_status:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptrail_direction:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_information_area:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odpttrain_information_kind:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptstation_from:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptstation_to:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_information_range:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odpttrain_information_cause:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odpttransfer_railways:Union[Unset, List[str]]- 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote'].
odptresume_estimate:Union[Unset, str]- ISO8601 日付時刻形式
Method generated by attrs for class TrainInformation.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrail_direction-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptresume_estimate-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_from-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptstation_to-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttime_of_origin-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_information_area-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_information_cause-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_information_kind-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_information_range-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_information_status-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_information_text-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttransfer_railways-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class TrainInformation: """列車運行情報 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainInformationType): クラス名 Example: odpt:TrainInformation. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttime_of_origin (str): ISO8601 日付時刻形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_text (MultilingualTitle): 多言語対応のタイトル dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrailway (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_status (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_area (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_kind (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptstation_from (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptstation_to (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_information_range (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttrain_information_cause (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odpttransfer_railways (Union[Unset, List[str]]): 振替路線一覧のリスト Example: ['odpt.Railway:JR-East.Yamanote']. odptresume_estimate (Union[Unset, str]): ISO8601 日付時刻形式 """ context: str id: str type: TrainInformationType dcdate: str owlsame_as: str odpttime_of_origin: str odptoperator: str odpttrain_information_text: "MultilingualTitle" dctvalid: Union[Unset, str] = UNSET odptrailway: Union[Unset, str] = UNSET odpttrain_information_status: Union[Unset, "MultilingualTitle"] = UNSET odptrail_direction: Union[Unset, str] = UNSET odpttrain_information_area: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_kind: Union[Unset, "MultilingualTitle"] = UNSET odptstation_from: Union[Unset, str] = UNSET odptstation_to: Union[Unset, str] = UNSET odpttrain_information_range: Union[Unset, "MultilingualTitle"] = UNSET odpttrain_information_cause: Union[Unset, "MultilingualTitle"] = UNSET odpttransfer_railways: Union[Unset, List[str]] = UNSET odptresume_estimate: Union[Unset, str] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainInformationType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odpttime_of_origin = d.pop("odpt:timeOfOrigin") odptoperator = d.pop("odpt:operator") odpttrain_information_text = MultilingualTitle.from_dict(d.pop("odpt:trainInformationText")) dctvalid = d.pop("dct:valid", UNSET) odptrailway = d.pop("odpt:railway", UNSET) _odpttrain_information_status = d.pop("odpt:trainInformationStatus", UNSET) odpttrain_information_status: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_status, Unset) or _odpttrain_information_status is None: odpttrain_information_status = UNSET else: odpttrain_information_status = MultilingualTitle.from_dict(_odpttrain_information_status) odptrail_direction = d.pop("odpt:railDirection", UNSET) _odpttrain_information_area = d.pop("odpt:trainInformationArea", UNSET) odpttrain_information_area: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_area, Unset) or _odpttrain_information_area is None: odpttrain_information_area = UNSET else: odpttrain_information_area = MultilingualTitle.from_dict(_odpttrain_information_area) _odpttrain_information_kind = d.pop("odpt:trainInformationKind", UNSET) odpttrain_information_kind: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_kind, Unset) or _odpttrain_information_kind is None: odpttrain_information_kind = UNSET else: odpttrain_information_kind = MultilingualTitle.from_dict(_odpttrain_information_kind) odptstation_from = d.pop("odpt:stationFrom", UNSET) odptstation_to = d.pop("odpt:stationTo", UNSET) _odpttrain_information_range = d.pop("odpt:trainInformationRange", UNSET) odpttrain_information_range: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_range, Unset) or _odpttrain_information_range is None: odpttrain_information_range = UNSET else: odpttrain_information_range = MultilingualTitle.from_dict(_odpttrain_information_range) _odpttrain_information_cause = d.pop("odpt:trainInformationCause", UNSET) odpttrain_information_cause: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_information_cause, Unset) or _odpttrain_information_cause is None: odpttrain_information_cause = UNSET else: odpttrain_information_cause = MultilingualTitle.from_dict(_odpttrain_information_cause) odpttransfer_railways = cast(List[str], d.pop("odpt:transferRailways", UNSET)) odptresume_estimate = d.pop("odpt:resumeEstimate", UNSET) train_information = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odpttime_of_origin=odpttime_of_origin, odptoperator=odptoperator, odpttrain_information_text=odpttrain_information_text, dctvalid=dctvalid, odptrailway=odptrailway, odpttrain_information_status=odpttrain_information_status, odptrail_direction=odptrail_direction, odpttrain_information_area=odpttrain_information_area, odpttrain_information_kind=odpttrain_information_kind, odptstation_from=odptstation_from, odptstation_to=odptstation_to, odpttrain_information_range=odpttrain_information_range, odpttrain_information_cause=odpttrain_information_cause, odpttransfer_railways=odpttransfer_railways, odptresume_estimate=odptresume_estimate, ) train_information.additional_properties = d return train_information @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odpttime_of_origin = self.odpttime_of_origin odptoperator = self.odptoperator odpttrain_information_text = self.odpttrain_information_text.to_dict() dctvalid = self.dctvalid odptrailway = self.odptrailway odpttrain_information_status: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_status, Unset): odpttrain_information_status = self.odpttrain_information_status.to_dict() odptrail_direction = self.odptrail_direction odpttrain_information_area: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_area, Unset): odpttrain_information_area = self.odpttrain_information_area.to_dict() odpttrain_information_kind: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_kind, Unset): odpttrain_information_kind = self.odpttrain_information_kind.to_dict() odptstation_from = self.odptstation_from odptstation_to = self.odptstation_to odpttrain_information_range: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_range, Unset): odpttrain_information_range = self.odpttrain_information_range.to_dict() odpttrain_information_cause: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_information_cause, Unset): odpttrain_information_cause = self.odpttrain_information_cause.to_dict() odpttransfer_railways: Union[Unset, List[str]] = UNSET if not isinstance(self.odpttransfer_railways, Unset): odpttransfer_railways = self.odpttransfer_railways odptresume_estimate = self.odptresume_estimate field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:timeOfOrigin": odpttime_of_origin, "odpt:operator": odptoperator, "odpt:trainInformationText": odpttrain_information_text, } ) if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrailway is not UNSET: field_dict["odpt:railway"] = odptrailway if odpttrain_information_status is not UNSET: field_dict["odpt:trainInformationStatus"] = odpttrain_information_status if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odpttrain_information_area is not UNSET: field_dict["odpt:trainInformationArea"] = odpttrain_information_area if odpttrain_information_kind is not UNSET: field_dict["odpt:trainInformationKind"] = odpttrain_information_kind if odptstation_from is not UNSET: field_dict["odpt:stationFrom"] = odptstation_from if odptstation_to is not UNSET: field_dict["odpt:stationTo"] = odptstation_to if odpttrain_information_range is not UNSET: field_dict["odpt:trainInformationRange"] = odpttrain_information_range if odpttrain_information_cause is not UNSET: field_dict["odpt:trainInformationCause"] = odpttrain_information_cause if odpttransfer_railways is not UNSET: field_dict["odpt:transferRailways"] = odpttransfer_railways if odptresume_estimate is not UNSET: field_dict["odpt:resumeEstimate"] = odptresume_estimate return field_dict
class TrainInformationType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class TrainInformationType(str, Enum): ODPTTRAININFORMATION = "odpt:TrainInformation" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTTRAININFORMATION
class TrainTimetable (context: str,
id: str,
type: TrainTimetableType,
dcdate: str,
owlsame_as: str,
odptoperator: str,
odptrailway: str,
odpttrain_number: str,
odpttrain_timetable_object: List[ForwardRef('TrainTimetableObject')],
dctissued: Unset | str = <python_odpt.types.Unset object>,
dctvalid: Unset | str = <python_odpt.types.Unset object>,
odptrail_direction: Unset | str = <python_odpt.types.Unset object>,
odptcalendar: Unset | str = <python_odpt.types.Unset object>,
odpttrain: Unset | str = <python_odpt.types.Unset object>,
odpttrain_type: Unset | str = <python_odpt.types.Unset object>,
odpttrain_name: Unset | List[ForwardRef('MultilingualTitle')] = <python_odpt.types.Unset object>,
odpttrain_owner: Unset | str = <python_odpt.types.Unset object>,
odptorigin_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptdestination_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptvia_station: Unset | List[str] = <python_odpt.types.Unset object>,
odptvia_railway: Unset | List[str] = <python_odpt.types.Unset object>,
odptprevious_train_timetable: Unset | List[str] = <python_odpt.types.Unset object>,
odptnext_train_timetable: Unset | List[str] = <python_odpt.types.Unset object>,
odptneed_extra_fee: Unset | bool = <python_odpt.types.Unset object>,
odptnote: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties列車時刻表
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:TrainTimetableType- クラス名 Example: odpt:TrainTimetable.
dcdate:str- ISO8601 日付時刻形式
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptrailway:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_number:str- 列車番号 Example: 123M.
- odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example:
- [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'},
- {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}].
dctissued:Union[Unset, str]- ISO8601 日付形式
dctvalid:Union[Unset, str]- ISO8601 日付時刻形式
odptrail_direction:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptcalendar:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odpttrain_type:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 - odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en':
- 'Musashi'}].
odpttrain_owner:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptorigin_station:Union[Unset, List[str]]- 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo'].
odptdestination_station:Union[Unset, List[str]]- 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao'].
odptvia_station:Union[Unset, List[str]]- 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi'].
odptvia_railway:Union[Unset, List[str]]- 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai'].
odptprevious_train_timetable:Union[Unset, List[str]]- 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday'].
odptnext_train_timetable:Union[Unset, List[str]]- 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday'].
odptneed_extra_fee:Union[Unset, bool]- 乗車券の他に別料金が必要か Example: True.
odptnote:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class TrainTimetable.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctissued-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctvalid-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptcalendar-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdestination_station-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptneed_extra_fee-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnext_train_timetable-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptorigin_station-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptprevious_train_timetable-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrail_direction-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptrailway-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_name-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_number-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_owner-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_timetable_object-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_type-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_railway-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptvia_station-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class TrainTimetable: """列車時刻表 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTimetableType): クラス名 Example: odpt:TrainTimetable. dcdate (str): ISO8601 日付時刻形式 owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptrailway (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_number (str): 列車番号 Example: 123M. odpttrain_timetable_object (List['TrainTimetableObject']): 出発時刻と出発駅の組か、到着時刻と到着駅の組のリスト Example: [{'odpt:departureTime': '06:00', 'odpt:departureStation': 'odpt.Station:JR-East.ChuoRapid.Tokyo'}, {'odpt:arrivalTime': '07:00', 'odpt:arrivalStation': 'odpt.Station:JR-East.ChuoRapid.Takao'}]. dctissued (Union[Unset, str]): ISO8601 日付形式 dctvalid (Union[Unset, str]): ISO8601 日付時刻形式 odptrail_direction (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptcalendar (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_type (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odpttrain_name (Union[Unset, List['MultilingualTitle']]): 編成の名称・愛称のリスト Example: [{'ja': 'むさし', 'en': 'Musashi'}]. odpttrain_owner (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptorigin_station (Union[Unset, List[str]]): 列車の始発駅を表すIDのリスト Example: ['odpt.Station:JR-East.ChuoRapid.Tokyo']. odptdestination_station (Union[Unset, List[str]]): 列車の終着駅を表すIDのリスト Example: ['odpt.Station:JR- East.ChuoRapid.Takao']. odptvia_station (Union[Unset, List[str]]): 列車の経由駅を表すIDのリスト Example: ['odpt.Station:TokyoMetro.Tozai.NishiFunabashi']. odptvia_railway (Union[Unset, List[str]]): 列車の経由路線を表すIDのリスト Example: ['odpt.Railway:TokyoMetro.Tozai']. odptprevious_train_timetable (Union[Unset, List[str]]): 直前の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptnext_train_timetable (Union[Unset, List[str]]): 直後の列車時刻表を表すIDのリスト Example: ['odpt.TrainTimetable:JR- East.ChuoRapid.123M.Weekday']. odptneed_extra_fee (Union[Unset, bool]): 乗車券の他に別料金が必要か Example: True. odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTimetableType dcdate: str owlsame_as: str odptoperator: str odptrailway: str odpttrain_number: str odpttrain_timetable_object: List["TrainTimetableObject"] dctissued: Union[Unset, str] = UNSET dctvalid: Union[Unset, str] = UNSET odptrail_direction: Union[Unset, str] = UNSET odptcalendar: Union[Unset, str] = UNSET odpttrain: Union[Unset, str] = UNSET odpttrain_type: Union[Unset, str] = UNSET odpttrain_name: Union[Unset, List["MultilingualTitle"]] = UNSET odpttrain_owner: Union[Unset, str] = UNSET odptorigin_station: Union[Unset, List[str]] = UNSET odptdestination_station: Union[Unset, List[str]] = UNSET odptvia_station: Union[Unset, List[str]] = UNSET odptvia_railway: Union[Unset, List[str]] = UNSET odptprevious_train_timetable: Union[Unset, List[str]] = UNSET odptnext_train_timetable: Union[Unset, List[str]] = UNSET odptneed_extra_fee: Union[Unset, bool] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle from ..models.train_timetable_object import TrainTimetableObject d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTimetableType(d.pop("@type")) dcdate = d.pop("dc:date") owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") odptrailway = d.pop("odpt:railway") odpttrain_number = d.pop("odpt:trainNumber") odpttrain_timetable_object = [] _odpttrain_timetable_object = d.pop("odpt:trainTimetableObject") for odpttrain_timetable_object_item_data in _odpttrain_timetable_object: odpttrain_timetable_object_item = TrainTimetableObject.from_dict(odpttrain_timetable_object_item_data) odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = d.pop("dct:issued", UNSET) dctvalid = d.pop("dct:valid", UNSET) odptrail_direction = d.pop("odpt:railDirection", UNSET) odptcalendar = d.pop("odpt:calendar", UNSET) odpttrain = d.pop("odpt:train", UNSET) odpttrain_type = d.pop("odpt:trainType", UNSET) odpttrain_name = [] _odpttrain_name = d.pop("odpt:trainName", UNSET) for odpttrain_name_item_data in _odpttrain_name or []: odpttrain_name_item = MultilingualTitle.from_dict(odpttrain_name_item_data) odpttrain_name.append(odpttrain_name_item) odpttrain_owner = d.pop("odpt:trainOwner", UNSET) odptorigin_station = cast(List[str], d.pop("odpt:originStation", UNSET)) odptdestination_station = cast(List[str], d.pop("odpt:destinationStation", UNSET)) odptvia_station = cast(List[str], d.pop("odpt:viaStation", UNSET)) odptvia_railway = cast(List[str], d.pop("odpt:viaRailway", UNSET)) odptprevious_train_timetable = cast(List[str], d.pop("odpt:previousTrainTimetable", UNSET)) odptnext_train_timetable = cast(List[str], d.pop("odpt:nextTrainTimetable", UNSET)) odptneed_extra_fee = d.pop("odpt:needExtraFee", UNSET) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable = cls( context=context, id=id, type=type, dcdate=dcdate, owlsame_as=owlsame_as, odptoperator=odptoperator, odptrailway=odptrailway, odpttrain_number=odpttrain_number, odpttrain_timetable_object=odpttrain_timetable_object, dctissued=dctissued, dctvalid=dctvalid, odptrail_direction=odptrail_direction, odptcalendar=odptcalendar, odpttrain=odpttrain, odpttrain_type=odpttrain_type, odpttrain_name=odpttrain_name, odpttrain_owner=odpttrain_owner, odptorigin_station=odptorigin_station, odptdestination_station=odptdestination_station, odptvia_station=odptvia_station, odptvia_railway=odptvia_railway, odptprevious_train_timetable=odptprevious_train_timetable, odptnext_train_timetable=odptnext_train_timetable, odptneed_extra_fee=odptneed_extra_fee, odptnote=odptnote, ) train_timetable.additional_properties = d return train_timetable @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value dcdate = self.dcdate owlsame_as = self.owlsame_as odptoperator = self.odptoperator odptrailway = self.odptrailway odpttrain_number = self.odpttrain_number odpttrain_timetable_object = [] for odpttrain_timetable_object_item_data in self.odpttrain_timetable_object: odpttrain_timetable_object_item = odpttrain_timetable_object_item_data.to_dict() odpttrain_timetable_object.append(odpttrain_timetable_object_item) dctissued = self.dctissued dctvalid = self.dctvalid odptrail_direction = self.odptrail_direction odptcalendar = self.odptcalendar odpttrain = self.odpttrain odpttrain_type = self.odpttrain_type odpttrain_name: Union[Unset, List[Dict[str, Any]]] = UNSET if not isinstance(self.odpttrain_name, Unset): odpttrain_name = [] for odpttrain_name_item_data in self.odpttrain_name: odpttrain_name_item = odpttrain_name_item_data.to_dict() odpttrain_name.append(odpttrain_name_item) odpttrain_owner = self.odpttrain_owner odptorigin_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptorigin_station, Unset): odptorigin_station = self.odptorigin_station odptdestination_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptdestination_station, Unset): odptdestination_station = self.odptdestination_station odptvia_station: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_station, Unset): odptvia_station = self.odptvia_station odptvia_railway: Union[Unset, List[str]] = UNSET if not isinstance(self.odptvia_railway, Unset): odptvia_railway = self.odptvia_railway odptprevious_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptprevious_train_timetable, Unset): odptprevious_train_timetable = self.odptprevious_train_timetable odptnext_train_timetable: Union[Unset, List[str]] = UNSET if not isinstance(self.odptnext_train_timetable, Unset): odptnext_train_timetable = self.odptnext_train_timetable odptneed_extra_fee = self.odptneed_extra_fee odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "dc:date": dcdate, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, "odpt:railway": odptrailway, "odpt:trainNumber": odpttrain_number, "odpt:trainTimetableObject": odpttrain_timetable_object, } ) if dctissued is not UNSET: field_dict["dct:issued"] = dctissued if dctvalid is not UNSET: field_dict["dct:valid"] = dctvalid if odptrail_direction is not UNSET: field_dict["odpt:railDirection"] = odptrail_direction if odptcalendar is not UNSET: field_dict["odpt:calendar"] = odptcalendar if odpttrain is not UNSET: field_dict["odpt:train"] = odpttrain if odpttrain_type is not UNSET: field_dict["odpt:trainType"] = odpttrain_type if odpttrain_name is not UNSET: field_dict["odpt:trainName"] = odpttrain_name if odpttrain_owner is not UNSET: field_dict["odpt:trainOwner"] = odpttrain_owner if odptorigin_station is not UNSET: field_dict["odpt:originStation"] = odptorigin_station if odptdestination_station is not UNSET: field_dict["odpt:destinationStation"] = odptdestination_station if odptvia_station is not UNSET: field_dict["odpt:viaStation"] = odptvia_station if odptvia_railway is not UNSET: field_dict["odpt:viaRailway"] = odptvia_railway if odptprevious_train_timetable is not UNSET: field_dict["odpt:previousTrainTimetable"] = odptprevious_train_timetable if odptnext_train_timetable is not UNSET: field_dict["odpt:nextTrainTimetable"] = odptnext_train_timetable if odptneed_extra_fee is not UNSET: field_dict["odpt:needExtraFee"] = odptneed_extra_fee if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class TrainTimetableObject (odptarrival_time: Unset | str = <python_odpt.types.Unset object>,
odptarrival_station: Unset | str = <python_odpt.types.Unset object>,
odptdeparture_time: Unset | str = <python_odpt.types.Unset object>,
odptdeparture_station: Unset | str = <python_odpt.types.Unset object>,
odptplatform_number: Unset | str = <python_odpt.types.Unset object>,
odptplatform_name: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>,
odptnote: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties列車時刻表オブジェクト
Attributes
odptarrival_time:Union[Unset, str]- ISO8601 時刻形式
odptarrival_station:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptdeparture_time:Union[Unset, str]- ISO8601 時刻形式
odptdeparture_station:Union[Unset, str]- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptplatform_number:Union[Unset, str]- プラットフォームの番号 Example: 1.
odptplatform_name:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
odptnote:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class TrainTimetableObject.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_station-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptarrival_time-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_station-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptdeparture_time-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptnote-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptplatform_name-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptplatform_number-
Expand source code
@_attrs_define class TrainTimetableObject: """列車時刻表オブジェクト Attributes: odptarrival_time (Union[Unset, str]): ISO8601 時刻形式 odptarrival_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptdeparture_time (Union[Unset, str]): ISO8601 時刻形式 odptdeparture_station (Union[Unset, str]): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptplatform_number (Union[Unset, str]): プラットフォームの番号 Example: 1. odptplatform_name (Union[Unset, MultilingualTitle]): 多言語対応のタイトル odptnote (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ odptarrival_time: Union[Unset, str] = UNSET odptarrival_station: Union[Unset, str] = UNSET odptdeparture_time: Union[Unset, str] = UNSET odptdeparture_station: Union[Unset, str] = UNSET odptplatform_number: Union[Unset, str] = UNSET odptplatform_name: Union[Unset, "MultilingualTitle"] = UNSET odptnote: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() odptarrival_time = d.pop("odpt:arrivalTime", UNSET) odptarrival_station = d.pop("odpt:arrivalStation", UNSET) odptdeparture_time = d.pop("odpt:departureTime", UNSET) odptdeparture_station = d.pop("odpt:departureStation", UNSET) odptplatform_number = d.pop("odpt:platformNumber", UNSET) _odptplatform_name = d.pop("odpt:platformName", UNSET) odptplatform_name: Union[Unset, MultilingualTitle] if isinstance(_odptplatform_name, Unset) or _odptplatform_name is None: odptplatform_name = UNSET else: odptplatform_name = MultilingualTitle.from_dict(_odptplatform_name) _odptnote = d.pop("odpt:note", UNSET) odptnote: Union[Unset, MultilingualTitle] if isinstance(_odptnote, Unset) or _odptnote is None: odptnote = UNSET else: odptnote = MultilingualTitle.from_dict(_odptnote) train_timetable_object = cls( odptarrival_time=odptarrival_time, odptarrival_station=odptarrival_station, odptdeparture_time=odptdeparture_time, odptdeparture_station=odptdeparture_station, odptplatform_number=odptplatform_number, odptplatform_name=odptplatform_name, odptnote=odptnote, ) train_timetable_object.additional_properties = d return train_timetable_object @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: odptarrival_time = self.odptarrival_time odptarrival_station = self.odptarrival_station odptdeparture_time = self.odptdeparture_time odptdeparture_station = self.odptdeparture_station odptplatform_number = self.odptplatform_number odptplatform_name: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptplatform_name, Unset): odptplatform_name = self.odptplatform_name.to_dict() odptnote: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odptnote, Unset): odptnote = self.odptnote.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update({}) if odptarrival_time is not UNSET: field_dict["odpt:arrivalTime"] = odptarrival_time if odptarrival_station is not UNSET: field_dict["odpt:arrivalStation"] = odptarrival_station if odptdeparture_time is not UNSET: field_dict["odpt:departureTime"] = odptdeparture_time if odptdeparture_station is not UNSET: field_dict["odpt:departureStation"] = odptdeparture_station if odptplatform_number is not UNSET: field_dict["odpt:platformNumber"] = odptplatform_number if odptplatform_name is not UNSET: field_dict["odpt:platformName"] = odptplatform_name if odptnote is not UNSET: field_dict["odpt:note"] = odptnote return field_dict
class TrainTimetableType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class TrainTimetableType(str, Enum): ODPTTRAINTIMETABLE = "odpt:TrainTimetable" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTTRAINTIMETABLE
class TrainType (context: str,
id: str,
type: TrainTypeType,
owlsame_as: str,
odptoperator: str,
dcdate: Unset | str = <python_odpt.types.Unset object>,
dctitle: Unset | str = <python_odpt.types.Unset object>,
odpttrain_type_title: Unset | ForwardRef('MultilingualTitle') = <python_odpt.types.Unset object>)-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties列車種別
Attributes
context:str- JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld.
id:str- 固有識別子
type:TrainTypeType- クラス名 Example: odpt:TrainType.
owlsame_as:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 odptoperator:str- 固有識別子の別名 多くが
odpt.hoge:fuga形式 dcdate:Union[Unset, str]- ISO8601 日付時刻形式
dctitle:Union[Unset, str]- 列車種別(日本語) Example: 普通.
odpttrain_type_title:Union[Unset, MultilingualTitle]- 多言語対応のタイトル
Method generated by attrs for class TrainType.
Static methods
def from_dict(src_dict: Dict[str, Any]) ‑> ~T
Instance variables
prop additional_keys : List[str]-
Expand source code
@property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) var additional_properties-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var context-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dcdate-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var dctitle-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var id-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odptoperator-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var odpttrain_type_title-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var owlsame_as-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties var type-
Expand source code
@_attrs_define class TrainType: """列車種別 Attributes: context (str): JSON-LD仕様に基づく @context のURL Example: http://vocab.odpt.org/context_odpt.jsonld. id (str): 固有識別子 type (TrainTypeType): クラス名 Example: odpt:TrainType. owlsame_as (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 odptoperator (str): 固有識別子の別名 多くが`odpt.hoge:fuga`形式 dcdate (Union[Unset, str]): ISO8601 日付時刻形式 dctitle (Union[Unset, str]): 列車種別(日本語) Example: 普通. odpttrain_type_title (Union[Unset, MultilingualTitle]): 多言語対応のタイトル """ context: str id: str type: TrainTypeType owlsame_as: str odptoperator: str dcdate: Union[Unset, str] = UNSET dctitle: Union[Unset, str] = UNSET odpttrain_type_title: Union[Unset, "MultilingualTitle"] = UNSET additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict @classmethod def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: from ..models.multilingual_title import MultilingualTitle d = src_dict.copy() context = d.pop("@context") id = d.pop("@id") type = TrainTypeType(d.pop("@type")) owlsame_as = d.pop("owl:sameAs") odptoperator = d.pop("odpt:operator") dcdate = d.pop("dc:date", UNSET) dctitle = d.pop("dc:title", UNSET) _odpttrain_type_title = d.pop("odpt:trainTypeTitle", UNSET) odpttrain_type_title: Union[Unset, MultilingualTitle] if isinstance(_odpttrain_type_title, Unset) or _odpttrain_type_title is None: odpttrain_type_title = UNSET else: odpttrain_type_title = MultilingualTitle.from_dict(_odpttrain_type_title) train_type = cls( context=context, id=id, type=type, owlsame_as=owlsame_as, odptoperator=odptoperator, dcdate=dcdate, dctitle=dctitle, odpttrain_type_title=odpttrain_type_title, ) train_type.additional_properties = d return train_type @property def additional_keys(self) -> List[str]: return list(self.additional_properties.keys()) def __getitem__(self, key: str) -> Any: return self.additional_properties[key] def __setitem__(self, key: str, value: Any) -> None: self.additional_properties[key] = value def __delitem__(self, key: str) -> None: del self.additional_properties[key] def __contains__(self, key: str) -> bool: return key in self.additional_properties
Methods
def to_dict(self) ‑> Dict[str, Any]-
Expand source code
def to_dict(self) -> Dict[str, Any]: context = self.context id = self.id type = self.type.value owlsame_as = self.owlsame_as odptoperator = self.odptoperator dcdate = self.dcdate dctitle = self.dctitle odpttrain_type_title: Union[Unset, Dict[str, Any]] = UNSET if not isinstance(self.odpttrain_type_title, Unset): odpttrain_type_title = self.odpttrain_type_title.to_dict() field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) field_dict.update( { "@context": context, "@id": id, "@type": type, "owl:sameAs": owlsame_as, "odpt:operator": odptoperator, } ) if dcdate is not UNSET: field_dict["dc:date"] = dcdate if dctitle is not UNSET: field_dict["dc:title"] = dctitle if odpttrain_type_title is not UNSET: field_dict["odpt:trainTypeTitle"] = odpttrain_type_title return field_dict
class TrainTypeType (value, names=None, *, module=None, qualname=None, type=None, start=1)-
Expand source code
class TrainTypeType(str, Enum): ODPTTRAINTYPE = "odpt:TrainType" def __str__(self) -> str: return str(self.value)An enumeration.
Ancestors
- builtins.str
- enum.Enum
Class variables
var ODPTTRAINTYPE