From 2c64f9f838a6621aed6943b3ceb762064b9fd55d Mon Sep 17 00:00:00 2001 From: bot <73154172+code-automation@users.noreply.github.com> Date: Sat, 10 Jul 2021 09:47:49 +0800 Subject: [PATCH] chore(api): openapi specifications update (#68) * chore(api): openapi specifications update * chore: remove workaround for bus v2 * docs: update changelog for v0.11.0 Co-authored-by: minchao Co-authored-by: minchao --- CHANGELOG.md | 15 +- README.md | 2 +- .../client/air/air_api_airport_parameters.go | 2 +- .../air/air_api_m_e_t_a_r1_parameters.go | 2 +- .../air/air_api_m_e_t_a_r_parameters.go | 2 +- air/v2/client/air/air_client.go | 4 +- ...vice_d_t_o_air_specification_v2_airline.go | 25 +- ...vice_d_t_o_air_specification_v2_airport.go | 27 +- ...t_o_air_specification_v2_airport_f_id_s.go | 13 +- ...e_d_t_o_air_specification_v2_code_share.go | 4 +- ...rvice_d_t_o_air_specification_v2_f_id_s.go | 190 +- ...t_o_air_specification_v2_f_id_s_arrival.go | 109 +- ...o_air_specification_v2_f_id_s_departure.go | 109 +- ...pecification_v2_general_flight_schedule.go | 37 +- ...ce_d_t_o_air_specification_v2_m_e_t_a_r.go | 42 +- ..._shared_specification_v2_base_name_type.go | 4 +- ...shared_specification_v2_base_point_type.go | 2 +- ...vailability_all_city_near_by_parameters.go | 2 +- ...api_station_all_city_near_by_parameters.go | 2 +- .../bike/bike_api_station_parameters.go | 2 +- ...bike_specification_v2_bike_availability.go | 36 +- ..._d_t_o_bike_specification_v2_bike_shape.go | 31 +- ..._t_o_bike_specification_v2_bike_station.go | 42 +- ..._shared_specification_v2_base_name_type.go | 4 +- ...shared_specification_v2_base_point_type.go | 2 +- ..._d_t_o_bus_specification_v2_bus_a1_data.go | 112 +- ..._d_t_o_bus_specification_v2_bus_a2_data.go | 116 +- ...ce_d_t_o_bus_specification_v2_bus_alert.go | 113 +- ...cification_v2_bus_display_stop_of_route.go | 9 +- ...ice_d_t_o_bus_specification_v2_bus_fare.go | 8 +- ...ecification_v2_bus_first_last_trip_info.go | 9 +- ...v2_bus_first_last_trip_info_service_day.go | 44 +- ...s_specification_v2_bus_n1_estimate_time.go | 143 +- ...ice_d_t_o_bus_specification_v2_bus_news.go | 81 +- ...d_t_o_bus_specification_v2_bus_o_d_fare.go | 2 +- ...ce_d_t_o_bus_specification_v2_bus_route.go | 9 +- ...t_o_bus_specification_v2_bus_route_fare.go | 19 +- ...us_specification_v2_bus_route_fare_fare.go | 8 +- ..._bus_specification_v2_bus_route_network.go | 7 +- ...s_specification_v2_bus_s2_s_travel_time.go | 9 +- ...d_t_o_bus_specification_v2_bus_schedule.go | 9 +- ...ce_d_t_o_bus_specification_v2_bus_shape.go | 9 +- ...t_o_bus_specification_v2_bus_stage_fare.go | 2 +- ..._d_t_o_bus_specification_v2_bus_station.go | 7 +- ..._bus_specification_v2_bus_station_group.go | 7 +- ...ice_d_t_o_bus_specification_v2_bus_stop.go | 7 +- ..._bus_specification_v2_bus_stop_of_route.go | 9 +- ..._t_o_bus_specification_v2_bus_sub_route.go | 2 +- ...o_bus_specification_v2_bus_vehicle_info.go | 9 +- ..._d_t_o_bus_specification_v2_bus_version.go | 14 +- ...s_specification_v2_embedded_service_day.go | 32 +- ..._t_o_bus_specification_v2_embedded_stop.go | 4 +- ..._d_t_o_bus_specification_v2_n1_estimate.go | 4 +- ..._d_t_o_bus_specification_v2_scope_route.go | 2 +- ..._o_bus_specification_v2_scope_sub_route.go | 2 +- ...e_d_t_o_bus_specification_v2_scope_trip.go | 2 +- ...ecification_v2_section_fare_buffer_zone.go | 2 +- ..._d_t_o_bus_specification_v2_special_day.go | 4 +- ...o_shared_specification_v2_base_operator.go | 7 +- ..._o_shared_specification_v3_base_inbound.go | 11 +- ...o_shared_specification_v3_base_outbound.go | 11 +- ...vice_d_t_o_bus_specification_v3_a1_data.go | 76 +- ...vice_d_t_o_bus_specification_v3_a2_data.go | 80 +- ...ervice_d_t_o_bus_specification_v3_alert.go | 80 +- ...o_bus_specification_v3_daily_time_table.go | 11 +- ..._specification_v3_display_stop_of_route.go | 4 +- ...s_specification_v3_first_last_trip_info.go | 4 +- ...vice_d_t_o_bus_specification_v3_n1_data.go | 43 +- ...service_d_t_o_bus_specification_v3_news.go | 68 +- ...ervice_d_t_o_bus_specification_v3_route.go | 4 +- ...e_d_t_o_bus_specification_v3_route_fare.go | 12 +- ...us_specification_v3_route_fare_o_d_fare.go | 4 +- ...ication_v3_route_fare_o_d_fare_fare_o_d.go | 8 +- ..._v3_route_fare_section_fare_buffer_zone.go | 4 +- ...v3_route_fare_section_fare_fare_section.go | 8 +- ..._specification_v3_route_fare_stage_fare.go | 4 +- ...ion_v3_route_fare_stage_fare_fare_stage.go | 8 +- ...on_v3_route_fare_stage_fare_service_day.go | 44 +- ...ice_d_t_o_bus_specification_v3_schedule.go | 4 +- ...s_specification_v3_schedule_service_day.go | 44 +- ...s_specification_v3_schedule_special_day.go | 4 +- ...ervice_d_t_o_bus_specification_v3_shape.go | 4 +- ..._t_o_bus_specification_v3_stop_of_route.go | 4 +- ...bus_specification_v3_stop_of_route_stop.go | 4 +- ...ce_d_t_o_bus_specification_v3_sub_route.go | 4 +- ...vice_d_t_o_bus_specification_v3_vehicle.go | 29 +- ...ice_d_t_o_bus_specification_v3_schedule.go | 42 +- ...ervice_d_t_o_bus_specification_v3_depot.go | 14 +- ..._specification_v3_display_stop_of_route.go | 14 +- ...s_specification_v3_first_last_trip_info.go | 14 +- ...vice_d_t_o_bus_specification_v3_network.go | 14 +- ...ice_d_t_o_bus_specification_v3_operator.go | 14 +- ...ervice_d_t_o_bus_specification_v3_route.go | 14 +- ..._t_o_bus_specification_v3_route_network.go | 14 +- ...o_bus_specification_v3_s2_s_travel_time.go | 14 +- ...ervice_d_t_o_bus_specification_v3_shape.go | 14 +- ...vice_d_t_o_bus_specification_v3_station.go | 14 +- ...service_d_t_o_bus_specification_v3_stop.go | 14 +- ..._t_o_bus_specification_v3_stop_of_route.go | 14 +- ...ce_d_t_o_bus_specification_v3_sub_route.go | 14 +- ...vice_d_t_o_bus_specification_v3_vehicle.go | 14 +- ..._t_o_bus_specification_v3_vehicle_depot.go | 14 +- ..._t_o_bus_specification_v3_vehicle_route.go | 14 +- ...vice_d_t_o_bus_specification_v3_a1_data.go | 14 +- ...vice_d_t_o_bus_specification_v3_a2_data.go | 14 +- ...ervice_d_t_o_bus_specification_v3_alert.go | 14 +- ...o_bus_specification_v3_daily_time_table.go | 14 +- ...vice_d_t_o_bus_specification_v3_n1_data.go | 14 +- ...service_d_t_o_bus_specification_v3_news.go | 14 +- ...e_d_t_o_bus_specification_v3_route_fare.go | 14 +- ..._o_shared_specification_v3_base_inbound.go | 11 +- ...o_shared_specification_v3_base_outbound.go | 11 +- oas.air.v2.json | 904 ++- oas.bike.v2.json | 227 +- oas.bus.v2.json | 288 +- oas.bus.v3.json | 387 +- oas.rail.v2.json | 454 +- oas.rail.v3.json | 5569 +++++++++++++---- oas.tourism.v2.json | 3054 +++++---- .../metro_api_station_exit_parameters.go | 2 +- .../metro/metro_api_station_parameters.go | 2 +- ...r_api_available_seat_status1_parameters.go | 10 +- ...i_available_seat_status_o_d1_parameters.go | 10 +- ...i_available_seat_status_o_d2_parameters.go | 10 +- ...pi_available_seat_status_o_d_parameters.go | 10 +- ...t_h_s_r_api_daily_timetable2_parameters.go | 10 +- ...t_h_s_r_api_daily_timetable3_parameters.go | 10 +- ..._h_s_r_api_daily_train_info2_parameters.go | 10 +- ..._h_s_r_api_daily_train_info3_parameters.go | 10 +- ..._s_r_api_o_d_daily_timetable_parameters.go | 10 +- .../t_h_s_r_api_station_exit_parameters.go | 2 +- .../t_h_s_r/t_h_s_r_api_station_parameters.go | 2 +- ..._h_s_r_api_station_timetable_parameters.go | 10 +- .../t_r_a_api_daily_timetable2_parameters.go | 10 +- .../t_r_a_api_daily_timetable3_parameters.go | 10 +- .../t_r_a_api_daily_train_info2_parameters.go | 10 +- .../t_r_a_api_daily_train_info3_parameters.go | 10 +- ..._r_a_api_o_d_daily_timetable_parameters.go | 10 +- .../t_r_a/t_r_a_api_station_parameters.go | 2 +- .../t_r_a_api_station_timetable_parameters.go | 10 +- ...d_t_o_rail_specification_v2_metro_alert.go | 16 +- ...ification_v2_metro_m_r_t_news_list_news.go | 16 +- ...ification_v2_t_h_s_r_old_available_seat.go | 21 +- ...specification_v2_t_h_s_r_available_seat.go | 42 +- ...ification_v2_t_h_s_r_o_d_available_seat.go | 42 +- ...d_t_o_rail_specification_v2_metro_alert.go | 82 +- ...ification_v2_metro_first_last_timetable.go | 14 +- ...o_rail_specification_v2_metro_frequency.go | 14 +- ..._d_t_o_rail_specification_v2_metro_line.go | 14 +- ...il_specification_v2_metro_line_transfer.go | 18 +- ..._rail_specification_v2_metro_live_board.go | 14 +- ...ification_v2_metro_m_r_t_news_list_news.go | 64 +- ...rail_specification_v2_metro_metro_shape.go | 7 +- ...t_o_rail_specification_v2_metro_network.go | 14 +- ..._o_rail_specification_v2_metro_o_d_fare.go | 14 +- ...d_t_o_rail_specification_v2_metro_route.go | 14 +- ...specification_v2_metro_s2_s_travel_time.go | 14 +- ...t_o_rail_specification_v2_metro_station.go | 14 +- ...ail_specification_v2_metro_station_exit.go | 14 +- ...specification_v2_metro_station_facility.go | 14 +- ..._specification_v2_metro_station_of_line.go | 14 +- ...specification_v2_metro_station_of_route.go | 14 +- ...ecification_v2_metro_station_time_table.go | 18 +- ...fication_v2_metro_sub_class_special_day.go | 14 +- ...ail_specification_v2_t_h_s_r_alert_info.go | 60 +- ...specification_v2_t_h_s_r_available_seat.go | 4 +- ...cification_v2_t_h_s_r_general_timetable.go | 7 +- ..._t_o_rail_specification_v2_t_h_s_r_news.go | 30 +- ...ification_v2_t_h_s_r_old_available_seat.go | 11 +- ...ication_v2_t_h_s_r_rail_daily_timetable.go | 7 +- ...cation_v2_t_h_s_r_rail_daily_train_info.go | 11 +- ...ation_v2_t_h_s_r_rail_general_timetable.go | 19 +- ...tion_v2_t_h_s_r_rail_general_train_info.go | 4 +- ...ion_v2_t_h_s_r_rail_o_d_daily_timetable.go | 7 +- ..._specification_v2_t_h_s_r_rail_o_d_fare.go | 18 +- ...l_specification_v2_t_h_s_r_rail_station.go | 7 +- ...ation_v2_t_h_s_r_rail_station_timetable.go | 11 +- ...il_specification_v2_t_h_s_r_service_day.go | 28 +- ...l_specification_v2_t_h_s_r_station_exit.go | 14 +- ..._specification_v2_t_h_s_r_t_h_s_r_shape.go | 7 +- ...t_h_s_r_time_info_rail_daily_train_info.go | 4 +- ...pecification_v2_t_r_a_general_timetable.go | 21 +- ..._d_t_o_rail_specification_v2_t_r_a_line.go | 7 +- ...t_o_rail_specification_v2_t_r_a_network.go | 7 +- ...ification_v2_t_r_a_rail_daily_timetable.go | 7 +- ...fication_v2_t_r_a_rail_daily_train_info.go | 43 +- ...ication_v2_t_r_a_rail_general_timetable.go | 19 +- ...cation_v2_t_r_a_rail_general_train_info.go | 39 +- ..._specification_v2_t_r_a_rail_live_board.go | 22 +- ...fication_v2_t_r_a_rail_live_train_delay.go | 14 +- ...ation_v2_t_r_a_rail_o_d_daily_timetable.go | 7 +- ...il_specification_v2_t_r_a_rail_o_d_fare.go | 11 +- ...ail_specification_v2_t_r_a_rail_station.go | 7 +- ...ication_v2_t_r_a_rail_station_timetable.go | 15 +- ...rail_specification_v2_t_r_a_service_day.go | 28 +- ..._specification_v2_t_r_a_station_of_line.go | 7 +- ...rail_specification_v2_t_r_a_t_r_a_shape.go | 7 +- ...2_t_r_a_time_info_rail_daily_train_info.go | 32 +- ...t_r_a_time_info_rail_general_train_info.go | 32 +- ..._rail_specification_v2_t_r_a_train_type.go | 7 +- ...o_shared_specification_v2_base_operator.go | 7 +- rail/v3/client/a_f_r/afr_client.go | 585 ++ ...ain_general_train_timetable1_parameters.go | 394 ++ ...rain_general_train_timetable1_responses.go | 94 + ...rain_general_train_timetable_parameters.go | 372 ++ ...train_general_train_timetable_responses.go | 94 + .../a_f_r/lite_train_line_parameters.go | 372 ++ .../client/a_f_r/lite_train_line_responses.go | 94 + .../a_f_r/lite_train_network_parameters.go | 372 ++ .../a_f_r/lite_train_network_responses.go | 94 + .../a_f_r/lite_train_news_parameters.go | 372 ++ .../client/a_f_r/lite_train_news_responses.go | 94 + .../a_f_r/lite_train_o_d_fare1_parameters.go | 416 ++ .../a_f_r/lite_train_o_d_fare1_responses.go | 94 + .../a_f_r/lite_train_o_d_fare_parameters.go | 372 ++ .../a_f_r/lite_train_o_d_fare_responses.go | 94 + .../a_f_r/lite_train_operator_parameters.go | 372 ++ .../a_f_r/lite_train_operator_responses.go | 94 + .../a_f_r/lite_train_route_parameters.go | 372 ++ .../a_f_r/lite_train_route_responses.go | 94 + .../lite_train_station_of_line_parameters.go | 372 ++ .../lite_train_station_of_line_responses.go | 94 + .../lite_train_station_of_route_parameters.go | 372 ++ .../lite_train_station_of_route_responses.go | 94 + .../a_f_r/lite_train_station_parameters.go | 406 ++ .../a_f_r/lite_train_station_responses.go | 94 + .../a_f_r/lite_train_train_type_parameters.go | 372 ++ .../a_f_r/lite_train_train_type_responses.go | 94 + .../client/m_o_t_c_transport_api_v3_client.go | 5 + ...me_table_api_controller_get2_parameters.go | 10 +- ...me_table_api_controller_get2_parameters.go | 10 +- ...me_table_api_controller_get3_parameters.go | 10 +- ...me_table_api_controller_get4_parameters.go | 10 +- .../station_api_controller_get_parameters.go | 2 +- ...o_rail_specification_v3_lite_train_line.go | 223 + ...ification_v3_lite_train_network_network.go | 223 + ...il_specification_v3_lite_train_operator.go | 223 + ..._rail_specification_v3_lite_train_route.go | 223 + ...ail_specification_v3_lite_train_station.go | 223 + ...e_train_station_of_line_station_of_line.go | 223 + ...train_station_of_route_station_of_route.go | 223 + ..._specification_v3_lite_train_train_type.go | 223 + ...n_v3_lite_train_general_train_timetable.go | 282 + ...ication_v3_lite_train_o_d_fare_o_d_fare.go | 238 + ...v3_lite_train_lite_train_news_list_news.go | 223 + ..._d_t_o_rail_specification_v3_t_r_a_line.go | 16 +- ...tion_v3_t_r_a_line_network_line_network.go | 16 +- ...il_specification_v3_t_r_a_line_transfer.go | 16 +- ..._specification_v3_t_r_a_network_network.go | 16 +- ..._o_rail_specification_v3_t_r_a_operator.go | 16 +- ...d_t_o_rail_specification_v3_t_r_a_shape.go | 16 +- ...t_o_rail_specification_v3_t_r_a_station.go | 16 +- ...tion_v3_t_r_a_station_exit_station_exit.go | 16 +- ...t_r_a_station_facility_station_facility.go | 16 +- ...3_t_r_a_station_of_line_station_of_line.go | 16 +- ...t_r_a_station_transfer_station_transfer.go | 16 +- ..._rail_specification_v3_t_r_a_train_type.go | 16 +- ...ion_timetable_general_station_timetable.go | 44 +- ...cation_v3_t_r_a_general_train_timetable.go | 44 +- ...pecification_v3_t_r_a_o_d_fare_o_d_fare.go | 16 +- ...ication_v3_t_r_a_t_r_a_alert_list_alert.go | 16 +- ...ification_v3_t_r_a_t_r_a_news_list_news.go | 16 +- ...tion_live_board_list_station_live_board.go | 16 +- ..._train_live_board_list_train_live_board.go | 16 +- ...ation_v3_t_r_a_specific_train_timetable.go | 44 +- ...ly_station_time_table_station_timetable.go | 16 +- ..._daily_train_time_table_train_timetable.go | 16 +- ...cation_v3_lite_train_common_service_day.go | 270 + ...fication_v3_lite_train_common_stop_time.go | 163 + ...ication_v3_lite_train_common_train_info.go | 380 ++ ...n_v3_lite_train_general_train_timetable.go | 171 + ...o_rail_specification_v3_lite_train_line.go | 185 + ...v3_lite_train_lite_train_news_list_news.go | 252 + ...pecification_v3_lite_train_network_line.go | 94 + ...ion_v3_lite_train_network_map_name_type.go | 62 + ...ification_v3_lite_train_network_network.go | 235 + ...ecification_v3_lite_train_o_d_fare_fare.go | 130 + ...ication_v3_lite_train_o_d_fare_o_d_fare.go | 234 + ...il_specification_v3_lite_train_operator.go | 141 + ..._rail_specification_v3_lite_train_route.go | 280 + ...ail_specification_v3_lite_train_station.go | 176 + ...lite_train_station_of_line_line_station.go | 144 + ...e_train_station_of_line_station_of_line.go | 157 + ...te_train_station_of_route_route_station.go | 144 + ...train_station_of_route_station_of_route.go | 221 + ..._specification_v3_lite_train_train_type.go | 125 + ...ecification_v3_t_r_a_common_service_day.go | 44 +- ...ecification_v3_t_r_a_common_special_day.go | 53 +- ...pecification_v3_t_r_a_common_train_info.go | 40 +- ...ly_station_time_table_station_timetable.go | 4 +- ...t_r_a_daily_train_time_table_train_info.go | 40 +- ...ion_timetable_general_station_timetable.go | 4 +- ...pecification_v3_t_r_a_o_d_fare_o_d_fare.go | 4 +- ...d_t_o_rail_specification_v3_t_r_a_shape.go | 7 +- ...ication_v3_t_r_a_t_r_a_alert_list_alert.go | 82 +- ...ification_v3_t_r_a_t_r_a_news_list_news.go | 64 +- ...tion_live_board_list_station_live_board.go | 19 +- ..._train_live_board_list_train_live_board.go | 11 +- spec/main.go | 86 - .../tourism_api_activity0_parameters.go | 2 +- .../tourism_api_activity_parameters.go | 2 +- .../tourism/tourism_api_hotel0_parameters.go | 2 +- .../tourism/tourism_api_hotel_parameters.go | 2 +- .../tourism_api_restaurant0_parameters.go | 2 +- .../tourism_api_restaurant_parameters.go | 2 +- .../tourism_api_scenic_spot0_parameters.go | 7 +- .../tourism_api_scenic_spot_parameters.go | 2 +- tourism/v2/client/tourism/tourism_client.go | 4 +- ..._shared_specification_v2_base_name_type.go | 4 +- ...shared_specification_v2_base_point_type.go | 2 +- ..._specification_v2_activity_tourism_info.go | 102 +- ..._o_tourism_specification_v2_bus_a1_data.go | 111 +- ..._o_tourism_specification_v2_bus_a2_data.go | 119 +- ..._tourism_specification_v2_bus_frequency.go | 8 +- ...m_specification_v2_bus_n1_estimate_time.go | 127 +- ..._t_o_tourism_specification_v2_bus_route.go | 53 +- ...o_tourism_specification_v2_bus_schedule.go | 27 +- ...rism_specification_v2_bus_stop_of_route.go | 25 +- ..._tourism_specification_v2_bus_stop_time.go | 10 +- ..._tourism_specification_v2_bus_sub_route.go | 24 +- ...m_specification_v2_bus_taiwan_trip_news.go | 100 +- ...ion_v2_bus_taiwan_trip_s2_s_travel_time.go | 17 +- ...aiwan_trip_s2_s_travel_time_travel_time.go | 4 +- ..._specification_v2_bus_taiwan_trip_shape.go | 28 +- ..._tourism_specification_v2_bus_timetable.go | 8 +- ..._o_tourism_specification_v2_date_period.go | 4 +- ...ism_specification_v2_hotel_tourism_info.go | 48 +- ...pecification_v2_restaurant_tourism_info.go | 46 +- ...tourism_specification_v2_route_operator.go | 8 +- ...ecification_v2_scenic_spot_tourism_info.go | 60 +- ..._o_tourism_specification_v2_service_day.go | 32 +- ..._o_tourism_specification_v2_special_day.go | 10 +- ...ice_d_t_o_tourism_specification_v2_stop.go | 18 +- ...ourism_specification_v2_tourism_picture.go | 12 +- 334 files changed, 24704 insertions(+), 4766 deletions(-) create mode 100644 rail/v3/client/a_f_r/afr_client.go create mode 100644 rail/v3/client/a_f_r/lite_train_general_train_timetable1_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_general_train_timetable1_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_general_train_timetable_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_general_train_timetable_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_line_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_line_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_network_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_network_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_news_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_news_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_o_d_fare1_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_o_d_fare1_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_o_d_fare_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_o_d_fare_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_operator_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_operator_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_route_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_route_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_station_of_line_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_station_of_line_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_station_of_route_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_station_of_route_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_station_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_station_responses.go create mode 100644 rail/v3/client/a_f_r/lite_train_train_type_parameters.go create mode 100644 rail/v3/client/a_f_r/lite_train_train_type_responses.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go create mode 100644 rail/v3/models/p_t_x_api_rail_model_lite_train_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_service_day.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_stop_time.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_train_info.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_line.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_map_name_type.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_fare.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_line_station.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_route_station.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go create mode 100644 rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e3fe0ff..8c3f03b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,18 @@ ## [Unreleased] +## [0.11.0] - 2021-07-10 + +### Added +- 高雄市公車新資料服務上架 +- 平臺API全面提供HTTP 304狀態碼查詢服務 +- 高雄輕軌V2版資料服務上架 +- 軌道V3版資料服務上架 +- 公車V2版資料服務上架 + +### Removed +- 彰化縣公共自行車服務下架 + ## [0.10.0] - 2021-04-24 ### Added @@ -135,7 +147,8 @@ ### Added - 首次發行,提供基本、航空、公車、軌道、自行車與觀光等 PTX API 用戶端程式庫。 -[Unreleased]: https://github.com/minchao/go-ptx/compare/v0.10.0...HEAD +[Unreleased]: https://github.com/minchao/go-ptx/compare/v0.11.0...HEAD +[0.11.0]: https://github.com/minchao/go-ptx/compare/v0.10.0...v0.11.0 [0.10.0]: https://github.com/minchao/go-ptx/compare/v0.9.0...v0.10.0 [0.9.0]: https://github.com/minchao/go-ptx/compare/v0.8.0...v0.9.0 [0.8.0]: https://github.com/minchao/go-ptx/compare/v0.7.0...v0.8.0 diff --git a/README.md b/README.md index e7dd2221..017711bb 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ go-ptx 使用 [go-swagger](https://github.com/go-swagger/go-swagger) 自動從 P ### 必要條件 -- Go >= 1.12 +- Go >= 1.14 - GNU Make - golangci-lint - go-swagger diff --git a/air/v2/client/air/air_api_airport_parameters.go b/air/v2/client/air/air_api_airport_parameters.go index a907f0b9..a7ddb057 100644 --- a/air/v2/client/air/air_api_airport_parameters.go +++ b/air/v2/client/air/air_api_airport_parameters.go @@ -92,7 +92,7 @@ type AirAPIAirportParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/air/v2/client/air/air_api_m_e_t_a_r1_parameters.go b/air/v2/client/air/air_api_m_e_t_a_r1_parameters.go index 360aa10e..35026de4 100644 --- a/air/v2/client/air/air_api_m_e_t_a_r1_parameters.go +++ b/air/v2/client/air/air_api_m_e_t_a_r1_parameters.go @@ -92,7 +92,7 @@ type AirAPIMETAR1Params struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/air/v2/client/air/air_api_m_e_t_a_r_parameters.go b/air/v2/client/air/air_api_m_e_t_a_r_parameters.go index 6454c193..0cd2790a 100644 --- a/air/v2/client/air/air_api_m_e_t_a_r_parameters.go +++ b/air/v2/client/air/air_api_m_e_t_a_r_parameters.go @@ -92,7 +92,7 @@ type AirAPIMETARParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/air/v2/client/air/air_client.go b/air/v2/client/air/air_client.go index b7257809..ee3a1126 100644 --- a/air/v2/client/air/air_client.go +++ b/air/v2/client/air/air_client.go @@ -79,7 +79,7 @@ func (a *Client) AirAPIAirline(params *AirAPIAirlineParams, opts ...ClientOption ID: "AirApi_Airline", Method: "GET", PathPattern: "/v2/Air/Airline/{IATA}", - ProducesMediaTypes: []string{"application/json", "application/xml", "text/json", "text/plain"}, + ProducesMediaTypes: []string{"application/json", "application/xml"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"https"}, Params: params, @@ -199,7 +199,7 @@ func (a *Client) AirAPIAirport1(params *AirAPIAirport1Params, opts ...ClientOpti ID: "AirApi_Airport_1", Method: "GET", PathPattern: "/v2/Air/Airport/{IATA}", - ProducesMediaTypes: []string{"application/json", "application/xml", "text/json", "text/plain"}, + ProducesMediaTypes: []string{"application/json", "application/xml"}, ConsumesMediaTypes: []string{"application/json"}, Schemes: []string{"https"}, Params: params, diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go index bd90715a..cd951d6a 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airline.go @@ -24,58 +24,59 @@ type PTXServiceDTOAirSpecificationV2Airline struct { // String // // 航空公司地址 - AirlineAddress string `json:"AirlineAddress,omitempty"` + AirlineAddress string `json:"AirlineAddress,omitempty" xml:"String,omitempty"` // String // // 航空公司電子信箱 - AirlineEmail string `json:"AirlineEmail,omitempty"` + AirlineEmail string `json:"AirlineEmail,omitempty" xml:"String,omitempty"` // String // // 航空公司IATA國際代碼 - AirlineIATA string `json:"AirlineIATA,omitempty"` + AirlineIATA string `json:"AirlineIATA,omitempty" xml:"String,omitempty"` // String // // 航空公司ICAO國際代碼 - AirlineICAO string `json:"AirlineICAO,omitempty"` + AirlineICAO string `json:"AirlineICAO,omitempty" xml:"String,omitempty"` // String // // 航空公司IATA國際代碼 // Required: true - AirlineID *string `json:"AirlineID"` + AirlineID *string `json:"AirlineID" xml:"String"` // NameType // // 航空公司名稱 AirlineName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"AirlineName,omitempty"` + } `json:"AirlineName,omitempty" xml:"NameType,omitempty"` // NameType // // 航空公司簡稱 AirlineNameAlias struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"AirlineNameAlias,omitempty"` + } `json:"AirlineNameAlias,omitempty" xml:"NameType,omitempty"` // String // // 航空公司國籍 - AirlineNationality string `json:"AirlineNationality,omitempty"` + AirlineNationality string `json:"AirlineNationality,omitempty" xml:"String,omitempty"` // String // // 航空公司聯繫電話 - AirlinePhone string `json:"AirlinePhone,omitempty"` + AirlinePhone string `json:"AirlinePhone,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -145,6 +146,10 @@ func (m *PTXServiceDTOAirSpecificationV2Airline) validateUpdateTime(formats strf return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go index ab6f0838..201df40e 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport.go @@ -24,65 +24,66 @@ type PTXServiceDTOAirSpecificationV2Airport struct { // String // // 機場地址 - AirportAddress string `json:"AirportAddress,omitempty"` + AirportAddress string `json:"AirportAddress,omitempty" xml:"String,omitempty"` // NameType // // 機場所屬城市 AirportCityName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"AirportCityName,omitempty"` + } `json:"AirportCityName,omitempty" xml:"NameType,omitempty"` // String // // 機場IATA國際代碼 - AirportIATA string `json:"AirportIATA,omitempty"` + AirportIATA string `json:"AirportIATA,omitempty" xml:"String,omitempty"` // String // // 機場ICAO國際代碼 - AirportICAO string `json:"AirportICAO,omitempty"` + AirportICAO string `json:"AirportICAO,omitempty" xml:"String,omitempty"` // String // // 機場IATA國際代碼 // Required: true - AirportID *string `json:"AirportID"` + AirportID *string `json:"AirportID" xml:"String"` // NameType // // 機場中文名稱 AirportName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"AirportName,omitempty"` + } `json:"AirportName,omitempty" xml:"NameType,omitempty"` // String // // 機場國籍 - AirportNationality string `json:"AirportNationality,omitempty"` + AirportNationality string `json:"AirportNationality,omitempty" xml:"String,omitempty"` // String // // 機場聯繫電話 - AirportPhone string `json:"AirportPhone,omitempty"` + AirportPhone string `json:"AirportPhone,omitempty" xml:"String,omitempty"` // PointType // // 機場位置 AirportPosition struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"AirportPosition,omitempty"` + } `json:"AirportPosition,omitempty" xml:"PointType,omitempty"` // String // // 業管機關代碼(流水號) - AuthorityID string `json:"AuthorityID,omitempty"` + AuthorityID string `json:"AuthorityID,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -164,6 +165,10 @@ func (m *PTXServiceDTOAirSpecificationV2Airport) validateUpdateTime(formats strf return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go index 97b09d69..e0cf5ee6 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_airport_f_id_s.go @@ -26,23 +26,24 @@ type PTXServiceDTOAirSpecificationV2AirportFIDS struct { // // 機場IATA國際代碼 // Required: true - AirportID *string `json:"AirportID"` + AirportID *string `json:"AirportID" xml:"String"` // Array // // 抵達航班顯示資料 - FIDSArrival []*PTXServiceDTOAirSpecificationV2FIDSArrival `json:"FIDSArrival"` + FIDSArrival []*PTXServiceDTOAirSpecificationV2FIDSArrival "json:\"FIDSArrival\" xml:\"List`1\"" // Array // // 出發航班顯示資料 - FIDSDeparture []*PTXServiceDTOAirSpecificationV2FIDSDeparture `json:"FIDSDeparture"` + FIDSDeparture []*PTXServiceDTOAirSpecificationV2FIDSDeparture "json:\"FIDSDeparture\" xml:\"List`1\"" // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o air specification v2 airport f ID s @@ -134,6 +135,10 @@ func (m *PTXServiceDTOAirSpecificationV2AirportFIDS) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go index 2e3bb5b5..a4d2227e 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_code_share.go @@ -25,13 +25,13 @@ type PTXServiceDTOAirSpecificationV2CodeShare struct { // // 航空公司IATA國際代碼 // Required: true - AirlineID *string `json:"AirlineID"` + AirlineID *string `json:"AirlineID" xml:"String"` // String // // 航機班號(不包含航空公司的AirlineID,僅有班號數字) // Required: true - FlightNumber *string `json:"FlightNumber"` + FlightNumber *string `json:"FlightNumber" xml:"String"` } // Validate validates this p t x service d t o air specification v2 code share diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go index c6df54e3..c7ba22ea 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s.go @@ -24,174 +24,176 @@ type PTXServiceDTOAirSpecificationV2FIDS struct { // String // // 航空器型號 - AcType string `json:"AcType,omitempty"` + AcType string `json:"AcType,omitempty" xml:"String,omitempty"` - // DateTime - // // 實際抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ActualArrivalTime string `json:"ActualArrivalTime,omitempty"` + // Format: date-time + ActualArrivalTime strfmt.DateTime `json:"ActualArrivalTime,omitempty"` - // DateTime - // // 實際出發時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ActualDepartureTime string `json:"ActualDepartureTime,omitempty"` + // Format: date-time + ActualDepartureTime strfmt.DateTime `json:"ActualDepartureTime,omitempty"` - // integer + // Int32 // // 航線種類 : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機'] - AirRouteType int32 `json:"AirRouteType,omitempty"` + AirRouteType int64 `json:"AirRouteType,omitempty"` // String // // 航空公司IATA國際代碼 // Required: true - AirlineID *string `json:"AirlineID"` + AirlineID *string `json:"AirlineID" xml:"String"` // String // // 目的地機場IATA國際代碼 // Required: true - ArrivalAirportID *string `json:"ArrivalAirportID"` + ArrivalAirportID *string `json:"ArrivalAirportID" xml:"String"` // String // // 抵達停機坪(僅貨機提供) - ArrivalApron string `json:"ArrivalApron,omitempty"` + ArrivalApron string `json:"ArrivalApron,omitempty" xml:"String,omitempty"` // String // // 抵達登機門(僅客機提供) - ArrivalGate string `json:"ArrivalGate,omitempty"` + ArrivalGate string `json:"ArrivalGate,omitempty" xml:"String,omitempty"` // String // // 航班屬性狀態,為該機場觀點的狀態 - ArrivalRemark string `json:"ArrivalRemark,omitempty"` + ArrivalRemark string `json:"ArrivalRemark,omitempty" xml:"String,omitempty"` // String // // 航班屬性狀態(英文) - ArrivalRemarkEn string `json:"ArrivalRemarkEn,omitempty"` + ArrivalRemarkEn string `json:"ArrivalRemarkEn,omitempty" xml:"String,omitempty"` // String // // 抵達航廈 - ArrivalTerminal string `json:"ArrivalTerminal,omitempty"` + ArrivalTerminal string `json:"ArrivalTerminal,omitempty" xml:"String,omitempty"` // String // // 行李轉盤 - BaggageClaim string `json:"BaggageClaim,omitempty"` + BaggageClaim string `json:"BaggageClaim,omitempty" xml:"String,omitempty"` // String // // 報到櫃檯 - CheckCounter string `json:"CheckCounter,omitempty"` + CheckCounter string `json:"CheckCounter,omitempty" xml:"String,omitempty"` // String // // 航班共用班號 - CodeShare string `json:"CodeShare,omitempty"` + CodeShare string `json:"CodeShare,omitempty" xml:"String,omitempty"` // String // // 起點機場IATA國際代碼 // Required: true - DepartureAirportID *string `json:"DepartureAirportID"` + DepartureAirportID *string `json:"DepartureAirportID" xml:"String"` // String // // 出發停機坪(僅貨機提供) - DepartureApron string `json:"DepartureApron,omitempty"` + DepartureApron string `json:"DepartureApron,omitempty" xml:"String,omitempty"` // String // // 出發登機門(僅客機提供) - DepartureGate string `json:"DepartureGate,omitempty"` + DepartureGate string `json:"DepartureGate,omitempty" xml:"String,omitempty"` // String // // 航班屬性狀態,為第三方觀點的狀態(資料來源:民航局) - DepartureRemark string `json:"DepartureRemark,omitempty"` + DepartureRemark string `json:"DepartureRemark,omitempty" xml:"String,omitempty"` // String // // 航班屬性狀態(英文) - DepartureRemarkEn string `json:"DepartureRemarkEn,omitempty"` + DepartureRemarkEn string `json:"DepartureRemarkEn,omitempty" xml:"String,omitempty"` // String // // 出發航廈 - DepartureTerminal string `json:"DepartureTerminal,omitempty"` + DepartureTerminal string `json:"DepartureTerminal,omitempty" xml:"String,omitempty"` - // DateTime - // // 預估抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm) - EstimatedArrivalTime string `json:"EstimatedArrivalTime,omitempty"` + // Format: date-time + EstimatedArrivalTime strfmt.DateTime `json:"EstimatedArrivalTime,omitempty"` - // DateTime - // // 預估出發時間(ISO8601格式:yyyy-MM-ddTHH:mm) - EstimatedDepartureTime string `json:"EstimatedDepartureTime,omitempty"` + // Format: date-time + EstimatedDepartureTime strfmt.DateTime `json:"EstimatedDepartureTime,omitempty"` - // DateTime - // // 航班日期(ISO8601格式:yyyy-MM-dd) // Required: true - FlightDate *string `json:"FlightDate"` + // Format: date-time + FlightDate *strfmt.DateTime `json:"FlightDate"` // String // // 航機班號(不包含航空公司的AirlineID,僅有班號數字) // Required: true - FlightNumber *string `json:"FlightNumber"` + FlightNumber *string `json:"FlightNumber" xml:"String"` // String // // 航班屬性 - FlightRemark string `json:"FlightRemark,omitempty"` + FlightRemark string `json:"FlightRemark,omitempty" xml:"String,omitempty"` // String // // 航班運行狀態,以航班的角度的狀態 - FlightStatus string `json:"FlightStatus,omitempty"` + FlightStatus string `json:"FlightStatus,omitempty" xml:"String,omitempty"` // String // // 航班運行狀態(英文) - FlightStatusEn string `json:"FlightStatusEn,omitempty"` + FlightStatusEn string `json:"FlightStatusEn,omitempty" xml:"String,omitempty"` // String // // 航班運行狀態百分比(國內線) - FlightStatusPC string `json:"FlightStatusPC,omitempty"` + FlightStatusPC string `json:"FlightStatusPC,omitempty" xml:"String,omitempty"` // Boolean // // 是否為貨機 IsCargo bool `json:"IsCargo,omitempty"` - // DateTime - // // 表訂抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ScheduleArrivalTime string `json:"ScheduleArrivalTime,omitempty"` + // Format: date-time + ScheduleArrivalTime strfmt.DateTime `json:"ScheduleArrivalTime,omitempty"` - // DateTime - // // 表訂出發時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ScheduleDepartureTime string `json:"ScheduleDepartureTime,omitempty"` + // Format: date-time + ScheduleDepartureTime strfmt.DateTime `json:"ScheduleDepartureTime,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o air specification v2 f ID s func (m *PTXServiceDTOAirSpecificationV2FIDS) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateActualArrivalTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateActualDepartureTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateAirlineID(formats); err != nil { res = append(res, err) } @@ -204,6 +206,14 @@ func (m *PTXServiceDTOAirSpecificationV2FIDS) Validate(formats strfmt.Registry) res = append(res, err) } + if err := m.validateEstimatedArrivalTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEstimatedDepartureTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateFlightDate(formats); err != nil { res = append(res, err) } @@ -212,6 +222,14 @@ func (m *PTXServiceDTOAirSpecificationV2FIDS) Validate(formats strfmt.Registry) res = append(res, err) } + if err := m.validateScheduleArrivalTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateScheduleDepartureTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -222,6 +240,30 @@ func (m *PTXServiceDTOAirSpecificationV2FIDS) Validate(formats strfmt.Registry) return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDS) validateActualArrivalTime(formats strfmt.Registry) error { + if swag.IsZero(m.ActualArrivalTime) { // not required + return nil + } + + if err := validate.FormatOf("ActualArrivalTime", "body", "date-time", m.ActualArrivalTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOAirSpecificationV2FIDS) validateActualDepartureTime(formats strfmt.Registry) error { + if swag.IsZero(m.ActualDepartureTime) { // not required + return nil + } + + if err := validate.FormatOf("ActualDepartureTime", "body", "date-time", m.ActualDepartureTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDS) validateAirlineID(formats strfmt.Registry) error { if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil { @@ -249,12 +291,40 @@ func (m *PTXServiceDTOAirSpecificationV2FIDS) validateDepartureAirportID(formats return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDS) validateEstimatedArrivalTime(formats strfmt.Registry) error { + if swag.IsZero(m.EstimatedArrivalTime) { // not required + return nil + } + + if err := validate.FormatOf("EstimatedArrivalTime", "body", "date-time", m.EstimatedArrivalTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOAirSpecificationV2FIDS) validateEstimatedDepartureTime(formats strfmt.Registry) error { + if swag.IsZero(m.EstimatedDepartureTime) { // not required + return nil + } + + if err := validate.FormatOf("EstimatedDepartureTime", "body", "date-time", m.EstimatedDepartureTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDS) validateFlightDate(formats strfmt.Registry) error { if err := validate.Required("FlightDate", "body", m.FlightDate); err != nil { return err } + if err := validate.FormatOf("FlightDate", "body", "date-time", m.FlightDate.String(), formats); err != nil { + return err + } + return nil } @@ -267,12 +337,40 @@ func (m *PTXServiceDTOAirSpecificationV2FIDS) validateFlightNumber(formats strfm return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDS) validateScheduleArrivalTime(formats strfmt.Registry) error { + if swag.IsZero(m.ScheduleArrivalTime) { // not required + return nil + } + + if err := validate.FormatOf("ScheduleArrivalTime", "body", "date-time", m.ScheduleArrivalTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOAirSpecificationV2FIDS) validateScheduleDepartureTime(formats strfmt.Registry) error { + if swag.IsZero(m.ScheduleDepartureTime) { // not required + return nil + } + + if err := validate.FormatOf("ScheduleDepartureTime", "body", "date-time", m.ScheduleDepartureTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDS) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go index 9ef6c4a3..842a0863 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_arrival.go @@ -24,114 +24,115 @@ type PTXServiceDTOAirSpecificationV2FIDSArrival struct { // String // // 航空器型號 - AcType string `json:"AcType,omitempty"` + AcType string `json:"AcType,omitempty" xml:"String,omitempty"` - // DateTime - // // 實際抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ActualArrivalTime string `json:"ActualArrivalTime,omitempty"` + // Format: date-time + ActualArrivalTime strfmt.DateTime `json:"ActualArrivalTime,omitempty"` - // integer + // Int32 // // 航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機'] - AirRouteType int32 `json:"AirRouteType,omitempty"` + AirRouteType int64 `json:"AirRouteType,omitempty"` // String // // 航空公司IATA國際代碼 // Required: true - AirlineID *string `json:"AirlineID"` + AirlineID *string `json:"AirlineID" xml:"String"` // String // // 停機坪(僅貨機提供) - Apron string `json:"Apron,omitempty"` + Apron string `json:"Apron,omitempty" xml:"String,omitempty"` // String // // 目的地機場IATA國際代碼 // Required: true - ArrivalAirportID *string `json:"ArrivalAirportID"` + ArrivalAirportID *string `json:"ArrivalAirportID" xml:"String"` // String // // 航班屬性狀態,為該機場觀點的狀態 - ArrivalRemark string `json:"ArrivalRemark,omitempty"` + ArrivalRemark string `json:"ArrivalRemark,omitempty" xml:"String,omitempty"` // String // // 航班屬性狀態(英文) - ArrivalRemarkEn string `json:"ArrivalRemarkEn,omitempty"` + ArrivalRemarkEn string `json:"ArrivalRemarkEn,omitempty" xml:"String,omitempty"` // String // // 行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊) - BaggageClaim string `json:"BaggageClaim,omitempty"` + BaggageClaim string `json:"BaggageClaim,omitempty" xml:"String,omitempty"` // String // // 報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊) - CheckCounter string `json:"CheckCounter,omitempty"` + CheckCounter string `json:"CheckCounter,omitempty" xml:"String,omitempty"` // String // // 航班共用班號 - CodeShare string `json:"CodeShare,omitempty"` + CodeShare string `json:"CodeShare,omitempty" xml:"String,omitempty"` // String // // 起點機場IATA國際代碼 // Required: true - DepartureAirportID *string `json:"DepartureAirportID"` + DepartureAirportID *string `json:"DepartureAirportID" xml:"String"` - // DateTime - // // 預估抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm) - EstimatedArrivalTime string `json:"EstimatedArrivalTime,omitempty"` + // Format: date-time + EstimatedArrivalTime strfmt.DateTime `json:"EstimatedArrivalTime,omitempty"` - // DateTime - // // 航班日期(ISO8601格式:yyyy-MM-dd) // Required: true - FlightDate *string `json:"FlightDate"` + // Format: date-time + FlightDate *strfmt.DateTime `json:"FlightDate"` // String // // 航機班號(不包含航空公司的AirlineID,僅有班號數字) // Required: true - FlightNumber *string `json:"FlightNumber"` + FlightNumber *string `json:"FlightNumber" xml:"String"` // String // // 登機門(僅客機提供) - Gate string `json:"Gate,omitempty"` + Gate string `json:"Gate,omitempty" xml:"String,omitempty"` // Boolean // // 是否為貨機 IsCargo bool `json:"IsCargo,omitempty"` - // DateTime - // // 表訂抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ScheduleArrivalTime string `json:"ScheduleArrivalTime,omitempty"` + // Format: date-time + ScheduleArrivalTime strfmt.DateTime `json:"ScheduleArrivalTime,omitempty"` // String // // 航廈 - Terminal string `json:"Terminal,omitempty"` + Terminal string `json:"Terminal,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o air specification v2 f ID s arrival func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateActualArrivalTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateAirlineID(formats); err != nil { res = append(res, err) } @@ -144,6 +145,10 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) Validate(formats strfmt.Reg res = append(res, err) } + if err := m.validateEstimatedArrivalTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateFlightDate(formats); err != nil { res = append(res, err) } @@ -152,6 +157,10 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) Validate(formats strfmt.Reg res = append(res, err) } + if err := m.validateScheduleArrivalTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -162,6 +171,18 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) Validate(formats strfmt.Reg return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateActualArrivalTime(formats strfmt.Registry) error { + if swag.IsZero(m.ActualArrivalTime) { // not required + return nil + } + + if err := validate.FormatOf("ActualArrivalTime", "body", "date-time", m.ActualArrivalTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateAirlineID(formats strfmt.Registry) error { if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil { @@ -189,12 +210,28 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateDepartureAirportID( return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateEstimatedArrivalTime(formats strfmt.Registry) error { + if swag.IsZero(m.EstimatedArrivalTime) { // not required + return nil + } + + if err := validate.FormatOf("EstimatedArrivalTime", "body", "date-time", m.EstimatedArrivalTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateFlightDate(formats strfmt.Registry) error { if err := validate.Required("FlightDate", "body", m.FlightDate); err != nil { return err } + if err := validate.FormatOf("FlightDate", "body", "date-time", m.FlightDate.String(), formats); err != nil { + return err + } + return nil } @@ -207,12 +244,28 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateFlightNumber(format return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateScheduleArrivalTime(formats strfmt.Registry) error { + if swag.IsZero(m.ScheduleArrivalTime) { // not required + return nil + } + + if err := validate.FormatOf("ScheduleArrivalTime", "body", "date-time", m.ScheduleArrivalTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDSArrival) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go index 7edd25a6..41e21d6e 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_f_id_s_departure.go @@ -24,114 +24,115 @@ type PTXServiceDTOAirSpecificationV2FIDSDeparture struct { // String // // 航空器型號 - AcType string `json:"AcType,omitempty"` + AcType string `json:"AcType,omitempty" xml:"String,omitempty"` - // DateTime - // // 實際出發時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ActualDepartureTime string `json:"ActualDepartureTime,omitempty"` + // Format: date-time + ActualDepartureTime strfmt.DateTime `json:"ActualDepartureTime,omitempty"` - // integer + // Int32 // // 航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機'] - AirRouteType int32 `json:"AirRouteType,omitempty"` + AirRouteType int64 `json:"AirRouteType,omitempty"` // String // // 航空公司IATA國際代碼 // Required: true - AirlineID *string `json:"AirlineID"` + AirlineID *string `json:"AirlineID" xml:"String"` // String // // 停機坪(僅貨機提供) - Apron string `json:"Apron,omitempty"` + Apron string `json:"Apron,omitempty" xml:"String,omitempty"` // String // // 目的地機場IATA國際代碼 // Required: true - ArrivalAirportID *string `json:"ArrivalAirportID"` + ArrivalAirportID *string `json:"ArrivalAirportID" xml:"String"` // String // // 行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊) - BaggageClaim string `json:"BaggageClaim,omitempty"` + BaggageClaim string `json:"BaggageClaim,omitempty" xml:"String,omitempty"` // String // // 報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊) - CheckCounter string `json:"CheckCounter,omitempty"` + CheckCounter string `json:"CheckCounter,omitempty" xml:"String,omitempty"` // String // // 航班共用班號 - CodeShare string `json:"CodeShare,omitempty"` + CodeShare string `json:"CodeShare,omitempty" xml:"String,omitempty"` // String // // 起點機場IATA國際代碼 // Required: true - DepartureAirportID *string `json:"DepartureAirportID"` + DepartureAirportID *string `json:"DepartureAirportID" xml:"String"` // String // // 航班屬性狀態, ,為該機場觀點的狀態 - DepartureRemark string `json:"DepartureRemark,omitempty"` + DepartureRemark string `json:"DepartureRemark,omitempty" xml:"String,omitempty"` // String // // 航班屬性狀態(英文) - DepartureRemarkEn string `json:"DepartureRemarkEn,omitempty"` + DepartureRemarkEn string `json:"DepartureRemarkEn,omitempty" xml:"String,omitempty"` - // DateTime - // // 預估出發時間(ISO8601格式:yyyy-MM-ddTHH:mm) - EstimatedDepartureTime string `json:"EstimatedDepartureTime,omitempty"` + // Format: date-time + EstimatedDepartureTime strfmt.DateTime `json:"EstimatedDepartureTime,omitempty"` - // DateTime - // // 航班日期(ISO8601格式:yyyy-MM-dd) // Required: true - FlightDate *string `json:"FlightDate"` + // Format: date-time + FlightDate *strfmt.DateTime `json:"FlightDate"` // String // // 航機班號(不包含航空公司的AirlineID,僅有班號數字) // Required: true - FlightNumber *string `json:"FlightNumber"` + FlightNumber *string `json:"FlightNumber" xml:"String"` // String // // 登機門(僅客機提供) - Gate string `json:"Gate,omitempty"` + Gate string `json:"Gate,omitempty" xml:"String,omitempty"` // Boolean // // 是否為貨機 IsCargo bool `json:"IsCargo,omitempty"` - // DateTime - // // 表訂出發時間(ISO8601格式:yyyy-MM-ddTHH:mm) - ScheduleDepartureTime string `json:"ScheduleDepartureTime,omitempty"` + // Format: date-time + ScheduleDepartureTime strfmt.DateTime `json:"ScheduleDepartureTime,omitempty"` // String // // 航廈 - Terminal string `json:"Terminal,omitempty"` + Terminal string `json:"Terminal,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o air specification v2 f ID s departure func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateActualDepartureTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateAirlineID(formats); err != nil { res = append(res, err) } @@ -144,6 +145,10 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) Validate(formats strfmt.R res = append(res, err) } + if err := m.validateEstimatedDepartureTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateFlightDate(formats); err != nil { res = append(res, err) } @@ -152,6 +157,10 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) Validate(formats strfmt.R res = append(res, err) } + if err := m.validateScheduleDepartureTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -162,6 +171,18 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) Validate(formats strfmt.R return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateActualDepartureTime(formats strfmt.Registry) error { + if swag.IsZero(m.ActualDepartureTime) { // not required + return nil + } + + if err := validate.FormatOf("ActualDepartureTime", "body", "date-time", m.ActualDepartureTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateAirlineID(formats strfmt.Registry) error { if err := validate.Required("AirlineID", "body", m.AirlineID); err != nil { @@ -189,12 +210,28 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateDepartureAirportI return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateEstimatedDepartureTime(formats strfmt.Registry) error { + if swag.IsZero(m.EstimatedDepartureTime) { // not required + return nil + } + + if err := validate.FormatOf("EstimatedDepartureTime", "body", "date-time", m.EstimatedDepartureTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateFlightDate(formats strfmt.Registry) error { if err := validate.Required("FlightDate", "body", m.FlightDate); err != nil { return err } + if err := validate.FormatOf("FlightDate", "body", "date-time", m.FlightDate.String(), formats); err != nil { + return err + } + return nil } @@ -207,12 +244,28 @@ func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateFlightNumber(form return nil } +func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateScheduleDepartureTime(formats strfmt.Registry) error { + if swag.IsZero(m.ScheduleDepartureTime) { // not required + return nil + } + + if err := validate.FormatOf("ScheduleDepartureTime", "body", "date-time", m.ScheduleDepartureTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOAirSpecificationV2FIDSDeparture) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go index 2b786b32..26483116 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_general_flight_schedule.go @@ -26,42 +26,42 @@ type PTXServiceDTOAirSpecificationV2GeneralFlightSchedule struct { // // 航空公司IATA國際代碼 // Required: true - AirlineID *string `json:"AirlineID"` + AirlineID *string `json:"AirlineID" xml:"String"` // String // // 目的地機場IATA國際代碼 // Required: true - ArrivalAirportID *string `json:"ArrivalAirportID"` + ArrivalAirportID *string `json:"ArrivalAirportID" xml:"String"` // String // // 終點機場抵達時間 (格式: HH:mm 當地時間,跨日以+1 表示) // Required: true - ArrivalTime *string `json:"ArrivalTime"` + ArrivalTime *string `json:"ArrivalTime" xml:"String"` // Array // // 共用班號 - CodeShare []*PTXServiceDTOAirSpecificationV2CodeShare `json:"CodeShare"` + CodeShare []*PTXServiceDTOAirSpecificationV2CodeShare "json:\"CodeShare\" xml:\"List`1\"" // String // // 起點機場IATA國際代碼 // Required: true - DepartureAirportID *string `json:"DepartureAirportID"` + DepartureAirportID *string `json:"DepartureAirportID" xml:"String"` // String // // 起點機場出發時間 (格式: HH:mm 當地時間,跨日以+1 表示) // Required: true - DepartureTime *string `json:"DepartureTime"` + DepartureTime *string `json:"DepartureTime" xml:"String"` // String // // 班機號碼(包含航空公司的AirlineID,結構為AirlineID加上3~4碼航機班號數字;若班號僅有兩碼,其結構會加上0補足三碼,"AirlineID + 0 + 兩碼班號") // Required: true - FlightNumber *string `json:"FlightNumber"` + FlightNumber *string `json:"FlightNumber" xml:"String"` // Boolean // @@ -85,13 +85,15 @@ type PTXServiceDTOAirSpecificationV2GeneralFlightSchedule struct { // // 班表結束日期(ISO8601格式:yyyy-MM-dd) // Required: true - ScheduleEndDate *string `json:"ScheduleEndDate"` + // Format: date-time + ScheduleEndDate *strfmt.DateTime `json:"ScheduleEndDate"` // DateTime // // 班表開始日期(ISO8601格式:yyyy-MM-dd) // Required: true - ScheduleStartDate *string `json:"ScheduleStartDate"` + // Format: date-time + ScheduleStartDate *strfmt.DateTime `json:"ScheduleStartDate"` // Boolean // @@ -102,7 +104,7 @@ type PTXServiceDTOAirSpecificationV2GeneralFlightSchedule struct { // String // // 航廈 - Terminal string `json:"Terminal,omitempty"` + Terminal string `json:"Terminal,omitempty" xml:"String,omitempty"` // Boolean // @@ -120,7 +122,8 @@ type PTXServiceDTOAirSpecificationV2GeneralFlightSchedule struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -328,6 +331,10 @@ func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateScheduleE return err } + if err := validate.FormatOf("ScheduleEndDate", "body", "date-time", m.ScheduleEndDate.String(), formats); err != nil { + return err + } + return nil } @@ -337,6 +344,10 @@ func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateScheduleS return err } + if err := validate.FormatOf("ScheduleStartDate", "body", "date-time", m.ScheduleStartDate.String(), formats); err != nil { + return err + } + return nil } @@ -373,6 +384,10 @@ func (m *PTXServiceDTOAirSpecificationV2GeneralFlightSchedule) validateUpdateTim return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go index 68505ed6..41520309 100644 --- a/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go +++ b/air/v2/models/p_t_x_service_d_t_o_air_specification_v2_m_e_t_a_r.go @@ -23,7 +23,7 @@ type PTXServiceDTOAirSpecificationV2METAR struct { // // 機場代碼(IATA) // Required: true - AirportID *string `json:"AirportID"` + AirportID *string `json:"AirportID" xml:"String"` // NameType // @@ -31,13 +31,13 @@ type PTXServiceDTOAirSpecificationV2METAR struct { // Required: true AirportName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"AirportName"` + } `json:"AirportName" xml:"NameType"` // String // // 雲冪(含單位) // Required: true - Ceiling *string `json:"Ceiling"` + Ceiling *string `json:"Ceiling" xml:"String"` // NameType // @@ -45,7 +45,7 @@ type PTXServiceDTOAirSpecificationV2METAR struct { // Required: true CityName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"CityName"` + } `json:"CityName" xml:"NameType"` // NameType // @@ -53,31 +53,32 @@ type PTXServiceDTOAirSpecificationV2METAR struct { // Required: true CountryName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"CountryName"` + } `json:"CountryName" xml:"NameType"` // String // // 機場天氣報告(METAR/SPECI) // Required: true - MetarText *string `json:"MetarText"` + MetarText *string `json:"MetarText" xml:"String"` // String // // 機場天氣報告時間(地方時) // Required: true - MetarTime *string `json:"MetarTime"` + MetarTime *string `json:"MetarTime" xml:"String"` // DateTime // // 觀測時間 // Required: true - ObservationTime *string `json:"ObservationTime"` + // Format: date-time + ObservationTime *strfmt.DateTime `json:"ObservationTime"` // String // // 機場氣象觀測站代碼(ICAO) // Required: true - StationID *string `json:"StationID"` + StationID *string `json:"StationID" xml:"String"` // PointType // @@ -85,25 +86,26 @@ type PTXServiceDTOAirSpecificationV2METAR struct { // Required: true StationPosition struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"StationPosition"` + } `json:"StationPosition" xml:"PointType"` // String // // 溫度(含單位) // Required: true - Temperature *string `json:"Temperature"` + Temperature *string `json:"Temperature" xml:"String"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // // 盛行能見度(含單位,9999以10公里以上表示) // Required: true - Visibility *string `json:"Visibility"` + Visibility *string `json:"Visibility" xml:"String"` // NameType // @@ -111,19 +113,19 @@ type PTXServiceDTOAirSpecificationV2METAR struct { // Required: true WeatherDescription struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"WeatherDescription"` + } `json:"WeatherDescription" xml:"NameType"` // String // // 風向(含單位) // Required: true - WindDirection *string `json:"WindDirection"` + WindDirection *string `json:"WindDirection" xml:"String"` // String // // 風速(含單位) // Required: true - WindSpeed *string `json:"WindSpeed"` + WindSpeed *string `json:"WindSpeed" xml:"String"` } // Validate validates this p t x service d t o air specification v2 m e t a r @@ -257,6 +259,10 @@ func (m *PTXServiceDTOAirSpecificationV2METAR) validateObservationTime(formats s return err } + if err := validate.FormatOf("ObservationTime", "body", "date-time", m.ObservationTime.String(), formats); err != nil { + return err + } + return nil } @@ -289,6 +295,10 @@ func (m *PTXServiceDTOAirSpecificationV2METAR) validateUpdateTime(formats strfmt return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go index b757afa0..e5163b66 100644 --- a/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go +++ b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go @@ -22,12 +22,12 @@ type PTXServiceDTOSharedSpecificationV2BaseNameType struct { // String // // 英文名稱 - En string `json:"En,omitempty"` + En string `json:"En,omitempty" xml:"String,omitempty"` // String // // 中文繁體名稱 - ZhTw string `json:"Zh_tw,omitempty"` + ZhTw string `json:"Zh_tw,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o shared specification v2 base name type diff --git a/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go index 02645203..0312b38d 100644 --- a/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go +++ b/air/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go @@ -22,7 +22,7 @@ type PTXServiceDTOSharedSpecificationV2BasePointType struct { // String // // 地理空間編碼 - GeoHash string `json:"GeoHash,omitempty"` + GeoHash string `json:"GeoHash,omitempty" xml:"String,omitempty"` // 位置緯度(WGS84) PositionLat float64 `json:"PositionLat,omitempty"` diff --git a/bike/v2/client/advanced/bike_api_availability_all_city_near_by_parameters.go b/bike/v2/client/advanced/bike_api_availability_all_city_near_by_parameters.go index 465abb62..57cc3525 100644 --- a/bike/v2/client/advanced/bike_api_availability_all_city_near_by_parameters.go +++ b/bike/v2/client/advanced/bike_api_availability_all_city_near_by_parameters.go @@ -92,7 +92,7 @@ type BikeAPIAvailabilityAllCityNearByParams struct { /* DollarSpatialFilter. - 空間過濾(最大搜尋半徑為1000公尺) + 空間過濾(最大搜尋半徑為1000公尺),語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter string diff --git a/bike/v2/client/advanced/bike_api_station_all_city_near_by_parameters.go b/bike/v2/client/advanced/bike_api_station_all_city_near_by_parameters.go index 1d423ca1..b6665173 100644 --- a/bike/v2/client/advanced/bike_api_station_all_city_near_by_parameters.go +++ b/bike/v2/client/advanced/bike_api_station_all_city_near_by_parameters.go @@ -92,7 +92,7 @@ type BikeAPIStationAllCityNearByParams struct { /* DollarSpatialFilter. - 空間過濾(最大搜尋半徑為1000公尺) + 空間過濾(最大搜尋半徑為1000公尺),語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter string diff --git a/bike/v2/client/bike/bike_api_station_parameters.go b/bike/v2/client/bike/bike_api_station_parameters.go index 449b6ece..e819ee56 100644 --- a/bike/v2/client/bike/bike_api_station_parameters.go +++ b/bike/v2/client/bike/bike_api_station_parameters.go @@ -92,7 +92,7 @@ type BikeAPIStationParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go index 2ce9cbb7..4ca31b8c 100644 --- a/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go +++ b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_availability.go @@ -31,37 +31,41 @@ type PTXServiceDTOBikeSpecificationV2BikeAvailability struct { // 可歸還車數 AvailableReturnBikes int32 `json:"AvailableReturnBikes,omitempty"` - // integer + // Int32 // // 服務狀態 : [0:'停止營運',1:'正常營運'] - ServiceAvailable int32 `json:"ServiceAvailable,omitempty"` + ServiceAvailable int64 `json:"ServiceAvailable,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // // 站點代碼 - StationID string `json:"StationID,omitempty"` + StationID string `json:"StationID,omitempty" xml:"String,omitempty"` // String // // 站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - StationUID string `json:"StationUID,omitempty"` + StationUID string `json:"StationUID,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bike specification v2 bike availability func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -72,12 +76,28 @@ func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) Validate(formats strf return nil } +func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBikeSpecificationV2BikeAvailability) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go index 4bd006a8..d19d64cf 100644 --- a/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go +++ b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_shape.go @@ -22,19 +22,19 @@ type PTXServiceDTOBikeSpecificationV2BikeShape struct { // String // // 業管機關名稱(可能包含多個業管機關) - AuthorityName string `json:"AuthorityName,omitempty"` + AuthorityName string `json:"AuthorityName,omitempty" xml:"String,omitempty"` // String // // 路線所在縣市名稱 // Required: true - City *string `json:"City"` + City *string `json:"City" xml:"String"` // String // // 路線所在縣市代碼 // Required: true - CityCode *string `json:"CityCode"` + CityCode *string `json:"CityCode" xml:"String"` // 自行車道長度 CyclingLength float64 `json:"CyclingLength,omitempty"` @@ -42,56 +42,57 @@ type PTXServiceDTOBikeSpecificationV2BikeShape struct { // String // // 自行車道類型 - CyclingType string `json:"CyclingType,omitempty"` + CyclingType string `json:"CyclingType,omitempty" xml:"String,omitempty"` // String // // 自行車道車行方向 - Direction string `json:"Direction,omitempty"` + Direction string `json:"Direction,omitempty" xml:"String,omitempty"` // String // // 路線軌跡編碼(encoded polyline) // Required: true - EncodedPolyline *string `json:"EncodedPolyline"` + EncodedPolyline *string `json:"EncodedPolyline" xml:"String"` // String // // 自行車道完工日期時間 - FinishedTime string `json:"FinishedTime,omitempty"` + FinishedTime string `json:"FinishedTime,omitempty" xml:"String,omitempty"` // String // // well-known text,為路線軌跡資料 // Required: true - Geometry *string `json:"Geometry"` + Geometry *string `json:"Geometry" xml:"String"` // String // // 路線迄點描述 - RoadSectionEnd string `json:"RoadSectionEnd,omitempty"` + RoadSectionEnd string `json:"RoadSectionEnd,omitempty" xml:"String,omitempty"` // String // // 路線起點描述 - RoadSectionStart string `json:"RoadSectionStart,omitempty"` + RoadSectionStart string `json:"RoadSectionStart,omitempty" xml:"String,omitempty"` // String // // 路線名稱 // Required: true - RouteName *string `json:"RouteName"` + RouteName *string `json:"RouteName" xml:"String"` // String // // 路線所在鄉鎮名稱(可能包含多個鄉鎮) - Town string `json:"Town,omitempty"` + Town string `json:"Town,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bike specification v2 bike shape @@ -179,6 +180,10 @@ func (m *PTXServiceDTOBikeSpecificationV2BikeShape) validateUpdateTime(formats s return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go index 83393bac..10a39838 100644 --- a/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go +++ b/bike/v2/models/p_t_x_service_d_t_o_bike_specification_v2_bike_station.go @@ -24,65 +24,69 @@ type PTXServiceDTOBikeSpecificationV2BikeStation struct { // String // // 業管單位代碼 - AuthorityID string `json:"AuthorityID,omitempty"` + AuthorityID string `json:"AuthorityID,omitempty" xml:"String,omitempty"` // Int32 // // 可容納之自行車總數 BikesCapacity int32 `json:"BikesCapacity,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // NameType // // 站點地址 StationAddress struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"StationAddress,omitempty"` + } `json:"StationAddress,omitempty" xml:"NameType,omitempty"` // String // // 站點代碼 - StationID string `json:"StationID,omitempty"` + StationID string `json:"StationID,omitempty" xml:"String,omitempty"` // NameType // // 站點名稱 StationName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"StationName,omitempty"` + } `json:"StationName,omitempty" xml:"NameType,omitempty"` // PointType // // 站點位置 StationPosition struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"StationPosition,omitempty"` + } `json:"StationPosition,omitempty" xml:"PointType,omitempty"` // String // // 站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - StationUID string `json:"StationUID,omitempty"` + StationUID string `json:"StationUID,omitempty" xml:"String,omitempty"` // String // // 站點描述 - StopDescription string `json:"StopDescription,omitempty"` + StopDescription string `json:"StopDescription,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bike specification v2 bike station func (m *PTXServiceDTOBikeSpecificationV2BikeStation) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStationAddress(formats); err != nil { res = append(res, err) } @@ -105,6 +109,18 @@ func (m *PTXServiceDTOBikeSpecificationV2BikeStation) Validate(formats strfmt.Re return nil } +func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateStationAddress(formats strfmt.Registry) error { if swag.IsZero(m.StationAddress) { // not required return nil @@ -135,6 +151,10 @@ func (m *PTXServiceDTOBikeSpecificationV2BikeStation) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go index b757afa0..e5163b66 100644 --- a/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go +++ b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go @@ -22,12 +22,12 @@ type PTXServiceDTOSharedSpecificationV2BaseNameType struct { // String // // 英文名稱 - En string `json:"En,omitempty"` + En string `json:"En,omitempty" xml:"String,omitempty"` // String // // 中文繁體名稱 - ZhTw string `json:"Zh_tw,omitempty"` + ZhTw string `json:"Zh_tw,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o shared specification v2 base name type diff --git a/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go index 02645203..0312b38d 100644 --- a/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go +++ b/bike/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go @@ -22,7 +22,7 @@ type PTXServiceDTOSharedSpecificationV2BasePointType struct { // String // // 地理空間編碼 - GeoHash string `json:"GeoHash,omitempty"` + GeoHash string `json:"GeoHash,omitempty" xml:"String,omitempty"` // 位置緯度(WGS84) PositionLat float64 `json:"PositionLat,omitempty"` diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a1_data.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a1_data.go index 9ef8fe8b..f646eab1 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a1_data.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a1_data.go @@ -31,31 +31,32 @@ type PTXServiceDTOBusSpecificationV2BusA1Data struct { PTXServiceDTOSharedSpecificationV2BasePointType } `json:"BusPosition,omitempty" xml:"PointType,omitempty"` - // integer + // Int32 // // 行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知'] - BusStatus string `json:"BusStatus,omitempty"` + BusStatus int64 `json:"BusStatus,omitempty"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] Direction int64 `json:"Direction,omitempty"` - // integer + // Int32 // // 勤務狀態 : [0:'正常',1:'開始',2:'結束'] - DutyStatus string `json:"DutyStatus,omitempty"` + DutyStatus int64 `json:"DutyStatus,omitempty"` // DateTime // // 車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - GPSTime *string `json:"GPSTime"` + // Format: date-time + GPSTime *strfmt.DateTime `json:"GPSTime"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType string `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` // String // @@ -88,20 +89,17 @@ type PTXServiceDTOBusSpecificationV2BusA1Data struct { // 行駛速度(kph) Speed float64 `json:"Speed,omitempty"` - // DateTime - // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcRecTime string `json:"SrcRecTime,omitempty"` + // Format: date-time + SrcRecTime strfmt.DateTime `json:"SrcRecTime,omitempty"` - // DateTime - // // 來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故有提供此欄位, 而非公總系統因使用整包資料更新, 故沒有提供此欄位] - SrcTransTime string `json:"SrcTransTime,omitempty"` + // Format: date-time + SrcTransTime strfmt.DateTime `json:"SrcTransTime,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故沒有提供此欄位, 而非公總系統因提供整包資料更新, 故有提供此欄] - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // @@ -120,16 +118,16 @@ type PTXServiceDTOBusSpecificationV2BusA1Data struct { // 子路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[多數單位沒有提供此欄位資訊] - TransTime string `json:"TransTime,omitempty"` + // Format: date-time + TransTime strfmt.DateTime `json:"TransTime,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v2 bus a1 data @@ -152,10 +150,26 @@ func (m *PTXServiceDTOBusSpecificationV2BusA1Data) Validate(formats strfmt.Regis res = append(res, err) } + if err := m.validateSrcRecTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcTransTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateSubRouteName(formats); err != nil { res = append(res, err) } + if err := m.validateTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -180,6 +194,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateGPSTime(formats strfm return err } + if err := validate.FormatOf("GPSTime", "body", "date-time", m.GPSTime.String(), formats); err != nil { + return err + } + return nil } @@ -200,6 +218,42 @@ func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateRouteName(formats str return nil } +func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateSrcRecTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcRecTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcRecTime", "body", "date-time", m.SrcRecTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateSrcTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcTransTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcTransTime", "body", "date-time", m.SrcTransTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateSubRouteName(formats strfmt.Registry) error { if swag.IsZero(m.SubRouteName) { // not required return nil @@ -208,12 +262,28 @@ func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateSubRouteName(formats return nil } +func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.TransTime) { // not required + return nil + } + + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusA1Data) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a2_data.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a2_data.go index 26d2564c..2dac4f8d 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a2_data.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_a2_data.go @@ -21,37 +21,38 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusA2Data type PTXServiceDTOBusSpecificationV2BusA2Data struct { - // integer + // Int32 // // 進站離站 : [0:'離站',1:'進站'] - A2EventType string `json:"A2EventType,omitempty"` + A2EventType int64 `json:"A2EventType,omitempty"` - // integer + // Int32 // // 行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知'] - BusStatus string `json:"BusStatus,omitempty"` + BusStatus int64 `json:"BusStatus,omitempty"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true Direction *int64 `json:"Direction"` - // integer + // Int32 // // 勤務狀態 : [0:'正常',1:'開始',2:'結束'] - DutyStatus string `json:"DutyStatus,omitempty"` + DutyStatus int64 `json:"DutyStatus,omitempty"` // DateTime // // 車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) [觸發到離站的GPS時間] // Required: true - GPSTime *string `json:"GPSTime"` + // Format: date-time + GPSTime *strfmt.DateTime `json:"GPSTime"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType string `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` // String // @@ -81,20 +82,17 @@ type PTXServiceDTOBusSpecificationV2BusA2Data struct { // 路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 RouteUID string `json:"RouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcRecTime string `json:"SrcRecTime,omitempty"` + // Format: date-time + SrcRecTime strfmt.DateTime `json:"SrcRecTime,omitempty"` - // DateTime - // // 來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故有提供此欄位, 而非公總系統因使用整包資料更新, 故沒有提供此欄位] - SrcTransTime string `json:"SrcTransTime,omitempty"` + // Format: date-time + SrcTransTime strfmt.DateTime `json:"SrcTransTime,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故沒有提供此欄位, 而非公總系統因提供整包資料更新, 故有提供此欄] - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // @@ -135,16 +133,16 @@ type PTXServiceDTOBusSpecificationV2BusA2Data struct { // 子路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[多數單位沒有提供此欄位資訊] - TransTime string `json:"TransTime,omitempty"` + // Format: date-time + TransTime strfmt.DateTime `json:"TransTime,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v2 bus a2 data @@ -167,6 +165,18 @@ func (m *PTXServiceDTOBusSpecificationV2BusA2Data) Validate(formats strfmt.Regis res = append(res, err) } + if err := m.validateSrcRecTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcTransTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStopName(formats); err != nil { res = append(res, err) } @@ -175,6 +185,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusA2Data) Validate(formats strfmt.Regis res = append(res, err) } + if err := m.validateTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -200,6 +214,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateGPSTime(formats strfm return err } + if err := validate.FormatOf("GPSTime", "body", "date-time", m.GPSTime.String(), formats); err != nil { + return err + } + return nil } @@ -220,6 +238,42 @@ func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateRouteName(formats str return nil } +func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateSrcRecTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcRecTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcRecTime", "body", "date-time", m.SrcRecTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateSrcTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcTransTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcTransTime", "body", "date-time", m.SrcTransTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateStopName(formats strfmt.Registry) error { if swag.IsZero(m.StopName) { // not required return nil @@ -236,12 +290,28 @@ func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateSubRouteName(formats return nil } +func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.TransTime) { // not required + return nil + } + + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusA2Data) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go index 7bd079e2..b49db10c 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_alert.go @@ -30,10 +30,10 @@ type PTXServiceDTOBusSpecificationV2BusAlert struct { // 詳細描述網站連結 AlertURL string `json:"AlertURL,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 原因 : [1:'事故',2:'維護',3:'技術問題',4:'施工',5:'急救',6:'天災',7:'示威遊行',8:'維安',9:'假日',10:'罷工',254:'其他',255:'未知原因'] - Cause string `json:"Cause,omitempty"` + Cause int64 `json:"Cause,omitempty"` // String // @@ -47,20 +47,18 @@ type PTXServiceDTOBusSpecificationV2BusAlert struct { // Required: true Description *string `json:"Description" xml:"String"` - // integer + // Int32 // // 影響 : [1:'車輛改道',2:'服務班次增加',3:'服務班次減少',4:'服務班次取消',5:'服務班次改變',6:'站牌不停靠',7:'重大延遲',254:'其他影響',255:'未知影響'] - Effect string `json:"Effect,omitempty"` + Effect int64 `json:"Effect,omitempty"` - // DateTime - // // 結束日期時間 - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` - // DateTime - // // 消息公告日期時間 - PublishTime string `json:"PublishTime,omitempty"` + // Format: date-time + PublishTime strfmt.DateTime `json:"PublishTime,omitempty"` // Scope // @@ -73,17 +71,17 @@ type PTXServiceDTOBusSpecificationV2BusAlert struct { // DateTime // // [來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` - // DateTime - // // 開始日期時間 - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` - // integer + // Int32 // // 營運狀況 : [0:'全部營運停止',1:'全部營運正常',2:'有異常狀況'] - Status string `json:"Status,omitempty"` + Status int64 `json:"Status,omitempty"` // String // @@ -94,7 +92,8 @@ type PTXServiceDTOBusSpecificationV2BusAlert struct { // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - UpdateTime string `json:"UpdateTime,omitempty"` + // Format: date-time + UpdateTime strfmt.DateTime `json:"UpdateTime,omitempty"` } // Validate validates this p t x service d t o bus specification v2 bus alert @@ -113,14 +112,34 @@ func (m *PTXServiceDTOBusSpecificationV2BusAlert) Validate(formats strfmt.Regist res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateScope(formats); err != nil { res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateTitle(formats); err != nil { res = append(res, err) } + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -154,11 +173,59 @@ func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateDescription(formats st return nil } +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validatePublishTime(formats strfmt.Registry) error { + if swag.IsZero(m.PublishTime) { // not required + return nil + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateScope(formats strfmt.Registry) error { return nil } +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateTitle(formats strfmt.Registry) error { if err := validate.Required("Title", "body", m.Title); err != nil { @@ -168,6 +235,18 @@ func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateTitle(formats strfmt.R return nil } +func (m *PTXServiceDTOBusSpecificationV2BusAlert) validateUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.UpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + // ContextValidate validate this p t x service d t o bus specification v2 bus alert based on the context it is used func (m *PTXServiceDTOBusSpecificationV2BusAlert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_display_stop_of_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_display_stop_of_route.go index 7385582f..f0fd49bd 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_display_stop_of_route.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_display_stop_of_route.go @@ -22,7 +22,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusDisplayStopOfRoute type PTXServiceDTOBusSpecificationV2BusDisplayStopOfRoute struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] Direction int64 `json:"Direction,omitempty"` @@ -57,7 +57,8 @@ type PTXServiceDTOBusSpecificationV2BusDisplayStopOfRoute struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -154,6 +155,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusDisplayStopOfRoute) validateUpdateTim return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_fare.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_fare.go index f0d944cc..8e73e96d 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_fare.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_fare.go @@ -27,11 +27,11 @@ type PTXServiceDTOBusSpecificationV2BusFare struct { // 優惠時段 DiscountPeriods []*PTXServiceDTOBusSpecificationV2BusDiscountPeriods "json:\"DiscountPeriods\" xml:\"List`1\"" - // integer + // Int32 // // 費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票'] // Required: true - FareClass *string `json:"FareClass"` + FareClass *int64 `json:"FareClass"` // String // @@ -44,11 +44,11 @@ type PTXServiceDTOBusSpecificationV2BusFare struct { // Required: true Price *int32 `json:"Price"` - // integer + // Int32 // // 票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期'] // Required: true - TicketType *string `json:"TicketType"` + TicketType *int64 `json:"TicketType"` } // Validate validates this p t x service d t o bus specification v2 bus fare diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info.go index f173efa4..8f69a1f6 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info.go @@ -22,7 +22,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusFirstLastTripInfo type PTXServiceDTOBusSpecificationV2BusFirstLastTripInfo struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true @@ -84,7 +84,8 @@ type PTXServiceDTOBusSpecificationV2BusFirstLastTripInfo struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -242,6 +243,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusFirstLastTripInfo) validateUpdateTime return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info_service_day.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info_service_day.go index 1964c40a..cf537dc0 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info_service_day.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_first_last_trip_info_service_day.go @@ -19,67 +19,67 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusFirstLastTripInfo+ServiceDay type PTXServiceDTOBusSpecificationV2BusFirstLastTripInfoServiceDay struct { - // integer + // Int32 // // 國定假日後一日營運與否 : [0:'否',1:'是'] - DayAfterNationalHoliday string `json:"DayAfterNationalHoliday,omitempty"` + DayAfterNationalHoliday int64 `json:"DayAfterNationalHoliday,omitempty"` - // integer + // Int32 // // 國定假日前一日營運與否 : [0:'否',1:'是'] - DayBeforeNationalHoliday string `json:"DayBeforeNationalHoliday,omitempty"` + DayBeforeNationalHoliday int64 `json:"DayBeforeNationalHoliday,omitempty"` - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *string `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *string `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 國定假日營運與否 : [0:'否',1:'是'] - NationalHolidays string `json:"NationalHolidays,omitempty"` + NationalHolidays int64 `json:"NationalHolidays,omitempty"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *string `json:"Saturday"` + Saturday *int64 `json:"Saturday"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *string `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *string `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *string `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 颱風停止上班上課期間營運與否 : [0:'否',1:'是'] - TyphoonDay string `json:"TyphoonDay,omitempty"` + TyphoonDay int64 `json:"TyphoonDay,omitempty"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *string `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o bus specification v2 bus first last trip info service day diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_n1_estimate_time.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_n1_estimate_time.go index 51db9b8c..a7041b32 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_n1_estimate_time.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_n1_estimate_time.go @@ -25,17 +25,16 @@ type PTXServiceDTOBusSpecificationV2BusN1EstimateTime struct { // 車輛目前所在站牌代碼 CurrentStop string `json:"CurrentStop,omitempty" xml:"String,omitempty"` - // DateTime - // // 系統演算該筆預估到站資料的時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[目前僅公總提供此欄位資訊] - DataTime string `json:"DataTime,omitempty"` + // Format: date-time + DataTime strfmt.DateTime `json:"DataTime,omitempty"` // String // // 車輛目的站牌代碼 DestinationStop string `json:"DestinationStop,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 去返程(該方向指的是此車牌車輛目前所在路線的去返程方向,非指站站牌所在路線的去返程方向,使用時請加值業者多加注意) : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true @@ -53,15 +52,14 @@ type PTXServiceDTOBusSpecificationV2BusN1EstimateTime struct { // 是否為末班車 IsLastBus bool `json:"IsLastBus,omitempty"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType string `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` - // DateTime - // // 下一班公車到達時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - NextBusTime string `json:"NextBusTime,omitempty"` + // Format: date-time + NextBusTime strfmt.DateTime `json:"NextBusTime,omitempty"` // String // @@ -85,20 +83,17 @@ type PTXServiceDTOBusSpecificationV2BusN1EstimateTime struct { // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 RouteUID string `json:"RouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz))[該欄位在N1資料中無意義] - SrcRecTime string `json:"SrcRecTime,omitempty"` + // Format: date-time + SrcRecTime strfmt.DateTime `json:"SrcRecTime,omitempty"` - // DateTime - // // 來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故有提供此欄位, 而非公總系統因使用整包資料更新, 故沒有提供此欄位] - SrcTransTime string `json:"SrcTransTime,omitempty"` + // Format: date-time + SrcTransTime strfmt.DateTime `json:"SrcTransTime,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故沒有提供此欄位, 而非公總系統因提供整包資料更新, 故有提供此欄] - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // 車輛距離本站站數 StopCountDown int32 `json:"StopCountDown,omitempty"` @@ -118,10 +113,10 @@ type PTXServiceDTOBusSpecificationV2BusN1EstimateTime struct { // 路線經過站牌之順序 StopSequence int32 `json:"StopSequence,omitempty"` - // integer + // Int32 // // 車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運'] - StopStatus string `json:"StopStatus,omitempty"` + StopStatus int64 `json:"StopStatus,omitempty"` // String // @@ -145,22 +140,26 @@ type PTXServiceDTOBusSpecificationV2BusN1EstimateTime struct { // 子路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz))[該欄位在N1資料中無意義] - TransTime string `json:"TransTime,omitempty"` + // Format: date-time + TransTime strfmt.DateTime `json:"TransTime,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v2 bus n1 estimate time func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDataTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateDirection(formats); err != nil { res = append(res, err) } @@ -169,10 +168,26 @@ func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) Validate(formats strf res = append(res, err) } + if err := m.validateNextBusTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateRouteName(formats); err != nil { res = append(res, err) } + if err := m.validateSrcRecTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcTransTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStopName(formats); err != nil { res = append(res, err) } @@ -181,6 +196,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) Validate(formats strf res = append(res, err) } + if err := m.validateTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -191,6 +210,18 @@ func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) Validate(formats strf return nil } +func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateDataTime(formats strfmt.Registry) error { + if swag.IsZero(m.DataTime) { // not required + return nil + } + + if err := validate.FormatOf("DataTime", "body", "date-time", m.DataTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateDirection(formats strfmt.Registry) error { if err := validate.Required("Direction", "body", m.Direction); err != nil { @@ -224,6 +255,18 @@ func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateEstimates(for return nil } +func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateNextBusTime(formats strfmt.Registry) error { + if swag.IsZero(m.NextBusTime) { // not required + return nil + } + + if err := validate.FormatOf("NextBusTime", "body", "date-time", m.NextBusTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateRouteName(formats strfmt.Registry) error { if swag.IsZero(m.RouteName) { // not required return nil @@ -232,6 +275,42 @@ func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateRouteName(for return nil } +func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateSrcRecTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcRecTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcRecTime", "body", "date-time", m.SrcRecTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateSrcTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcTransTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcTransTime", "body", "date-time", m.SrcTransTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateStopName(formats strfmt.Registry) error { if swag.IsZero(m.StopName) { // not required return nil @@ -248,12 +327,28 @@ func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateSubRouteName( return nil } +func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.TransTime) { // not required + return nil + } + + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusN1EstimateTime) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go index 14b0ee57..bee0989a 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_news.go @@ -47,10 +47,9 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // Required: true Description *string `json:"Description" xml:"String"` - // DateTime - // // 結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` // String // @@ -58,10 +57,10 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // Required: true Language *string `json:"Language" xml:"String"` - // integer + // Int32 // // 消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'通阻資訊',99:'其他'] - NewsCategory string `json:"NewsCategory,omitempty"` + NewsCategory int64 `json:"NewsCategory,omitempty"` // String // @@ -78,17 +77,16 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // // 消息公告日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - PublishTime *string `json:"PublishTime"` + // Format: date-time + PublishTime *strfmt.DateTime `json:"PublishTime"` - // DateTime - // // 來源端平台資料更新時間 - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` - // DateTime - // // 開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // @@ -100,7 +98,8 @@ type PTXServiceDTOBusSpecificationV2BusNews struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v2 bus news @@ -111,6 +110,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusNews) Validate(formats strfmt.Registr res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateLanguage(formats); err != nil { res = append(res, err) } @@ -123,6 +126,14 @@ func (m *PTXServiceDTOBusSpecificationV2BusNews) Validate(formats strfmt.Registr res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateTitle(formats); err != nil { res = append(res, err) } @@ -146,6 +157,18 @@ func (m *PTXServiceDTOBusSpecificationV2BusNews) validateDescription(formats str return nil } +func (m *PTXServiceDTOBusSpecificationV2BusNews) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV2BusNews) validateLanguage(formats strfmt.Registry) error { if err := validate.Required("Language", "body", m.Language); err != nil { @@ -170,6 +193,34 @@ func (m *PTXServiceDTOBusSpecificationV2BusNews) validatePublishTime(formats str return err } + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusNews) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV2BusNews) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + return nil } @@ -188,6 +239,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusNews) validateUpdateTime(formats strf return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_o_d_fare.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_o_d_fare.go index 763c18f8..649cd87d 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_o_d_fare.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_o_d_fare.go @@ -30,7 +30,7 @@ type PTXServiceDTOBusSpecificationV2BusODFare struct { PTXServiceDTOBusSpecificationV2BusRouteFareStop } `json:"DestinationStop" xml:"Stop"` - // integer + // Int32 // // 方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route.go index b4d21942..b63a6dde 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route.go @@ -28,7 +28,7 @@ type PTXServiceDTOBusSpecificationV2BusRoute struct { // Required: true AuthorityID *string `json:"AuthorityID" xml:"String"` - // integer + // Int32 // // 公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車'] // Required: true @@ -136,7 +136,8 @@ type PTXServiceDTOBusSpecificationV2BusRoute struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -313,6 +314,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusRoute) validateUpdateTime(formats str return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare.go index 2a425699..b3bb2d36 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare.go @@ -22,23 +22,23 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusRouteFare type PTXServiceDTOBusSpecificationV2BusRouteFare struct { - // integer + // Int32 // // 描述該路線計費方式 : [0:'段次計費',1:'起迄站間計費',2:'計費站區間計費'] // Required: true - FarePricingType *string `json:"FarePricingType"` + FarePricingType *int64 `json:"FarePricingType"` - // integer + // Int32 // // 該收費方式是否應用到所有附屬路線 : [0:'否',1:'是'] // Required: true - IsForAllSubRoutes *string `json:"IsForAllSubRoutes"` + IsForAllSubRoutes *int64 `json:"IsForAllSubRoutes"` - // integer + // Int32 // // 是否為免費公車 : [0:'否',1:'是'] // Required: true - IsFreeBus *string `json:"IsFreeBus"` + IsFreeBus *int64 `json:"IsFreeBus"` // Array // @@ -86,7 +86,8 @@ type PTXServiceDTOBusSpecificationV2BusRouteFare struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v2 bus route fare @@ -258,6 +259,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusRouteFare) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare_fare.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare_fare.go index 30b2cb27..17b378ba 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare_fare.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_fare_fare.go @@ -19,11 +19,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusRouteFare+Fare type PTXServiceDTOBusSpecificationV2BusRouteFareFare struct { - // integer + // Int32 // // 費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票'] // Required: true - FareClass *string `json:"FareClass"` + FareClass *int64 `json:"FareClass"` // Int32 // @@ -31,11 +31,11 @@ type PTXServiceDTOBusSpecificationV2BusRouteFareFare struct { // Required: true Price *int32 `json:"Price"` - // integer + // Int32 // // 票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期'] // Required: true - TicketType *string `json:"TicketType"` + TicketType *int64 `json:"TicketType"` } // Validate validates this p t x service d t o bus specification v2 bus route fare fare diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_network.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_network.go index 4fb4b913..9e0465e6 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_network.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_route_network.go @@ -50,7 +50,8 @@ type PTXServiceDTOBusSpecificationV2BusRouteNetwork struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -147,6 +148,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusRouteNetwork) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_s2_s_travel_time.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_s2_s_travel_time.go index d7c2c815..52d17512 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_s2_s_travel_time.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_s2_s_travel_time.go @@ -22,7 +22,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusS2STravelTime type PTXServiceDTOBusSpecificationV2BusS2STravelTime struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true @@ -62,7 +62,8 @@ type PTXServiceDTOBusSpecificationV2BusS2STravelTime struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v2 bus s2 s travel time @@ -179,6 +180,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusS2STravelTime) validateUpdateTime(for return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_schedule.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_schedule.go index 38790241..1429ffec 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_schedule.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_schedule.go @@ -22,7 +22,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusSchedule type PTXServiceDTOBusSpecificationV2BusSchedule struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true @@ -92,7 +92,8 @@ type PTXServiceDTOBusSpecificationV2BusSchedule struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -264,6 +265,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusSchedule) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_shape.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_shape.go index 131970ed..167191bf 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_shape.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_shape.go @@ -21,7 +21,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusShape type PTXServiceDTOBusSpecificationV2BusShape struct { - // integer + // Int32 // // 去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true @@ -81,7 +81,8 @@ type PTXServiceDTOBusSpecificationV2BusShape struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -213,6 +214,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusShape) validateUpdateTime(formats str return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stage_fare.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stage_fare.go index 900f4c0e..f471f995 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stage_fare.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stage_fare.go @@ -30,7 +30,7 @@ type PTXServiceDTOBusSpecificationV2BusStageFare struct { PTXServiceDTOBusSpecificationV2BusStage } `json:"DestinationStage" xml:"BusStage"` - // integer + // Int32 // // 方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go index faf54ebf..c51133ac 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station.go @@ -80,7 +80,8 @@ type PTXServiceDTOBusSpecificationV2BusStation struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -198,6 +199,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusStation) validateUpdateTime(formats s return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station_group.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station_group.go index bcc9fca5..916af921 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station_group.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_station_group.go @@ -53,7 +53,8 @@ type PTXServiceDTOBusSpecificationV2BusStationGroup struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +131,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusStationGroup) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop.go index 7aad49e0..2c1858c1 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop.go @@ -100,7 +100,8 @@ type PTXServiceDTOBusSpecificationV2BusStop struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -203,6 +204,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusStop) validateUpdateTime(formats strf return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop_of_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop_of_route.go index af40368a..19fba444 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop_of_route.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_stop_of_route.go @@ -32,7 +32,7 @@ type PTXServiceDTOBusSpecificationV2BusStopOfRoute struct { // 站牌權管所屬縣市之代碼(國際ISO 3166-2 三碼城市代碼)[若為公路/國道客運路線則為空值] CityCode string `json:"CityCode,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] Direction int64 `json:"Direction,omitempty"` @@ -92,7 +92,8 @@ type PTXServiceDTOBusSpecificationV2BusStopOfRoute struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -252,6 +253,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusStopOfRoute) validateUpdateTime(forma return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_sub_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_sub_route.go index 18cf89ab..03bd4cca 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_sub_route.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_sub_route.go @@ -21,7 +21,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.BusSubRoute type PTXServiceDTOBusSpecificationV2BusSubRoute struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_vehicle_info.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_vehicle_info.go index 8a270b8b..e3840588 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_vehicle_info.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_vehicle_info.go @@ -31,9 +31,10 @@ type PTXServiceDTOBusSpecificationV2BusVehicleInfo struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` - // integer + // Int32 // // 車輛種類 : [0:'一般',1:'無障礙公車',2:'復康巴士',3:'小型巴士'] // Required: true @@ -77,6 +78,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusVehicleInfo) validateUpdateTime(forma return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_version.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_version.go index 837f18b6..f195378a 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_version.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_bus_version.go @@ -25,13 +25,15 @@ type PTXServiceDTOBusSpecificationV2BusVersion struct { // // 此資料版本最後檢查更新之日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateCheckTime *string `json:"UpdateCheckTime"` + // Format: date-time + UpdateCheckTime *strfmt.DateTime `json:"UpdateCheckTime"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -68,6 +70,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusVersion) validateUpdateCheckTime(form return err } + if err := validate.FormatOf("UpdateCheckTime", "body", "date-time", m.UpdateCheckTime.String(), formats); err != nil { + return err + } + return nil } @@ -77,6 +83,10 @@ func (m *PTXServiceDTOBusSpecificationV2BusVersion) validateUpdateTime(formats s return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_service_day.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_service_day.go index 82806f9b..546bb4bf 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_service_day.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_service_day.go @@ -21,52 +21,52 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.Embedded.ServiceDay type PTXServiceDTOBusSpecificationV2EmbeddedServiceDay struct { - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *string `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *string `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 國定假日營運與否 : [0:'否',1:'是'] - NationalHolidays string `json:"NationalHolidays,omitempty"` + NationalHolidays int64 `json:"NationalHolidays,omitempty"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *string `json:"Saturday"` + Saturday *int64 `json:"Saturday"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *string `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *string `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *string `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *string `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o bus specification v2 embedded service day diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_stop.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_stop.go index 584e9a19..fab125ef 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_stop.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_embedded_stop.go @@ -37,10 +37,10 @@ type PTXServiceDTOBusSpecificationV2EmbeddedStop struct { // 站牌所屬的站位ID StationID string `json:"StationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車'] - StopBoarding string `json:"StopBoarding,omitempty"` + StopBoarding int64 `json:"StopBoarding,omitempty"` // String // diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_n1_estimate.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_n1_estimate.go index 5a0714ab..0d96e5b9 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_n1_estimate.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_n1_estimate.go @@ -28,10 +28,10 @@ type PTXServiceDTOBusSpecificationV2N1Estimate struct { // 車輛車牌號碼 PlateNumb string `json:"PlateNumb,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 車輛於該站之進離站狀態 : [0:'離站',1:'進站'] - VehicleStopStatus string `json:"VehicleStopStatus,omitempty"` + VehicleStopStatus int64 `json:"VehicleStopStatus,omitempty"` } // Validate validates this p t x service d t o bus specification v2 n1 estimate diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go index 801ed9f2..f920c072 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_route.go @@ -20,7 +20,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Route type PTXServiceDTOBusSpecificationV2ScopeRoute struct { - // integer + // Int32 // // 影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] Direction int64 `json:"Direction,omitempty"` diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go index 9a8d4037..16f56b8a 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_sub_route.go @@ -20,7 +20,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+SubRoute type PTXServiceDTOBusSpecificationV2ScopeSubRoute struct { - // integer + // Int32 // // 影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] Direction int64 `json:"Direction,omitempty"` diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go index 4e8412c3..fdb6f673 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_scope_trip.go @@ -19,7 +19,7 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V2.Scope+Trip type PTXServiceDTOBusSpecificationV2ScopeTrip struct { - // integer + // Int32 // // 影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] Direction int64 `json:"Direction,omitempty"` diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_section_fare_buffer_zone.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_section_fare_buffer_zone.go index 027685c8..97da13ad 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_section_fare_buffer_zone.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_section_fare_buffer_zone.go @@ -24,7 +24,7 @@ type PTXServiceDTOBusSpecificationV2SectionFareBufferZone struct { // 收費緩衝區描述 BufferZoneDescription string `json:"BufferZoneDescription,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true diff --git a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_special_day.go b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_special_day.go index d70bf5e7..c2b0ce71 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_special_day.go +++ b/bus/v2/models/p_t_x_service_d_t_o_bus_specification_v2_special_day.go @@ -37,10 +37,10 @@ type PTXServiceDTOBusSpecificationV2SpecialDay struct { // 特殊營運描述 Description string `json:"Description,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 營運服務狀態代碼 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運'] - ServiceStatus string `json:"ServiceStatus,omitempty"` + ServiceStatus int64 `json:"ServiceStatus,omitempty"` } // Validate validates this p t x service d t o bus specification v2 special day diff --git a/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go b/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go index 47178923..e37a421d 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go +++ b/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go @@ -93,7 +93,8 @@ type PTXServiceDTOSharedSpecificationV2BaseOperator struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o shared specification v2 base operator @@ -190,6 +191,10 @@ func (m *PTXServiceDTOSharedSpecificationV2BaseOperator) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go b/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go index a6eac788..464b00ad 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go +++ b/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go @@ -25,18 +25,19 @@ type PTXServiceDTOSharedSpecificationV3BaseInbound struct { // // 檢核時間 // Required: true - CheckTime *string `json:"CheckTime"` + // Format: date-time + CheckTime *strfmt.DateTime `json:"CheckTime"` // String // // 檢核失敗原因 Reason string `json:"Reason,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 檢核結果狀態 : [0:'失敗',1:'成功'] // Required: true - Status *string `json:"Status"` + Status *int64 `json:"Status"` } // Validate validates this p t x service d t o shared specification v3 base inbound @@ -63,6 +64,10 @@ func (m *PTXServiceDTOSharedSpecificationV3BaseInbound) validateCheckTime(format return err } + if err := validate.FormatOf("CheckTime", "body", "date-time", m.CheckTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go b/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go index fc59f967..b7df751d 100644 --- a/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go +++ b/bus/v2/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go @@ -25,18 +25,19 @@ type PTXServiceDTOSharedSpecificationV3BaseOutbound struct { // // 檢核時間 // Required: true - CheckTime *string `json:"CheckTime"` + // Format: date-time + CheckTime *strfmt.DateTime `json:"CheckTime"` // String // // 檢核失敗原因 Reason string `json:"Reason,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 檢核結果狀態 : [0:'失敗',1:'成功'] // Required: true - Status *string `json:"Status"` + Status *int64 `json:"Status"` } // Validate validates this p t x service d t o shared specification v3 base outbound @@ -63,6 +64,10 @@ func (m *PTXServiceDTOSharedSpecificationV3BaseOutbound) validateCheckTime(forma return err } + if err := validate.FormatOf("CheckTime", "body", "date-time", m.CheckTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a1_data.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a1_data.go index 7e6bda85..cefda30b 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a1_data.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a1_data.go @@ -33,38 +33,36 @@ type PTXServiceDTOBusSpecificationV3A1Data struct { PTXServiceDTOSharedSpecificationV3BasePointType } `json:"BusPosition" xml:"PointType"` - // integer + // Int32 // // 行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知'] // Required: true - BusStatus *string `json:"BusStatus"` + BusStatus *int64 `json:"BusStatus"` - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` - // integer + // Int32 // // 勤務狀態 : [0:'正常',1:'開始',2:'結束'] // Required: true - DutyStatus *string `json:"DutyStatus"` + DutyStatus *int64 `json:"DutyStatus"` - // DateTime - // // 車機系統紀錄時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - GPSTime string `json:"GPSTime,omitempty"` + // Format: date-time + GPSTime strfmt.DateTime `json:"GPSTime,omitempty"` - // DateTime - // // 車機系統傳送日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - GPSTransTime string `json:"GPSTransTime,omitempty"` + // Format: date-time + GPSTransTime strfmt.DateTime `json:"GPSTransTime,omitempty"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType string `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` // String // @@ -95,7 +93,8 @@ type PTXServiceDTOBusSpecificationV3A1Data struct { // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - RecTime *string `json:"RecTime"` + // Format: date-time + RecTime *strfmt.DateTime `json:"RecTime"` // String // @@ -142,17 +141,18 @@ type PTXServiceDTOBusSpecificationV3A1Data struct { // // 來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - TransTime *string `json:"TransTime"` + // Format: date-time + TransTime *strfmt.DateTime `json:"TransTime"` // String // // 班次代碼 TripID string `json:"TripID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 車輛種類 : [1:'一般',2:'復康巴士',3:'專車',4:'其他'] - VehicleType string `json:"VehicleType,omitempty"` + VehicleType int64 `json:"VehicleType,omitempty"` } // Validate validates this p t x service d t o bus specification v3 a1 data @@ -179,6 +179,14 @@ func (m *PTXServiceDTOBusSpecificationV3A1Data) Validate(formats strfmt.Registry res = append(res, err) } + if err := m.validateGPSTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGPSTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateOperatorCode(formats); err != nil { res = append(res, err) } @@ -266,6 +274,30 @@ func (m *PTXServiceDTOBusSpecificationV3A1Data) validateDutyStatus(formats strfm return nil } +func (m *PTXServiceDTOBusSpecificationV3A1Data) validateGPSTime(formats strfmt.Registry) error { + if swag.IsZero(m.GPSTime) { // not required + return nil + } + + if err := validate.FormatOf("GPSTime", "body", "date-time", m.GPSTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3A1Data) validateGPSTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.GPSTransTime) { // not required + return nil + } + + if err := validate.FormatOf("GPSTransTime", "body", "date-time", m.GPSTransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV3A1Data) validateOperatorCode(formats strfmt.Registry) error { if err := validate.Required("OperatorCode", "body", m.OperatorCode); err != nil { @@ -307,6 +339,10 @@ func (m *PTXServiceDTOBusSpecificationV3A1Data) validateRecTime(formats strfmt.R return err } + if err := validate.FormatOf("RecTime", "body", "date-time", m.RecTime.String(), formats); err != nil { + return err + } + return nil } @@ -350,6 +386,10 @@ func (m *PTXServiceDTOBusSpecificationV3A1Data) validateTransTime(formats strfmt return err } + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a2_data.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a2_data.go index 7fcbfaf9..47da07a3 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a2_data.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_a2_data.go @@ -19,42 +19,40 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.A2Data type PTXServiceDTOBusSpecificationV3A2Data struct { - // integer + // Int32 // // 進站離站 : [0:'離站',1:'進站'] // Required: true - A2EventType *string `json:"A2EventType"` + A2EventType *int64 `json:"A2EventType"` - // integer + // Int32 // // 行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知'] - BusStatus string `json:"BusStatus,omitempty"` + BusStatus int64 `json:"BusStatus,omitempty"` - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` - // integer + // Int32 // // 勤務狀態 : [0:'正常',1:'開始',2:'結束'] - DutyStatus string `json:"DutyStatus,omitempty"` + DutyStatus int64 `json:"DutyStatus,omitempty"` - // DateTime - // // 車機系統紀錄時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - GPSTime string `json:"GPSTime,omitempty"` + // Format: date-time + GPSTime strfmt.DateTime `json:"GPSTime,omitempty"` - // DateTime - // // 車機系統傳送日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - GPSTransTime string `json:"GPSTransTime,omitempty"` + // Format: date-time + GPSTransTime strfmt.DateTime `json:"GPSTransTime,omitempty"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType string `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` // String // @@ -85,7 +83,8 @@ type PTXServiceDTOBusSpecificationV3A2Data struct { // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - RecTime *string `json:"RecTime"` + // Format: date-time + RecTime *strfmt.DateTime `json:"RecTime"` // String // @@ -144,17 +143,18 @@ type PTXServiceDTOBusSpecificationV3A2Data struct { // // 來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - TransTime *string `json:"TransTime"` + // Format: date-time + TransTime *strfmt.DateTime `json:"TransTime"` // String // // 班次代碼 TripID string `json:"TripID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 車輛種類 : [1:'一般',2:'復康巴士',3:'專車',4:'其他'] - VehicleType string `json:"VehicleType,omitempty"` + VehicleType int64 `json:"VehicleType,omitempty"` } // Validate validates this p t x service d t o bus specification v3 a2 data @@ -169,6 +169,14 @@ func (m *PTXServiceDTOBusSpecificationV3A2Data) Validate(formats strfmt.Registry res = append(res, err) } + if err := m.validateGPSTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateGPSTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateOperatorCode(formats); err != nil { res = append(res, err) } @@ -237,6 +245,30 @@ func (m *PTXServiceDTOBusSpecificationV3A2Data) validateDirection(formats strfmt return nil } +func (m *PTXServiceDTOBusSpecificationV3A2Data) validateGPSTime(formats strfmt.Registry) error { + if swag.IsZero(m.GPSTime) { // not required + return nil + } + + if err := validate.FormatOf("GPSTime", "body", "date-time", m.GPSTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3A2Data) validateGPSTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.GPSTransTime) { // not required + return nil + } + + if err := validate.FormatOf("GPSTransTime", "body", "date-time", m.GPSTransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV3A2Data) validateOperatorCode(formats strfmt.Registry) error { if err := validate.Required("OperatorCode", "body", m.OperatorCode); err != nil { @@ -278,6 +310,10 @@ func (m *PTXServiceDTOBusSpecificationV3A2Data) validateRecTime(formats strfmt.R return err } + if err := validate.FormatOf("RecTime", "body", "date-time", m.RecTime.String(), formats); err != nil { + return err + } + return nil } @@ -329,6 +365,10 @@ func (m *PTXServiceDTOBusSpecificationV3A2Data) validateTransTime(formats strfmt return err } + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_alert.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_alert.go index ac4b2c33..eb83558a 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_alert.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_alert.go @@ -40,15 +40,15 @@ type PTXServiceDTOBusSpecificationV3Alert struct { // 影響方向 Direction string `json:"Direction,omitempty" xml:"String,omitempty"` - // DateTime - // // 結束日期時間 - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` // DateTime // // 消息公告日期時間 - PublishTime string `json:"PublishTime,omitempty"` + // Format: date-time + PublishTime strfmt.DateTime `json:"PublishTime,omitempty"` // Scope // @@ -61,12 +61,12 @@ type PTXServiceDTOBusSpecificationV3Alert struct { // DateTime // // [來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` - // DateTime - // // 開始日期時間 - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // @@ -82,10 +82,26 @@ func (m *PTXServiceDTOBusSpecificationV3Alert) Validate(formats strfmt.Registry) res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateScope(formats); err != nil { res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -101,11 +117,59 @@ func (m *PTXServiceDTOBusSpecificationV3Alert) validateAlertID(formats strfmt.Re return nil } +func (m *PTXServiceDTOBusSpecificationV3Alert) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3Alert) validatePublishTime(formats strfmt.Registry) error { + if swag.IsZero(m.PublishTime) { // not required + return nil + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV3Alert) validateScope(formats strfmt.Registry) error { return nil } +func (m *PTXServiceDTOBusSpecificationV3Alert) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3Alert) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + // ContextValidate validate this p t x service d t o bus specification v3 alert based on the context it is used func (m *PTXServiceDTOBusSpecificationV3Alert) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go index 70488488..bc615c58 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go @@ -26,13 +26,14 @@ type PTXServiceDTOBusSpecificationV3DailyTimeTable struct { // // 適用日期 // Required: true - Date *string `json:"Date"` + // Format: date-time + Date *strfmt.DateTime `json:"Date"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -146,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3DailyTimeTable) validateDate(formats str return err } + if err := validate.FormatOf("Date", "body", "date-time", m.Date.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go index f4390a17..0234bbeb 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go @@ -20,11 +20,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.DisplayStopOfRoute type PTXServiceDTOBusSpecificationV3DisplayStopOfRoute struct { - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go index 2998bbce..92917bfd 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go @@ -20,11 +20,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.FirstLastTripInfo type PTXServiceDTOBusSpecificationV3FirstLastTripInfo struct { - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_n1_data.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_n1_data.go index ee917161..0cc5336c 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_n1_data.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_n1_data.go @@ -24,10 +24,9 @@ type PTXServiceDTOBusSpecificationV3N1Data struct { // 車輛目前所在站牌代碼 CurrentStop string `json:"CurrentStop,omitempty" xml:"String,omitempty"` - // DateTime - // // 系統演算該筆預估到站資料的時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - DataTime string `json:"DataTime,omitempty"` + // Format: date-time + DataTime strfmt.DateTime `json:"DataTime,omitempty"` // String // @@ -41,11 +40,11 @@ type PTXServiceDTOBusSpecificationV3N1Data struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"DestinationStopName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 車輛去返程(該方向指的是此公車運具目前所在路線的去返程方向,非指站牌所在路線的去返程方向,使用時請加值業者多加注意) : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // 到站時間預估(秒) [當StopStatus値為1~4或PlateNumb値為-1時,EstimateTime値為空値; 反之,EstimateTime有値] EstimateTime int32 `json:"EstimateTime,omitempty"` @@ -62,7 +61,8 @@ type PTXServiceDTOBusSpecificationV3N1Data struct { // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - RecTime *string `json:"RecTime"` + // Format: date-time + RecTime *strfmt.DateTime `json:"RecTime"` // String // @@ -103,10 +103,10 @@ type PTXServiceDTOBusSpecificationV3N1Data struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"StopName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運'] - StopStatus string `json:"StopStatus,omitempty"` + StopStatus int64 `json:"StopStatus,omitempty"` // String // @@ -134,13 +134,18 @@ type PTXServiceDTOBusSpecificationV3N1Data struct { // // 來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - TransTime *string `json:"TransTime"` + // Format: date-time + TransTime *strfmt.DateTime `json:"TransTime"` } // Validate validates this p t x service d t o bus specification v3 n1 data func (m *PTXServiceDTOBusSpecificationV3N1Data) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDataTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateDestinationStopName(formats); err != nil { res = append(res, err) } @@ -183,6 +188,18 @@ func (m *PTXServiceDTOBusSpecificationV3N1Data) Validate(formats strfmt.Registry return nil } +func (m *PTXServiceDTOBusSpecificationV3N1Data) validateDataTime(formats strfmt.Registry) error { + if swag.IsZero(m.DataTime) { // not required + return nil + } + + if err := validate.FormatOf("DataTime", "body", "date-time", m.DataTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV3N1Data) validateDestinationStopName(formats strfmt.Registry) error { if swag.IsZero(m.DestinationStopName) { // not required return nil @@ -206,6 +223,10 @@ func (m *PTXServiceDTOBusSpecificationV3N1Data) validateRecTime(formats strfmt.R return err } + if err := validate.FormatOf("RecTime", "body", "date-time", m.RecTime.String(), formats); err != nil { + return err + } + return nil } @@ -257,6 +278,10 @@ func (m *PTXServiceDTOBusSpecificationV3N1Data) validateTransTime(formats strfmt return err } + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_news.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_news.go index 1cc21f21..f97c1a3d 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_news.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_news.go @@ -35,10 +35,9 @@ type PTXServiceDTOBusSpecificationV3News struct { // Required: true Description *string `json:"Description" xml:"String"` - // DateTime - // // 結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` // String // @@ -67,17 +66,18 @@ type PTXServiceDTOBusSpecificationV3News struct { // // 消息公告日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - PublishTime *string `json:"PublishTime"` + // Format: date-time + PublishTime *strfmt.DateTime `json:"PublishTime"` // DateTime // // [來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` - // DateTime - // // 開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // @@ -94,6 +94,10 @@ func (m *PTXServiceDTOBusSpecificationV3News) Validate(formats strfmt.Registry) res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateLanguage(formats); err != nil { res = append(res, err) } @@ -110,6 +114,14 @@ func (m *PTXServiceDTOBusSpecificationV3News) Validate(formats strfmt.Registry) res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateTitle(formats); err != nil { res = append(res, err) } @@ -129,6 +141,18 @@ func (m *PTXServiceDTOBusSpecificationV3News) validateDescription(formats strfmt return nil } +func (m *PTXServiceDTOBusSpecificationV3News) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV3News) validateLanguage(formats strfmt.Registry) error { if err := validate.Required("Language", "body", m.Language); err != nil { @@ -162,6 +186,34 @@ func (m *PTXServiceDTOBusSpecificationV3News) validatePublishTime(formats strfmt return err } + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3News) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3News) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route.go index e142e87c..8cbd8822 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route.go @@ -115,11 +115,11 @@ type PTXServiceDTOBusSpecificationV3Route struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"RouteName" xml:"NameType"` - // integer + // Int32 // // 公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運'] // Required: true - RouteType *string `json:"RouteType"` + RouteType *int64 `json:"RouteType"` // String // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare.go index 3d2deb70..3f9f3127 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare.go @@ -22,23 +22,23 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.RouteFare type PTXServiceDTOBusSpecificationV3RouteFare struct { - // integer + // Int32 // // 描述該路線計費方式 : [0:'段次計費',1:'起迄站間計費',2:'計費站區間計費'] // Required: true - FarePricingType *string `json:"FarePricingType"` + FarePricingType *int64 `json:"FarePricingType"` - // integer + // Int32 // // 該收費方式是否應用到所有附屬路線 : [0:'否',1:'是'] // Required: true - IsForAllSubRoutes *string `json:"IsForAllSubRoutes"` + IsForAllSubRoutes *int64 `json:"IsForAllSubRoutes"` - // integer + // Int32 // // 是否為免費公車 : [0:'否',1:'是'] // Required: true - IsFreeBus *string `json:"IsFreeBus"` + IsFreeBus *int64 `json:"IsFreeBus"` // Array // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare.go index f9c1d597..c82eed41 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare.go @@ -28,11 +28,11 @@ type PTXServiceDTOBusSpecificationV3RouteFareODFare struct { PTXServiceDTOBusSpecificationV3RouteFareODFareOD } `json:"DestinationStops" xml:"OD"` - // integer + // Int32 // // 方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare_fare_o_d.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare_fare_o_d.go index 225ba1bc..2e791604 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare_fare_o_d.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_o_d_fare_fare_o_d.go @@ -19,11 +19,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.RouteFare+ODFare+FareOD type PTXServiceDTOBusSpecificationV3RouteFareODFareFareOD struct { - // integer + // Int32 // // 費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票'] // Required: true - FareClass *string `json:"FareClass"` + FareClass *int64 `json:"FareClass"` // String // @@ -31,11 +31,11 @@ type PTXServiceDTOBusSpecificationV3RouteFareODFareFareOD struct { // Required: true Price *string `json:"Price" xml:"String"` - // integer + // Int32 // // 票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期'] // Required: true - TicketType *string `json:"TicketType"` + TicketType *int64 `json:"TicketType"` } // Validate validates this p t x service d t o bus specification v3 route fare o d fare fare o d diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_buffer_zone.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_buffer_zone.go index 8cb9c8db..d9ca8226 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_buffer_zone.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_buffer_zone.go @@ -24,11 +24,11 @@ type PTXServiceDTOBusSpecificationV3RouteFareSectionFareBufferZone struct { // 收費緩衝區描述 BufferZoneDescription string `json:"BufferZoneDescription,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // FareBufferZone // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_fare_section.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_fare_section.go index 2cdd6da5..e93e72e2 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_fare_section.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_section_fare_fare_section.go @@ -19,11 +19,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.RouteFare+SectionFare+FareSection type PTXServiceDTOBusSpecificationV3RouteFareSectionFareFareSection struct { - // integer + // Int32 // // 費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票'] // Required: true - FareClass *string `json:"FareClass"` + FareClass *int64 `json:"FareClass"` // String // @@ -31,11 +31,11 @@ type PTXServiceDTOBusSpecificationV3RouteFareSectionFareFareSection struct { // Required: true Price *string `json:"Price" xml:"String"` - // integer + // Int32 // // 票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期'] // Required: true - TicketType *string `json:"TicketType"` + TicketType *int64 `json:"TicketType"` } // Validate validates this p t x service d t o bus specification v3 route fare section fare fare section diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare.go index 7d8d152b..568af4da 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare.go @@ -28,11 +28,11 @@ type PTXServiceDTOBusSpecificationV3RouteFareStageFare struct { PTXServiceDTOBusSpecificationV3RouteFareStageFareStage } `json:"DestinationStage" xml:"Stage"` - // integer + // Int32 // // 方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_fare_stage.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_fare_stage.go index 402e12ad..1d6a4b93 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_fare_stage.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_fare_stage.go @@ -27,10 +27,10 @@ type PTXServiceDTOBusSpecificationV3RouteFareStageFareFareStage struct { // 優惠時段 DiscountPeriods []*PTXServiceDTOBusSpecificationV3RouteFareStageFareDiscountPeriod "json:\"DiscountPeriods\" xml:\"List`1\"" - // integer + // Int32 // // 費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票'] - FareClass string `json:"FareClass,omitempty"` + FareClass int64 `json:"FareClass,omitempty"` // String // @@ -43,11 +43,11 @@ type PTXServiceDTOBusSpecificationV3RouteFareStageFareFareStage struct { // 計費價格 Price string `json:"Price,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期'] // Required: true - TicketType *string `json:"TicketType"` + TicketType *int64 `json:"TicketType"` } // Validate validates this p t x service d t o bus specification v3 route fare stage fare fare stage diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_service_day.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_service_day.go index c0f48537..291b2efc 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_service_day.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_route_fare_stage_fare_service_day.go @@ -21,38 +21,38 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.RouteFare+StageFare+ServiceDay type PTXServiceDTOBusSpecificationV3RouteFareStageFareServiceDay struct { - // integer + // Int32 // // 假日後一日是否營運 : [0:'否',1:'是'] - DayAfterHoliday string `json:"DayAfterHoliday,omitempty"` + DayAfterHoliday int64 `json:"DayAfterHoliday,omitempty"` - // integer + // Int32 // // 假日前一日是否營運 : [0:'否',1:'是'] - DayBeforeHoliday string `json:"DayBeforeHoliday,omitempty"` + DayBeforeHoliday int64 `json:"DayBeforeHoliday,omitempty"` - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *string `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *string `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 國定假日是否營運 : [0:'否',1:'是'] - NationalHolidays string `json:"NationalHolidays,omitempty"` + NationalHolidays int64 `json:"NationalHolidays,omitempty"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *string `json:"Saturday"` + Saturday *int64 `json:"Saturday"` // String // @@ -60,34 +60,34 @@ type PTXServiceDTOBusSpecificationV3RouteFareStageFareServiceDay struct { // Required: true ServiceTag *string `json:"ServiceTag" xml:"String"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *string `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *string `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *string `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 颱風停止上班上課期間是否營運 : [0:'否',1:'是'] - TyphoonDay string `json:"TyphoonDay,omitempty"` + TyphoonDay int64 `json:"TyphoonDay,omitempty"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *string `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o bus specification v3 route fare stage fare service day diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule.go index 02c04439..b401d331 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule.go @@ -22,11 +22,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.Schedule type PTXServiceDTOBusSpecificationV3Schedule struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_service_day.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_service_day.go index d7ef16d9..686fa35c 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_service_day.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_service_day.go @@ -17,65 +17,65 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.Schedule+ServiceDay type PTXServiceDTOBusSpecificationV3ScheduleServiceDay struct { - // integer + // Int32 // // 國定假日後一日營運與否 : [0:'否',1:'是'] - DayAfterHoliday string `json:"DayAfterHoliday,omitempty"` + DayAfterHoliday int64 `json:"DayAfterHoliday,omitempty"` - // integer + // Int32 // // 國定假日前一日營運與否 : [0:'否',1:'是'] - DayBeforeHoliday string `json:"DayBeforeHoliday,omitempty"` + DayBeforeHoliday int64 `json:"DayBeforeHoliday,omitempty"` - // integer + // Int32 // // 星期五營運與否 : [0:'否',1:'是'] - Friday string `json:"Friday,omitempty"` + Friday int64 `json:"Friday,omitempty"` - // integer + // Int32 // // 星期一營運與否 : [0:'否',1:'是'] - Monday string `json:"Monday,omitempty"` + Monday int64 `json:"Monday,omitempty"` - // integer + // Int32 // // 國定假日營運與否 : [0:'否',1:'是'] - NationalHolidays string `json:"NationalHolidays,omitempty"` + NationalHolidays int64 `json:"NationalHolidays,omitempty"` - // integer + // Int32 // // 星期六營運與否 : [0:'否',1:'是'] - Saturday string `json:"Saturday,omitempty"` + Saturday int64 `json:"Saturday,omitempty"` // String // // 服務日標籤 ServiceTag string `json:"ServiceTag,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 星期日營運與否 : [0:'否',1:'是'] - Sunday string `json:"Sunday,omitempty"` + Sunday int64 `json:"Sunday,omitempty"` - // integer + // Int32 // // 星期四營運與否 : [0:'否',1:'是'] - Thursday string `json:"Thursday,omitempty"` + Thursday int64 `json:"Thursday,omitempty"` - // integer + // Int32 // // 星期二營運與否 : [0:'否',1:'是'] - Tuesday string `json:"Tuesday,omitempty"` + Tuesday int64 `json:"Tuesday,omitempty"` - // integer + // Int32 // // 颱風停止上班上課期間營運與否 : [0:'否',1:'是'] - TyphoonDay string `json:"TyphoonDay,omitempty"` + TyphoonDay int64 `json:"TyphoonDay,omitempty"` - // integer + // Int32 // // 星期三營運與否 : [0:'否',1:'是'] - Wednesday string `json:"Wednesday,omitempty"` + Wednesday int64 `json:"Wednesday,omitempty"` } // Validate validates this p t x service d t o bus specification v3 schedule service day diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_special_day.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_special_day.go index 12a7c614..63f4bb13 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_special_day.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_schedule_special_day.go @@ -39,11 +39,11 @@ type PTXServiceDTOBusSpecificationV3ScheduleSpecialDay struct { // Required: true Description *string `json:"Description" xml:"String"` - // integer + // Int32 // // 營運服務狀態代碼0=停止營運, 1=正常營運 , 2=加班營運 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運'] // Required: true - ServiceStatus *string `json:"ServiceStatus"` + ServiceStatus *int64 `json:"ServiceStatus"` } // Validate validates this p t x service d t o bus specification v3 schedule special day diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_shape.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_shape.go index 24d504ba..e3358e3a 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_shape.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_shape.go @@ -19,11 +19,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.Shape type PTXServiceDTOBusSpecificationV3Shape struct { - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go index f6767bc1..eb1f9f36 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go @@ -20,11 +20,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.StopOfRoute type PTXServiceDTOBusSpecificationV3StopOfRoute struct { - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route_stop.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route_stop.go index 2109aab7..ff7ba48f 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route_stop.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_stop_of_route_stop.go @@ -19,11 +19,11 @@ import ( // swagger:model PTX.Service.DTO.Bus.Specification.V3.StopOfRoute+Stop type PTXServiceDTOBusSpecificationV3StopOfRouteStop struct { - // integer + // Int32 // // 上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車'] // Required: true - BoardingType *string `json:"BoardingType"` + BoardingType *int64 `json:"BoardingType"` // String // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_sub_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_sub_route.go index a2446763..ce862845 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_sub_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_sub_route.go @@ -34,11 +34,11 @@ type PTXServiceDTOBusSpecificationV3SubRoute struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"DestinationStopName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Stop // diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_vehicle.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_vehicle.go index 2afa1a26..0c0d3124 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_vehicle.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_vehicle.go @@ -78,22 +78,21 @@ type PTXServiceDTOBusSpecificationV3Vehicle struct { // Required: true PlateNumb *string `json:"PlateNumb" xml:"String"` - // DateTime - // // 購入時間 - PurchaseTime string `json:"PurchaseTime,omitempty"` + // Format: date-time + PurchaseTime strfmt.DateTime `json:"PurchaseTime,omitempty"` - // integer + // Int32 // // 車輛型別 : [1:'大型巴士',2:'中型巴士',3:'小型巴士',4:'雙層巴士',5:'雙節巴士',6:'計程車'] // Required: true - VehicleClass *string `json:"VehicleClass"` + VehicleClass *int64 `json:"VehicleClass"` - // integer + // Int32 // // 車輛種類 : [1:'一般',2:'復康巴士',3:'專車',4:'其他'] // Required: true - VehicleType *string `json:"VehicleType"` + VehicleType *int64 `json:"VehicleType"` } // Validate validates this p t x service d t o bus specification v3 vehicle @@ -136,6 +135,10 @@ func (m *PTXServiceDTOBusSpecificationV3Vehicle) Validate(formats strfmt.Registr res = append(res, err) } + if err := m.validatePurchaseTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateVehicleClass(formats); err != nil { res = append(res, err) } @@ -231,6 +234,18 @@ func (m *PTXServiceDTOBusSpecificationV3Vehicle) validatePlateNumb(formats strfm return nil } +func (m *PTXServiceDTOBusSpecificationV3Vehicle) validatePurchaseTime(formats strfmt.Registry) error { + if swag.IsZero(m.PurchaseTime) { // not required + return nil + } + + if err := validate.FormatOf("PurchaseTime", "body", "date-time", m.PurchaseTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOBusSpecificationV3Vehicle) validateVehicleClass(formats strfmt.Registry) error { if err := validate.Required("VehicleClass", "body", m.VehicleClass); err != nil { diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_g_wrapper_p_t_x_service_d_t_o_bus_specification_v3_schedule.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_g_wrapper_p_t_x_service_d_t_o_bus_specification_v3_schedule.go index 5856123e..ad62b69c 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_g_wrapper_p_t_x_service_d_t_o_bus_specification_v3_schedule.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_g_wrapper_p_t_x_service_d_t_o_bus_specification_v3_schedule.go @@ -35,12 +35,12 @@ type PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecificat // // 有效起始日期 // Required: true - EffectiveDate *string `json:"EffectiveDate"` + // Format: date-time + EffectiveDate *strfmt.DateTime `json:"EffectiveDate"` - // DateTime - // // 有效終止日期 - ExpireDate string `json:"ExpireDate,omitempty"` + // Format: date-time + ExpireDate strfmt.DateTime `json:"ExpireDate,omitempty"` // String // @@ -63,7 +63,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -75,7 +76,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // @@ -95,6 +97,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecif res = append(res, err) } + if err := m.validateExpireDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateSchedules(formats); err != nil { res = append(res, err) } @@ -136,6 +142,22 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("EffectiveDate", "body", "date-time", m.EffectiveDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecificationV3Schedule) validateExpireDate(formats strfmt.Registry) error { + if swag.IsZero(m.ExpireDate) { // not required + return nil + } + + if err := validate.FormatOf("ExpireDate", "body", "date-time", m.ExpireDate.String(), formats); err != nil { + return err + } + return nil } @@ -179,6 +201,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -197,6 +223,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusGWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_depot.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_depot.go index 1740e35c..35162633 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_depot.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_depot.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go index cff36ccd..92589594 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_display_stop_of_route.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go index 89364f2d..244bc8c3 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_first_last_trip_info.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_network.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_network.go index f70cbc49..7f7f80ab 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_network.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_network.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_operator.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_operator.go index 264b1acc..2cf8794e 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_operator.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_operator.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route.go index 26e10df2..167d3e73 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_network.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_network.go index 802d8d12..273ed46a 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_network.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_network.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_s2_s_travel_time.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_s2_s_travel_time.go index 61e80f92..2438ef44 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_s2_s_travel_time.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_s2_s_travel_time.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_shape.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_shape.go index e99f6bcb..7ddbf4de 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_shape.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_shape.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -155,6 +157,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_station.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_station.go index 532e3d6a..a7017f19 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_station.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_station.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop.go index 9f6e0466..6c35644b 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go index 55f42bb5..696a850e 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_stop_of_route.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_sub_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_sub_route.go index cef1d910..88f5414d 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_sub_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_sub_route.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle.go index 4cca75d5..1280d95f 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,7 +54,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Array // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -148,6 +154,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_depot.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_depot.go index aa48f20e..a0899fb6 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_depot.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_depot.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,7 +54,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Array // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -148,6 +154,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_route.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_route.go index a71ec589..17c6516c 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_route.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_v_wrapper_p_t_x_service_d_t_o_bus_specification_v3_vehicle_route.go @@ -41,7 +41,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,7 +54,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecificat // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Array // @@ -130,6 +132,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -148,6 +154,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusVWrapperPTXServiceDTOBusSpecif return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a1_data.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a1_data.go index 19a626ae..20b25848 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a1_data.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a1_data.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 a1 data @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a2_data.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a2_data.go index 1ed0cead..67ed9451 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a2_data.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_a2_data.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 a2 data @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_alert.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_alert.go index 2dd7bce7..39129e3d 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_alert.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_alert.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 alert @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go index 47fd5f0d..30daa824 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_daily_time_table.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 daily time table @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_n1_data.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_n1_data.go index a957b59a..bee88739 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_n1_data.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_n1_data.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 n1 data @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_news.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_news.go index 53eaf0b6..87229ed4 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_news.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_news.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 news @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_fare.go b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_fare.go index 5b952a67..a88e03fe 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_fare.go +++ b/bus/v3/models/p_t_x_service_d_t_o_bus_specification_v3_wrapper_bus_wrapper_p_t_x_service_d_t_o_bus_specification_v3_route_fare.go @@ -47,7 +47,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -59,7 +60,8 @@ type PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecificati // // [平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o bus specification v3 wrapper bus wrapper p t x service d t o bus specification v3 route fare @@ -145,6 +147,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -163,6 +169,10 @@ func (m *PTXServiceDTOBusSpecificationV3WrapperBusWrapperPTXServiceDTOBusSpecifi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go b/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go index a6eac788..464b00ad 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go +++ b/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_inbound.go @@ -25,18 +25,19 @@ type PTXServiceDTOSharedSpecificationV3BaseInbound struct { // // 檢核時間 // Required: true - CheckTime *string `json:"CheckTime"` + // Format: date-time + CheckTime *strfmt.DateTime `json:"CheckTime"` // String // // 檢核失敗原因 Reason string `json:"Reason,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 檢核結果狀態 : [0:'失敗',1:'成功'] // Required: true - Status *string `json:"Status"` + Status *int64 `json:"Status"` } // Validate validates this p t x service d t o shared specification v3 base inbound @@ -63,6 +64,10 @@ func (m *PTXServiceDTOSharedSpecificationV3BaseInbound) validateCheckTime(format return err } + if err := validate.FormatOf("CheckTime", "body", "date-time", m.CheckTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go b/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go index fc59f967..b7df751d 100644 --- a/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go +++ b/bus/v3/models/p_t_x_service_d_t_o_shared_specification_v3_base_outbound.go @@ -25,18 +25,19 @@ type PTXServiceDTOSharedSpecificationV3BaseOutbound struct { // // 檢核時間 // Required: true - CheckTime *string `json:"CheckTime"` + // Format: date-time + CheckTime *strfmt.DateTime `json:"CheckTime"` // String // // 檢核失敗原因 Reason string `json:"Reason,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 檢核結果狀態 : [0:'失敗',1:'成功'] // Required: true - Status *string `json:"Status"` + Status *int64 `json:"Status"` } // Validate validates this p t x service d t o shared specification v3 base outbound @@ -63,6 +64,10 @@ func (m *PTXServiceDTOSharedSpecificationV3BaseOutbound) validateCheckTime(forma return err } + if err := validate.FormatOf("CheckTime", "body", "date-time", m.CheckTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/oas.air.v2.json b/oas.air.v2.json index d273477a..c37a08ac 100644 --- a/oas.air.v2.json +++ b/oas.air.v2.json @@ -58,7 +58,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -100,9 +100,7 @@ "operationId": "AirApi_Airport_1", "produces": [ "application/json", - "application/xml", - "text/plain", - "text/json" + "application/xml" ], "parameters": [ { @@ -144,9 +142,7 @@ "operationId": "AirApi_Airline", "produces": [ "application/json", - "application/xml", - "text/plain", - "text/json" + "application/xml" ], "parameters": [ { @@ -945,7 +941,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -1031,7 +1027,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -1209,23 +1205,6 @@ } }, "definitions": { - "PTX.Service.DTO.Shared.Specification.V2.Base.NameType": { - "title": "NameType", - "description": "名稱資料型別", - "type": "object", - "properties": { - "Zh_tw": { - "title": "String", - "description": "中文繁體名稱", - "type": "string" - }, - "En": { - "title": "String", - "description": "英文名稱", - "type": "string" - } - } - }, "PTX.Service.DTO.Air.Specification.V2.Airline": { "title": "Airline", "description": "航空公司資料", @@ -1239,7 +1218,10 @@ "AirlineID": { "title": "String", "description": "航空公司IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirlineName": { "title": "NameType", @@ -1248,7 +1230,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "AirlineNameAlias": { "title": "NameType", @@ -1257,39 +1242,61 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "AirlineIATA": { "title": "String", "description": "航空公司IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirlineICAO": { "title": "String", "description": "航空公司ICAO國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirlineEmail": { "title": "String", "description": "航空公司電子信箱", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirlineAddress": { "title": "String", "description": "航空公司地址", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirlinePhone": { "title": "String", "description": "航空公司聯繫電話", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirlineNationality": { "title": "String", "description": "航空公司國籍", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -1300,28 +1307,9 @@ "description": "資料版本編號", "type": "integer" } - } - }, - "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": { - "title": "PointType", - "description": "座標資料型別", - "type": "object", - "properties": { - "PositionLat": { - "format": "double", - "description": "位置緯度(WGS84)", - "type": "number" - }, - "PositionLon": { - "format": "double", - "description": "位置經度(WGS84)", - "type": "number" - }, - "GeoHash": { - "title": "String", - "description": "地理空間編碼", - "type": "string" - } + }, + "xml": { + "name": "Airline" } }, "PTX.Service.DTO.Air.Specification.V2.Airport": { @@ -1337,7 +1325,10 @@ "AirportID": { "title": "String", "description": "機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirportName": { "title": "NameType", @@ -1346,17 +1337,26 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "AirportIATA": { "title": "String", "description": "機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirportICAO": { "title": "String", "description": "機場ICAO國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirportPosition": { "title": "PointType", @@ -1365,7 +1365,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, "AirportCityName": { "title": "NameType", @@ -1374,29 +1377,45 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "AirportAddress": { "title": "String", "description": "機場地址", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirportPhone": { "title": "String", "description": "機場聯繫電話", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirportNationality": { "title": "String", "description": "機場國籍", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AuthorityID": { "title": "String", "description": "業管機關代碼(流水號)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -1407,11 +1426,94 @@ "description": "資料版本編號", "type": "integer" } + }, + "xml": { + "name": "Airport" } }, - "PTX.Service.DTO.Air.Specification.V2.FIDSDeparture": { - "title": "FIDSDeparture", - "description": "出發航班顯示資料", + "PTX.Service.DTO.Air.Specification.V2.Airport_FIDS": { + "title": "Airport_FIDS", + "description": "航班顯示資料(以機場角度)", + "required": [ + "AirportID", + "UpdateTime" + ], + "type": "object", + "properties": { + "AirportID": { + "title": "String", + "description": "機場IATA國際代碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "FIDSDeparture": { + "title": "Array", + "description": "出發航班顯示資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSDeparture" + }, + "xml": { + "name": "List`1" + } + }, + "FIDSArrival": { + "title": "Array", + "description": "抵達航班顯示資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSArrival" + }, + "xml": { + "name": "List`1" + } + }, + "UpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + } + }, + "xml": { + "name": "Airport_FIDS" + } + }, + "PTX.Service.DTO.Air.Specification.V2.CodeShare": { + "title": "CodeShare", + "description": "共用班號", + "required": [ + "AirlineID", + "FlightNumber" + ], + "type": "object", + "properties": { + "AirlineID": { + "title": "String", + "description": "航空公司IATA國際代碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "FlightNumber": { + "title": "String", + "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "CodeShare" + } + }, + "PTX.Service.DTO.Air.Specification.V2.FIDS": { + "title": "FIDS", + "description": "航班顯示資料", "required": [ "AirlineID", "ArrivalAirportID", @@ -1423,80 +1525,196 @@ "type": "object", "properties": { "FlightDate": { - "title": "DateTime", + "format": "date-time", "description": "航班日期(ISO8601格式:yyyy-MM-dd)", "type": "string" }, "FlightNumber": { "title": "String", "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirRouteType": { - "format": "int32", - "title": "integer", - "description": "航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']", + "title": "Int32", + "description": "航線種類 : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']", "type": "integer" }, "AirlineID": { "title": "String", "description": "航空公司IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "DepartureAirportID": { "title": "String", "description": "起點機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ArrivalAirportID": { "title": "String", "description": "目的地機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ScheduleDepartureTime": { - "title": "DateTime", + "format": "date-time", "description": "表訂出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "ActualDepartureTime": { - "title": "DateTime", + "format": "date-time", "description": "實際出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "EstimatedDepartureTime": { - "title": "DateTime", + "format": "date-time", "description": "預估出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, + "ScheduleArrivalTime": { + "format": "date-time", + "description": "表訂抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", + "type": "string" + }, + "ActualArrivalTime": { + "format": "date-time", + "description": "實際抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", + "type": "string" + }, + "EstimatedArrivalTime": { + "format": "date-time", + "description": "預估抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", + "type": "string" + }, "DepartureRemark": { "title": "String", - "description": "航班屬性狀態, ,為該機場觀點的狀態", - "type": "string" + "description": "航班屬性狀態,為第三方觀點的狀態(資料來源:民航局)", + "type": "string", + "xml": { + "name": "String" + } }, "DepartureRemarkEn": { "title": "String", "description": "航班屬性狀態(英文)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, - "Terminal": { + "ArrivalRemark": { "title": "String", - "description": "航廈", - "type": "string" + "description": "航班屬性狀態,為該機場觀點的狀態", + "type": "string", + "xml": { + "name": "String" + } }, - "Gate": { + "ArrivalRemarkEn": { "title": "String", - "description": "登機門(僅客機提供)", - "type": "string" + "description": "航班屬性狀態(英文)", + "type": "string", + "xml": { + "name": "String" + } }, - "Apron": { + "FlightStatus": { "title": "String", - "description": "停機坪(僅貨機提供)", - "type": "string" + "description": "航班運行狀態,以航班的角度的狀態", + "type": "string", + "xml": { + "name": "String" + } + }, + "FlightStatusEn": { + "title": "String", + "description": "航班運行狀態(英文)", + "type": "string", + "xml": { + "name": "String" + } + }, + "FlightStatusPC": { + "title": "String", + "description": "航班運行狀態百分比(國內線)", + "type": "string", + "xml": { + "name": "String" + } + }, + "FlightRemark": { + "title": "String", + "description": "航班屬性", + "type": "string", + "xml": { + "name": "String" + } + }, + "ArrivalTerminal": { + "title": "String", + "description": "抵達航廈", + "type": "string", + "xml": { + "name": "String" + } + }, + "DepartureTerminal": { + "title": "String", + "description": "出發航廈", + "type": "string", + "xml": { + "name": "String" + } + }, + "ArrivalGate": { + "title": "String", + "description": "抵達登機門(僅客機提供)", + "type": "string", + "xml": { + "name": "String" + } + }, + "DepartureGate": { + "title": "String", + "description": "出發登機門(僅客機提供)", + "type": "string", + "xml": { + "name": "String" + } + }, + "ArrivalApron": { + "title": "String", + "description": "抵達停機坪(僅貨機提供)", + "type": "string", + "xml": { + "name": "String" + } + }, + "DepartureApron": { + "title": "String", + "description": "出發停機坪(僅貨機提供)", + "type": "string", + "xml": { + "name": "String" + } }, "CodeShare": { "title": "String", "description": "航班共用班號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "IsCargo": { "title": "Boolean", @@ -1506,23 +1724,36 @@ "AcType": { "title": "String", "description": "航空器型號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "BaggageClaim": { "title": "String", - "description": "行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)", - "type": "string" + "description": "行李轉盤", + "type": "string", + "xml": { + "name": "String" + } }, "CheckCounter": { "title": "String", - "description": "報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)", - "type": "string" + "description": "報到櫃檯", + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "FIDS" } }, "PTX.Service.DTO.Air.Specification.V2.FIDSArrival": { @@ -1539,80 +1770,109 @@ "type": "object", "properties": { "FlightDate": { - "title": "DateTime", + "format": "date-time", "description": "航班日期(ISO8601格式:yyyy-MM-dd)", "type": "string" }, "FlightNumber": { "title": "String", "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirRouteType": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']", "type": "integer" }, "AirlineID": { "title": "String", "description": "航空公司IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "DepartureAirportID": { "title": "String", "description": "起點機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ArrivalAirportID": { "title": "String", "description": "目的地機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ScheduleArrivalTime": { - "title": "DateTime", + "format": "date-time", "description": "表訂抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "ActualArrivalTime": { - "title": "DateTime", + "format": "date-time", "description": "實際抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "EstimatedArrivalTime": { - "title": "DateTime", + "format": "date-time", "description": "預估抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "ArrivalRemark": { "title": "String", "description": "航班屬性狀態,為該機場觀點的狀態", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ArrivalRemarkEn": { "title": "String", "description": "航班屬性狀態(英文)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Terminal": { "title": "String", "description": "航廈", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Gate": { "title": "String", "description": "登機門(僅客機提供)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Apron": { "title": "String", "description": "停機坪(僅貨機提供)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CodeShare": { "title": "String", "description": "航班共用班號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "IsCargo": { "title": "Boolean", @@ -1622,65 +1882,41 @@ "AcType": { "title": "String", "description": "航空器型號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "BaggageClaim": { "title": "String", "description": "行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CheckCounter": { "title": "String", "description": "報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)", - "type": "string" - }, - "UpdateTime": { - "title": "DateTime", - "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - } - } - }, - "PTX.Service.DTO.Air.Specification.V2.Airport_FIDS": { - "title": "Airport_FIDS", - "description": "航班顯示資料(以機場角度)", - "required": [ - "AirportID", - "UpdateTime" - ], - "type": "object", - "properties": { - "AirportID": { - "title": "String", - "description": "機場IATA國際代碼", - "type": "string" - }, - "FIDSDeparture": { - "title": "Array", - "description": "出發航班顯示資料", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSDeparture" - } - }, - "FIDSArrival": { - "title": "Array", - "description": "抵達航班顯示資料", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.FIDSArrival" + "type": "string", + "xml": { + "name": "String" } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "FIDSArrival" } }, - "PTX.Service.DTO.Air.Specification.V2.FIDS": { - "title": "FIDS", - "description": "航班顯示資料", + "PTX.Service.DTO.Air.Specification.V2.FIDSDeparture": { + "title": "FIDSDeparture", + "description": "出發航班顯示資料", "required": [ "AirlineID", "ArrivalAirportID", @@ -1692,140 +1928,109 @@ "type": "object", "properties": { "FlightDate": { - "title": "DateTime", + "format": "date-time", "description": "航班日期(ISO8601格式:yyyy-MM-dd)", "type": "string" }, "FlightNumber": { "title": "String", "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AirRouteType": { - "format": "int32", - "title": "integer", - "description": "航線種類 : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']", + "title": "Int32", + "description": "航線種類(目前民航局與桃機的FIDS系統都尚未提供此欄位資料) : [-2:'特殊',1:'國際',2:'國內',3:'兩岸',4:'國際包機',5:'國內包機',6:'兩岸包機']", "type": "integer" }, "AirlineID": { "title": "String", "description": "航空公司IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "DepartureAirportID": { "title": "String", "description": "起點機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ArrivalAirportID": { "title": "String", "description": "目的地機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ScheduleDepartureTime": { - "title": "DateTime", + "format": "date-time", "description": "表訂出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "ActualDepartureTime": { - "title": "DateTime", + "format": "date-time", "description": "實際出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, "EstimatedDepartureTime": { - "title": "DateTime", + "format": "date-time", "description": "預估出發時間(ISO8601格式:yyyy-MM-ddTHH:mm)", "type": "string" }, - "ScheduleArrivalTime": { - "title": "DateTime", - "description": "表訂抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", - "type": "string" - }, - "ActualArrivalTime": { - "title": "DateTime", - "description": "實際抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", - "type": "string" - }, - "EstimatedArrivalTime": { - "title": "DateTime", - "description": "預估抵達時間(ISO8601格式:yyyy-MM-ddTHH:mm)", - "type": "string" - }, "DepartureRemark": { "title": "String", - "description": "航班屬性狀態,為第三方觀點的狀態(資料來源:民航局)", - "type": "string" + "description": "航班屬性狀態, ,為該機場觀點的狀態", + "type": "string", + "xml": { + "name": "String" + } }, "DepartureRemarkEn": { "title": "String", "description": "航班屬性狀態(英文)", - "type": "string" - }, - "ArrivalRemark": { - "title": "String", - "description": "航班屬性狀態,為該機場觀點的狀態", - "type": "string" - }, - "ArrivalRemarkEn": { - "title": "String", - "description": "航班屬性狀態(英文)", - "type": "string" - }, - "FlightStatus": { - "title": "String", - "description": "航班運行狀態,以航班的角度的狀態", - "type": "string" - }, - "FlightStatusEn": { - "title": "String", - "description": "航班運行狀態(英文)", - "type": "string" - }, - "FlightStatusPC": { - "title": "String", - "description": "航班運行狀態百分比(國內線)", - "type": "string" - }, - "FlightRemark": { - "title": "String", - "description": "航班屬性", - "type": "string" - }, - "ArrivalTerminal": { - "title": "String", - "description": "抵達航廈", - "type": "string" - }, - "DepartureTerminal": { - "title": "String", - "description": "出發航廈", - "type": "string" - }, - "ArrivalGate": { - "title": "String", - "description": "抵達登機門(僅客機提供)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, - "DepartureGate": { + "Terminal": { "title": "String", - "description": "出發登機門(僅客機提供)", - "type": "string" + "description": "航廈", + "type": "string", + "xml": { + "name": "String" + } }, - "ArrivalApron": { + "Gate": { "title": "String", - "description": "抵達停機坪(僅貨機提供)", - "type": "string" + "description": "登機門(僅客機提供)", + "type": "string", + "xml": { + "name": "String" + } }, - "DepartureApron": { + "Apron": { "title": "String", - "description": "出發停機坪(僅貨機提供)", - "type": "string" + "description": "停機坪(僅貨機提供)", + "type": "string", + "xml": { + "name": "String" + } }, "CodeShare": { "title": "String", "description": "航班共用班號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "IsCargo": { "title": "Boolean", @@ -1835,44 +2040,36 @@ "AcType": { "title": "String", "description": "航空器型號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "BaggageClaim": { "title": "String", - "description": "行李轉盤", - "type": "string" + "description": "行李轉盤(到站FIDS可能有「行李轉盤」資訊, 離站FIDS不會有, 貨機則無此資訊)", + "type": "string", + "xml": { + "name": "String" + } }, "CheckCounter": { "title": "String", - "description": "報到櫃檯", - "type": "string" + "description": "報到櫃檯(離站FIDS可能有「報到櫃台」資訊, 到站FIDS不會有, 貨機則無此資訊)", + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } - } - }, - "PTX.Service.DTO.Air.Specification.V2.CodeShare": { - "title": "CodeShare", - "description": "共用班號", - "required": [ - "AirlineID", - "FlightNumber" - ], - "type": "object", - "properties": { - "AirlineID": { - "title": "String", - "description": "航空公司IATA國際代碼", - "type": "string" - }, - "FlightNumber": { - "title": "String", - "description": "航機班號(不包含航空公司的AirlineID,僅有班號數字)", - "type": "string" - } + }, + "xml": { + "name": "FIDSDeparture" } }, "PTX.Service.DTO.Air.Specification.V2.GeneralFlightSchedule": { @@ -1902,14 +2099,19 @@ "AirlineID": { "title": "String", "description": "航空公司IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ScheduleStartDate": { + "format": "date-time", "title": "DateTime", "description": "班表開始日期(ISO8601格式:yyyy-MM-dd)", "type": "string" }, "ScheduleEndDate": { + "format": "date-time", "title": "DateTime", "description": "班表結束日期(ISO8601格式:yyyy-MM-dd)", "type": "string" @@ -1917,17 +2119,26 @@ "FlightNumber": { "title": "String", "description": "班機號碼(包含航空公司的AirlineID,結構為AirlineID加上3~4碼航機班號數字;若班號僅有兩碼,其結構會加上0補足三碼,\"AirlineID + 0 + 兩碼班號\")", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "DepartureAirportID": { "title": "String", "description": "起點機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "DepartureTime": { "title": "String", "description": "起點機場出發時間 (格式: HH:mm 當地時間,跨日以+1 表示)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CodeShare": { "title": "Array", @@ -1935,17 +2146,26 @@ "type": "array", "items": { "$ref": "#/definitions/PTX.Service.DTO.Air.Specification.V2.CodeShare" + }, + "xml": { + "name": "List`1" } }, "ArrivalAirportID": { "title": "String", "description": "目的地機場IATA國際代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ArrivalTime": { "title": "String", "description": "終點機場抵達時間 (格式: HH:mm 當地時間,跨日以+1 表示)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Monday": { "title": "Boolean", @@ -1985,9 +2205,13 @@ "Terminal": { "title": "String", "description": "航廈", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -1998,6 +2222,9 @@ "description": "資料版本編號", "type": "integer" } + }, + "xml": { + "name": "GeneralFlightSchedule" } }, "PTX.Service.DTO.Air.Specification.V2.METAR": { @@ -2025,12 +2252,18 @@ "AirportID": { "title": "String", "description": "機場代碼(IATA)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StationID": { "title": "String", "description": "機場氣象觀測站代碼(ICAO)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CountryName": { "title": "NameType", @@ -2039,7 +2272,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "CityName": { "title": "NameType", @@ -2048,7 +2284,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "AirportName": { "title": "NameType", @@ -2057,7 +2296,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "StationPosition": { "title": "PointType", @@ -2066,9 +2308,13 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, "ObservationTime": { + "format": "date-time", "title": "DateTime", "description": "觀測時間", "type": "string" @@ -2076,37 +2322,58 @@ "MetarText": { "title": "String", "description": "機場天氣報告(METAR/SPECI)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "MetarTime": { "title": "String", "description": "機場天氣報告時間(地方時)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "WindDirection": { "title": "String", "description": "風向(含單位)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "WindSpeed": { "title": "String", "description": "風速(含單位)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Visibility": { "title": "String", "description": "盛行能見度(含單位,9999以10公里以上表示)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Ceiling": { "title": "String", "description": "雲冪(含單位)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Temperature": { "title": "String", "description": "溫度(含單位)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "WeatherDescription": { "title": "NameType", @@ -2115,13 +2382,74 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "METAR" + } + }, + "PTX.Service.DTO.Shared.Specification.V2.Base.NameType": { + "title": "NameType", + "description": "名稱資料型別", + "type": "object", + "properties": { + "Zh_tw": { + "title": "String", + "description": "中文繁體名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "En": { + "title": "String", + "description": "英文名稱", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "NameType" + } + }, + "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": { + "title": "PointType", + "description": "座標資料型別", + "type": "object", + "properties": { + "PositionLon": { + "format": "double", + "description": "位置經度(WGS84)", + "type": "number" + }, + "PositionLat": { + "format": "double", + "description": "位置緯度(WGS84)", + "type": "number" + }, + "GeoHash": { + "title": "String", + "description": "地理空間編碼", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "PointType" } } }, diff --git a/oas.bike.v2.json b/oas.bike.v2.json index f92e20c2..cd7c444c 100644 --- a/oas.bike.v2.json +++ b/oas.bike.v2.json @@ -34,7 +34,6 @@ "Taichung", "Hsinchu", "MiaoliCounty", - "ChanghuaCounty", "NewTaipei", "PingtungCounty", "KinmenCounty", @@ -91,7 +90,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -146,7 +145,6 @@ "Taichung", "Hsinchu", "MiaoliCounty", - "ChanghuaCounty", "NewTaipei", "PingtungCounty", "KinmenCounty", @@ -158,13 +156,13 @@ "x-enum": { "NewTaipei": "新北市", "MiaoliCounty": "苗栗縣", - "ChanghuaCounty": "彰化縣", "Kaohsiung": "高雄市", "Tainan": "臺南市", "KinmenCounty": "金門縣", "PingtungCounty": "屏東縣", "Taoyuan": "桃園市", "Taipei": "臺北市", + "ChanghuaCounty": "彰化縣", "Taichung": "臺中市", "Hsinchu": "新竹市" } @@ -402,7 +400,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾(最大搜尋半徑為1000公尺)", + "description": "空間過濾(最大搜尋半徑為1000公尺),語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "required": true, "type": "string" }, @@ -482,7 +480,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾(最大搜尋半徑為1000公尺)", + "description": "空間過濾(最大搜尋半徑為1000公尺),語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "required": true, "type": "string" }, @@ -528,16 +526,21 @@ "StationUID": { "title": "String", "description": "站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StationID": { "title": "String", "description": "站點代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "ServiceAvailable": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "服務狀態 : [0:'停止營運',1:'正常營運']", "type": "integer" }, @@ -554,15 +557,19 @@ "type": "integer" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BikeAvailability" } }, "PTX.Service.DTO.Bike.Specification.V2.BikeShape": { @@ -580,47 +587,74 @@ "RouteName": { "title": "String", "description": "路線名稱", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AuthorityName": { "title": "String", "description": "業管機關名稱(可能包含多個業管機關)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CityCode": { "title": "String", "description": "路線所在縣市代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "City": { "title": "String", "description": "路線所在縣市名稱", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Town": { "title": "String", "description": "路線所在鄉鎮名稱(可能包含多個鄉鎮)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RoadSectionStart": { "title": "String", "description": "路線起點描述", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RoadSectionEnd": { "title": "String", "description": "路線迄點描述", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Direction": { "title": "String", "description": "自行車道車行方向", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CyclingType": { "title": "String", "description": "自行車道類型", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "CyclingLength": { "format": "double", @@ -630,9 +664,13 @@ "FinishedTime": { "title": "String", "description": "自行車道完工日期時間", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -640,52 +678,22 @@ "Geometry": { "title": "String", "description": "well-known text,為路線軌跡資料", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "EncodedPolyline": { "title": "String", "description": "路線軌跡編碼(encoded polyline)", - "type": "string" - } - } - }, - "PTX.Service.DTO.Shared.Specification.V2.Base.NameType": { - "title": "NameType", - "description": "名稱資料型別", - "type": "object", - "properties": { - "Zh_tw": { - "title": "String", - "description": "中文繁體名稱", - "type": "string" - }, - "En": { - "title": "String", - "description": "英文名稱", - "type": "string" - } - } - }, - "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": { - "title": "PointType", - "description": "座標資料型別", - "type": "object", - "properties": { - "PositionLat": { - "format": "double", - "description": "位置緯度(WGS84)", - "type": "number" - }, - "PositionLon": { - "format": "double", - "description": "位置經度(WGS84)", - "type": "number" - }, - "GeoHash": { - "title": "String", - "description": "地理空間編碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "BikeShape" } }, "PTX.Service.DTO.Bike.Specification.V2.BikeStation": { @@ -699,17 +707,26 @@ "StationUID": { "title": "String", "description": "站點唯一識別代碼,規則為 {業管機關代碼} + {StationID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StationID": { "title": "String", "description": "站點代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "AuthorityID": { "title": "String", "description": "業管單位代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StationName": { "title": "NameType", @@ -718,7 +735,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "StationPosition": { "title": "PointType", @@ -727,7 +747,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, "StationAddress": { "title": "NameType", @@ -736,12 +759,18 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "StopDescription": { "title": "String", "description": "站點描述", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "BikesCapacity": { "format": "int32", @@ -750,15 +779,73 @@ "type": "integer" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BikeStation" + } + }, + "PTX.Service.DTO.Shared.Specification.V2.Base.NameType": { + "title": "NameType", + "description": "名稱資料型別", + "type": "object", + "properties": { + "Zh_tw": { + "title": "String", + "description": "中文繁體名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "En": { + "title": "String", + "description": "英文名稱", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "NameType" + } + }, + "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": { + "title": "PointType", + "description": "座標資料型別", + "type": "object", + "properties": { + "PositionLon": { + "format": "double", + "description": "位置經度(WGS84)", + "type": "number" + }, + "PositionLat": { + "format": "double", + "description": "位置緯度(WGS84)", + "type": "number" + }, + "GeoHash": { + "title": "String", + "description": "地理空間編碼", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "PointType" } } }, diff --git a/oas.bus.v2.json b/oas.bus.v2.json index d48c7450..68e2fe67 100644 --- a/oas.bus.v2.json +++ b/oas.bus.v2.json @@ -8550,7 +8550,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -8577,46 +8577,48 @@ "type": "number" }, "DutyStatus": { - "title": "integer", + "title": "Int32", "description": "勤務狀態 : [0:'正常',1:'開始',2:'結束']", - "type": "string" + "type": "integer" }, "BusStatus": { - "title": "integer", + "title": "Int32", "description": "行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知']", - "type": "string" + "type": "integer" }, "MessageType": { - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", - "type": "string" + "type": "integer" }, "GPSTime": { + "format": "date-time", "title": "DateTime", "description": "車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "TransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[多數單位沒有提供此欄位資訊]", "type": "string" }, "SrcRecTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcTransTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故有提供此欄位, 而非公總系統因使用整包資料更新, 故沒有提供此欄位]", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故沒有提供此欄位, 而非公總系統因提供整包資料更新, 故有提供此欄]", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8710,7 +8712,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -8749,51 +8751,53 @@ "type": "integer" }, "MessageType": { - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", - "type": "string" + "type": "integer" }, "DutyStatus": { - "title": "integer", + "title": "Int32", "description": "勤務狀態 : [0:'正常',1:'開始',2:'結束']", - "type": "string" + "type": "integer" }, "BusStatus": { - "title": "integer", + "title": "Int32", "description": "行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知']", - "type": "string" + "type": "integer" }, "A2EventType": { - "title": "integer", + "title": "Int32", "description": "進站離站 : [0:'離站',1:'進站']", - "type": "string" + "type": "integer" }, "GPSTime": { + "format": "date-time", "title": "DateTime", "description": "車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) [觸發到離站的GPS時間]", "type": "string" }, "TransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[多數單位沒有提供此欄位資訊]", "type": "string" }, "SrcRecTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcTransTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故有提供此欄位, 而非公總系統因使用整包資料更新, 故沒有提供此欄位]", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故沒有提供此欄位, 而非公總系統因提供整包資料更新, 故有提供此欄]", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8847,19 +8851,19 @@ } }, "Status": { - "title": "integer", + "title": "Int32", "description": "營運狀況 : [0:'全部營運停止',1:'全部營運正常',2:'有異常狀況']", - "type": "string" + "type": "integer" }, "Cause": { - "title": "integer", + "title": "Int32", "description": "原因 : [1:'事故',2:'維護',3:'技術問題',4:'施工',5:'急救',6:'天災',7:'示威遊行',8:'維安',9:'假日',10:'罷工',254:'其他',255:'未知原因']", - "type": "string" + "type": "integer" }, "Effect": { - "title": "integer", + "title": "Int32", "description": "影響 : [1:'車輛改道',2:'服務班次增加',3:'服務班次減少',4:'服務班次取消',5:'服務班次改變',6:'站牌不停靠',7:'重大延遲',254:'其他影響',255:'未知影響']", - "type": "string" + "type": "integer" }, "Scope": { "title": "Scope", @@ -8882,26 +8886,28 @@ } }, "PublishTime": { - "title": "DateTime", + "format": "date-time", "description": "消息公告日期時間", "type": "string" }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "開始日期時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "結束日期時間", "type": "string" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8996,7 +9002,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -9012,6 +9018,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9046,14 +9053,14 @@ } }, "TicketType": { - "title": "integer", + "title": "Int32", "description": "票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期']", - "type": "string" + "type": "integer" }, "FareClass": { - "title": "integer", + "title": "Int32", "description": "費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票']", - "type": "string" + "type": "integer" }, "Price": { "format": "int32", @@ -9160,7 +9167,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -9176,6 +9183,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9205,59 +9213,59 @@ "type": "object", "properties": { "DayBeforeNationalHoliday": { - "title": "integer", + "title": "Int32", "description": "國定假日前一日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayAfterNationalHoliday": { - "title": "integer", + "title": "Int32", "description": "國定假日後一日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "TyphoonDay": { - "title": "integer", + "title": "Int32", "description": "颱風停止上班上課期間營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "NationalHolidays": { - "title": "integer", + "title": "Int32", "description": "國定假日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -9432,7 +9440,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程(該方向指的是此車牌車輛目前所在路線的去返程方向,非指站站牌所在路線的去返程方向,使用時請加值業者多加注意) : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -9468,17 +9476,17 @@ "type": "integer" }, "StopStatus": { - "title": "integer", + "title": "Int32", "description": "車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運']", - "type": "string" + "type": "integer" }, "MessageType": { - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", - "type": "string" + "type": "integer" }, "NextBusTime": { - "title": "DateTime", + "format": "date-time", "description": "下一班公車到達時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -9498,31 +9506,32 @@ } }, "DataTime": { - "title": "DateTime", + "format": "date-time", "description": "系統演算該筆預估到站資料的時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[目前僅公總提供此欄位資訊]", "type": "string" }, "TransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz))[該欄位在N1資料中無意義]", "type": "string" }, "SrcRecTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz))[該欄位在N1資料中無意義]", "type": "string" }, "SrcTransTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故有提供此欄位, 而非公總系統因使用整包資料更新, 故沒有提供此欄位]", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)[公總使用動態即時推播故沒有提供此欄位, 而非公總系統因提供整包資料更新, 故有提供此欄]", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9578,9 +9587,9 @@ } }, "NewsCategory": { - "title": "integer", + "title": "Int32", "description": "消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'通阻資訊',99:'其他']", - "type": "string" + "type": "integer" }, "Description": { "title": "String", @@ -9623,26 +9632,28 @@ } }, "PublishTime": { + "format": "date-time", "title": "DateTime", "description": "消息公告日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9664,7 +9675,7 @@ "type": "object", "properties": { "Direction": { - "title": "integer", + "title": "Int32", "description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -9785,7 +9796,7 @@ } }, "BusRouteType": { - "title": "integer", + "title": "Int32", "description": "公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車']", "type": "integer" }, @@ -9890,6 +9901,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9959,19 +9971,19 @@ } }, "FarePricingType": { - "title": "integer", + "title": "Int32", "description": "描述該路線計費方式 : [0:'段次計費',1:'起迄站間計費',2:'計費站區間計費']", - "type": "string" + "type": "integer" }, "IsFreeBus": { - "title": "integer", + "title": "Int32", "description": "是否為免費公車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "IsForAllSubRoutes": { - "title": "integer", + "title": "Int32", "description": "該收費方式是否應用到所有附屬路線 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "SectionFares": { "title": "Array", @@ -10007,6 +10019,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10026,14 +10039,14 @@ "type": "object", "properties": { "TicketType": { - "title": "integer", + "title": "Int32", "description": "票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期']", - "type": "string" + "type": "integer" }, "FareClass": { - "title": "integer", + "title": "Int32", "description": "費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票']", - "type": "string" + "type": "integer" }, "Price": { "format": "int32", @@ -10127,6 +10140,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10232,7 +10246,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -10248,6 +10262,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10330,7 +10345,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -10373,6 +10388,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10461,7 +10477,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -10482,6 +10498,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10538,7 +10555,7 @@ "type": "object", "properties": { "Direction": { - "title": "integer", + "title": "Int32", "description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -10680,6 +10697,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10749,6 +10767,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10892,6 +10911,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10991,7 +11011,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -11023,6 +11043,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11178,7 +11199,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -11293,11 +11314,12 @@ } }, "VehicleType": { - "title": "integer", + "title": "Int32", "description": "車輛種類 : [0:'一般',1:'無障礙公車',2:'復康巴士',3:'小型巴士']", "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11324,11 +11346,13 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateCheckTime": { + "format": "date-time", "title": "DateTime", "description": "此資料版本最後檢查更新之日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11430,44 +11454,44 @@ "type": "object", "properties": { "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "NationalHolidays": { - "title": "integer", + "title": "Int32", "description": "國定假日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -11516,9 +11540,9 @@ } }, "StopBoarding": { - "title": "integer", + "title": "Int32", "description": "上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車']", - "type": "string" + "type": "integer" }, "StopSequence": { "format": "int32", @@ -11632,9 +11656,9 @@ "type": "boolean" }, "VehicleStopStatus": { - "title": "integer", + "title": "Int32", "description": "車輛於該站之進離站狀態 : [0:'離站',1:'進站']", - "type": "string" + "type": "integer" } }, "xml": { @@ -11773,7 +11797,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" } @@ -11876,7 +11900,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" } @@ -11915,7 +11939,7 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -11993,7 +12017,7 @@ "type": "integer" }, "Direction": { - "title": "integer", + "title": "Int32", "description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -12112,9 +12136,9 @@ } }, "ServiceStatus": { - "title": "integer", + "title": "Int32", "description": "營運服務狀態代碼 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運']", - "type": "string" + "type": "integer" }, "Description": { "title": "String", @@ -12398,6 +12422,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -12499,14 +12524,15 @@ "type": "object", "properties": { "CheckTime": { + "format": "date-time", "title": "DateTime", "description": "檢核時間", "type": "string" }, "Status": { - "title": "integer", + "title": "Int32", "description": "檢核結果狀態 : [0:'失敗',1:'成功']", - "type": "string" + "type": "integer" }, "Reason": { "title": "String", @@ -12531,14 +12557,15 @@ "type": "object", "properties": { "CheckTime": { + "format": "date-time", "title": "DateTime", "description": "檢核時間", "type": "string" }, "Status": { - "title": "integer", + "title": "Int32", "description": "檢核結果狀態 : [0:'失敗',1:'成功']", - "type": "string" + "type": "integer" }, "Reason": { "title": "String", @@ -12556,13 +12583,16 @@ }, "tags": [ { - "name": "CityBus" + "name": "CityBus", + "description": "市區公車" }, { - "name": "InterCityBus" + "name": "InterCityBus", + "description": "公路客運" }, { - "name": "Advanced" + "name": "Advanced", + "description": "進階" } ] } diff --git a/oas.bus.v3.json b/oas.bus.v3.json index be238461..3a49fa31 100644 --- a/oas.bus.v3.json +++ b/oas.bus.v3.json @@ -3083,14 +3083,14 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "MessageType": { - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", - "type": "string" + "type": "integer" }, "BusPosition": { "title": "PointType", @@ -3117,36 +3117,38 @@ "type": "number" }, "DutyStatus": { - "title": "integer", + "title": "Int32", "description": "勤務狀態 : [0:'正常',1:'開始',2:'結束']", - "type": "string" + "type": "integer" }, "BusStatus": { - "title": "integer", + "title": "Int32", "description": "行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知']", - "type": "string" + "type": "integer" }, "VehicleType": { - "title": "integer", + "title": "Int32", "description": "車輛種類 : [1:'一般',2:'復康巴士',3:'專車',4:'其他']", - "type": "string" + "type": "integer" }, "GPSTime": { - "title": "DateTime", + "format": "date-time", "description": "車機系統紀錄時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "GPSTransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機系統傳送日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "RecTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "TransTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -3272,9 +3274,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "StopUID": { "title": "String", @@ -3305,46 +3307,48 @@ } }, "MessageType": { - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", - "type": "string" + "type": "integer" }, "A2EventType": { - "title": "integer", + "title": "Int32", "description": "進站離站 : [0:'離站',1:'進站']", - "type": "string" + "type": "integer" }, "VehicleType": { - "title": "integer", + "title": "Int32", "description": "車輛種類 : [1:'一般',2:'復康巴士',3:'專車',4:'其他']", - "type": "string" + "type": "integer" }, "DutyStatus": { - "title": "integer", + "title": "Int32", "description": "勤務狀態 : [0:'正常',1:'開始',2:'結束']", - "type": "string" + "type": "integer" }, "BusStatus": { - "title": "integer", + "title": "Int32", "description": "行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知']", - "type": "string" + "type": "integer" }, "GPSTime": { - "title": "DateTime", + "format": "date-time", "description": "車機系統紀錄時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "GPSTransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機系統傳送日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "RecTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "TransTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -3415,21 +3419,23 @@ } }, "PublishTime": { + "format": "date-time", "title": "DateTime", "description": "消息公告日期時間", "type": "string" }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "開始日期時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "結束日期時間", "type": "string" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -3455,6 +3461,7 @@ "type": "object", "properties": { "Date": { + "format": "date-time", "title": "DateTime", "description": "適用日期", "type": "string" @@ -3532,9 +3539,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "Timetables": { "title": "Array", @@ -3665,9 +3672,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "Stops": { "title": "Array", @@ -3825,9 +3832,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "FirstLastTrips": { "title": "Array", @@ -4032,9 +4039,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程(該方向指的是此公車運具目前所在路線的去返程方向,非指站牌所在路線的去返程方向,使用時請加值業者多加注意) : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "DestinationStopID": { "title": "String", @@ -4118,9 +4125,9 @@ } }, "StopStatus": { - "title": "integer", + "title": "Int32", "description": "車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運']", - "type": "string" + "type": "integer" }, "StopCountDown": { "format": "int32", @@ -4128,16 +4135,18 @@ "type": "integer" }, "DataTime": { - "title": "DateTime", + "format": "date-time", "description": "系統演算該筆預估到站資料的時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "RecTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "TransTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料傳出時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -4359,21 +4368,23 @@ } }, "PublishTime": { + "format": "date-time", "title": "DateTime", "description": "消息公告日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]此筆資料最後更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -4585,9 +4596,9 @@ } }, "RouteType": { - "title": "integer", + "title": "Int32", "description": "公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運']", - "type": "string" + "type": "integer" }, "ServiceType": { "title": "ServiceType", @@ -4882,19 +4893,19 @@ } }, "FarePricingType": { - "title": "integer", + "title": "Int32", "description": "描述該路線計費方式 : [0:'段次計費',1:'起迄站間計費',2:'計費站區間計費']", - "type": "string" + "type": "integer" }, "IsFreeBus": { - "title": "integer", + "title": "Int32", "description": "是否為免費公車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "IsForAllSubRoutes": { - "title": "integer", + "title": "Int32", "description": "該收費方式是否應用到所有附屬路線 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "SectionFares": { "title": "Array", @@ -4945,9 +4956,9 @@ "type": "object", "properties": { "Direction": { - "title": "integer", + "title": "Int32", "description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "OriginStops": { "title": "OD", @@ -4999,14 +5010,14 @@ "type": "object", "properties": { "TicketType": { - "title": "integer", + "title": "Int32", "description": "票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期']", - "type": "string" + "type": "integer" }, "FareClass": { - "title": "integer", + "title": "Int32", "description": "費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票']", - "type": "string" + "type": "integer" }, "Price": { "title": "String", @@ -5124,9 +5135,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "FareBufferZoneOrigin": { "title": "FareBufferZone", @@ -5216,14 +5227,14 @@ "type": "object", "properties": { "TicketType": { - "title": "integer", + "title": "Int32", "description": "票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期']", - "type": "string" + "type": "integer" }, "FareClass": { - "title": "integer", + "title": "Int32", "description": "費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票']", - "type": "string" + "type": "integer" }, "Price": { "title": "String", @@ -5249,9 +5260,9 @@ "type": "object", "properties": { "Direction": { - "title": "integer", + "title": "Int32", "description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "OriginStage": { "title": "Stage", @@ -5354,14 +5365,14 @@ } }, "TicketType": { - "title": "integer", + "title": "Int32", "description": "票種類型 : [1:'一般票',2:'來回票',3:'電子票證',4:'回數票',5:'定期票30天期',6:'定期票60天期',7:'早鳥票',8:'定期票90天期']", - "type": "string" + "type": "integer" }, "FareClass": { - "title": "integer", + "title": "Int32", "description": "費率等級 : [1:'成人',2:'學生',3:'孩童',4:'敬老',5:'愛心',6:'愛心孩童',7:'愛心優待或愛心陪伴',8:'團體',9:'軍警',10:'由各運業者自行定義的半票']", - "type": "string" + "type": "integer" }, "DiscountPeriods": { "title": "Array", @@ -5411,59 +5422,59 @@ } }, "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "NationalHolidays": { - "title": "integer", + "title": "Int32", "description": "國定假日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayBeforeHoliday": { - "title": "integer", + "title": "Int32", "description": "假日前一日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayAfterHoliday": { - "title": "integer", + "title": "Int32", "description": "假日後一日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "TyphoonDay": { - "title": "integer", + "title": "Int32", "description": "颱風停止上班上課期間是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -5809,9 +5820,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "ScheduleURL": { "title": "String", @@ -5879,59 +5890,59 @@ } }, "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "NationalHolidays": { - "title": "integer", + "title": "Int32", "description": "國定假日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayBeforeHoliday": { - "title": "integer", + "title": "Int32", "description": "國定假日前一日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayAfterHoliday": { - "title": "integer", + "title": "Int32", "description": "國定假日後一日營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "TyphoonDay": { - "title": "integer", + "title": "Int32", "description": "颱風停止上班上課期間營運與否 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -5976,9 +5987,9 @@ } }, "ServiceStatus": { - "title": "integer", + "title": "Int32", "description": "營運服務狀態代碼0=停止營運, 1=正常營運 , 2=加班營運 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運']", - "type": "string" + "type": "integer" }, "Description": { "title": "String", @@ -6445,9 +6456,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "Geometry": { "title": "String", @@ -6755,9 +6766,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "Stops": { "title": "Array", @@ -6868,9 +6879,9 @@ } }, "BoardingType": { - "title": "integer", + "title": "Int32", "description": "上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車']", - "type": "string" + "type": "integer" }, "StopSequence": { "format": "int32", @@ -7068,9 +7079,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "車輛去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string" + "type": "integer" }, "HeadSign": { "title": "String", @@ -7290,14 +7301,14 @@ } }, "VehicleClass": { - "title": "integer", + "title": "Int32", "description": "車輛型別 : [1:'大型巴士',2:'中型巴士',3:'小型巴士',4:'雙層巴士',5:'雙節巴士',6:'計程車']", - "type": "string" + "type": "integer" }, "VehicleType": { - "title": "integer", + "title": "Int32", "description": "車輛種類 : [1:'一般',2:'復康巴士',3:'專車',4:'其他']", - "type": "string" + "type": "integer" }, "CardReaderLayout": { "format": "int32", @@ -7339,7 +7350,7 @@ } }, "PurchaseTime": { - "title": "DateTime", + "format": "date-time", "description": "購入時間", "type": "string" } @@ -7504,12 +7515,13 @@ "type": "object", "properties": { "EffectiveDate": { + "format": "date-time", "title": "DateTime", "description": "有效起始日期", "type": "string" }, "ExpireDate": { - "title": "DateTime", + "format": "date-time", "description": "有效終止日期", "type": "string" }, @@ -7530,6 +7542,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7541,6 +7554,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7578,7 +7592,7 @@ }, "xml": { "name": "BusGWrapperOfSchedule", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Depot]": { @@ -7602,6 +7616,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7613,6 +7628,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7650,7 +7666,7 @@ }, "xml": { "name": "BusVWrapperOfDepot", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.DisplayStopOfRoute]": { @@ -7674,6 +7690,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7685,6 +7702,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7722,7 +7740,7 @@ }, "xml": { "name": "BusVWrapperOfDisplayStopOfRoute", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.FirstLastTripInfo]": { @@ -7746,6 +7764,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7757,6 +7776,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7794,7 +7814,7 @@ }, "xml": { "name": "BusVWrapperOfFirstLastTripInfo", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Network]": { @@ -7818,6 +7838,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7829,6 +7850,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7866,7 +7888,7 @@ }, "xml": { "name": "BusVWrapperOfNetwork", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Operator]": { @@ -7890,6 +7912,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7901,6 +7924,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7938,7 +7962,7 @@ }, "xml": { "name": "BusVWrapperOfOperator", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Route]": { @@ -7962,6 +7986,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7973,6 +7998,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8010,7 +8036,7 @@ }, "xml": { "name": "BusVWrapperOfRoute", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.RouteNetwork]": { @@ -8034,6 +8060,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8045,6 +8072,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8082,7 +8110,7 @@ }, "xml": { "name": "BusVWrapperOfRouteNetwork", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.S2STravelTime]": { @@ -8106,6 +8134,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8117,6 +8146,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8154,7 +8184,7 @@ }, "xml": { "name": "BusVWrapperOfS2STravelTime", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Shape]": { @@ -8178,6 +8208,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8189,6 +8220,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8226,7 +8258,7 @@ }, "xml": { "name": "BusVWrapperOfShape", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Station]": { @@ -8250,6 +8282,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8261,6 +8294,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8298,7 +8332,7 @@ }, "xml": { "name": "BusVWrapperOfStation", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Stop]": { @@ -8322,6 +8356,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8333,6 +8368,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8370,7 +8406,7 @@ }, "xml": { "name": "BusVWrapperOfStop", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.StopOfRoute]": { @@ -8394,6 +8430,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8405,6 +8442,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8442,7 +8480,7 @@ }, "xml": { "name": "BusVWrapperOfStopOfRoute", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.SubRoute]": { @@ -8466,6 +8504,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8477,6 +8516,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8514,7 +8554,7 @@ }, "xml": { "name": "BusVWrapperOfSubRoute", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.Vehicle]": { @@ -8538,6 +8578,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8549,6 +8590,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8586,7 +8628,7 @@ }, "xml": { "name": "BusVWrapperOfVehicle", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.VehicleDepot]": { @@ -8610,6 +8652,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8621,6 +8664,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8658,7 +8702,7 @@ }, "xml": { "name": "BusVWrapperOfVehicleDepot", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusVWrapper[PTX.Service.DTO.Bus.Specification.V3.VehicleRoute]": { @@ -8682,6 +8726,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8693,6 +8738,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8730,7 +8776,7 @@ }, "xml": { "name": "BusVWrapperOfVehicleRoute", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.A1Data]": { @@ -8747,6 +8793,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8758,6 +8805,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8795,7 +8843,7 @@ }, "xml": { "name": "BusWrapperOfA1Data", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.A2Data]": { @@ -8812,6 +8860,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8823,6 +8872,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8860,7 +8910,7 @@ }, "xml": { "name": "BusWrapperOfA2Data", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.Alert]": { @@ -8877,6 +8927,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8888,6 +8939,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8925,7 +8977,7 @@ }, "xml": { "name": "BusWrapperOfAlert", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.DailyTimeTable]": { @@ -8942,6 +8994,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8953,6 +9006,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8990,7 +9044,7 @@ }, "xml": { "name": "BusWrapperOfDailyTimeTable", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.N1Data]": { @@ -9007,6 +9061,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9018,6 +9073,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9055,7 +9111,7 @@ }, "xml": { "name": "BusWrapperOfN1Data", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.News]": { @@ -9072,6 +9128,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9083,6 +9140,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9120,7 +9178,7 @@ }, "xml": { "name": "BusWrapperOfNews", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Bus.Specification.V3.Wrapper.BusWrapper[PTX.Service.DTO.Bus.Specification.V3.RouteFare]": { @@ -9137,6 +9195,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[平臺]資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9148,6 +9207,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "[來源端平臺]資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9185,7 +9245,7 @@ }, "xml": { "name": "BusWrapperOfRouteFare", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Shared.Specification.V3.Base.DisplayHealth": { @@ -9252,14 +9312,15 @@ "type": "object", "properties": { "CheckTime": { + "format": "date-time", "title": "DateTime", "description": "檢核時間", "type": "string" }, "Status": { - "title": "integer", + "title": "Int32", "description": "檢核結果狀態 : [0:'失敗',1:'成功']", - "type": "string" + "type": "integer" }, "Reason": { "title": "String", @@ -9309,14 +9370,15 @@ "type": "object", "properties": { "CheckTime": { + "format": "date-time", "title": "DateTime", "description": "檢核時間", "type": "string" }, "Status": { - "title": "integer", + "title": "Int32", "description": "檢核結果狀態 : [0:'失敗',1:'成功']", - "type": "string" + "type": "integer" }, "Reason": { "title": "String", @@ -9336,14 +9398,14 @@ "description": "座標資料型別", "type": "object", "properties": { - "PositionLat": { + "PositionLon": { "format": "double", - "description": "位置緯度(WGS84)", + "description": "位置經度(WGS84)", "type": "number" }, - "PositionLon": { + "PositionLat": { "format": "double", - "description": "位置經度(WGS84)", + "description": "位置緯度(WGS84)", "type": "number" } }, @@ -9354,7 +9416,8 @@ }, "tags": [ { - "name": "CityBus" + "name": "CityBus", + "description": "市區公車" } ] } diff --git a/oas.rail.v2.json b/oas.rail.v2.json index ee7012cf..aef908f6 100644 --- a/oas.rail.v2.json +++ b/oas.rail.v2.json @@ -347,7 +347,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -723,7 +723,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -1338,10 +1338,12 @@ "required": true, "type": "string", "enum": [ - "KRTC" + "KRTC", + "KLRT" ], "x-enum": { "KRTC": "高雄捷運", + "KLRT": "高雄輕軌", "TRTC": "臺北捷運", "TYMC": "桃園捷運" } @@ -1829,7 +1831,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -2345,7 +2347,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -2432,7 +2435,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -2665,7 +2669,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -2752,7 +2757,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -2837,7 +2843,8 @@ "in": "path", "name": "TrainDate", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -2931,7 +2938,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -3424,7 +3432,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -3553,7 +3561,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -3639,7 +3648,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -3739,7 +3749,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -3839,7 +3850,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "path", @@ -4034,7 +4046,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -4995,7 +5007,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -5082,7 +5095,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -5315,7 +5329,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -5402,7 +5417,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -5489,7 +5505,8 @@ "name": "TrainDate", "description": "時刻表日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -5583,7 +5600,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -5886,7 +5904,7 @@ "type": "object", "properties": { "UpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -5897,6 +5915,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -5934,7 +5953,7 @@ }, "xml": { "name": "MRTRealTimeWrapperOfAlert", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.API.Rail.Model.MRTRealTimeWrapper[PTX.Service.DTO.Rail.Specification.V2.Metro.MRTNewsList.News]": { @@ -5950,7 +5969,7 @@ "type": "object", "properties": { "UpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -5961,6 +5980,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -5998,7 +6018,7 @@ }, "xml": { "name": "MRTRealTimeWrapperOfNews", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.API.Rail.Model.V2THSRAvailableSeatStatusOldWrapper[PTX.Service.DTO.Rail.Specification.V2.THSR.Old.AvailableSeat]": { @@ -6009,7 +6029,7 @@ "type": "object", "properties": { "UpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -6032,7 +6052,7 @@ }, "xml": { "name": "V2THSRAvailableSeatStatusOldWrapperOfAvailableSeat", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.API.Rail.Model.V2THSRAvailableSeatStatusWrapper[PTX.Service.DTO.Rail.Specification.V2.THSR.AvailableSeat]": { @@ -6043,12 +6063,12 @@ "type": "object", "properties": { "UpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "PTX平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -6079,7 +6099,7 @@ }, "xml": { "name": "V2THSRAvailableSeatStatusWrapperOfAvailableSeat", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.API.Rail.Model.V2THSRODAvailableSeatStatusWrapper[PTX.Service.DTO.Rail.Specification.V2.THSR.OD.AvailableSeat]": { @@ -6090,7 +6110,7 @@ "type": "object", "properties": { "UpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "PTX平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -6101,7 +6121,7 @@ "type": "integer" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -6138,7 +6158,7 @@ }, "xml": { "name": "V2THSRODAvailableSeatStatusWrapperOfAvailableSeat", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, "PTX.Service.DTO.Rail.Specification.V2.Metro.Alert": { @@ -6178,9 +6198,9 @@ } }, "Status": { - "title": "integer", + "title": "Int32", "description": "營運狀況 : [0:'全線營運停止',1:'全線營運正常',2:'有異常狀況']", - "type": "string" + "type": "integer" }, "Scope": { "title": "AlertScope", @@ -6195,14 +6215,14 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "影響方向 : [0:'去程',1:'返程']", - "type": "string" + "type": "integer" }, "Level": { - "title": "integer", + "title": "Int32", "description": "影響等級程度 : [1:'重度',2:'中度',3:'輕度']", - "type": "string" + "type": "integer" }, "Effect": { "title": "String", @@ -6229,21 +6249,22 @@ } }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "訊息起始日期時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "訊息結束日期時間", "type": "string" }, "PublishTime": { - "title": "DateTime", + "format": "date-time", "description": "消息發佈日期時間", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "消息更新日期時間", "type": "string" @@ -6429,11 +6450,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -6529,11 +6552,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -6648,11 +6673,13 @@ "type": "boolean" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -6786,9 +6813,9 @@ } }, "IsOnSiteTransfer": { - "title": "integer", + "title": "Int32", "description": "是否為站內或站外轉乘 : [0:'站外',1:'站內']", - "type": "string" + "type": "integer" }, "TransferTime": { "format": "int32", @@ -6805,11 +6832,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -6934,11 +6963,13 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -6989,6 +7020,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7291,9 +7323,9 @@ } }, "Language": { - "title": "integer", + "title": "Int32", "description": "語系 : [1:'Zh_tw',2:'En_us',3:'Zh_cn',4:'Ja',5:'Ko',99:'Other']", - "type": "string" + "type": "integer" }, "Department": { "title": "String", @@ -7312,9 +7344,9 @@ } }, "NewsCategory": { - "title": "integer", + "title": "Int32", "description": "消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'新服務上架',8:'API修正',9:'來源異常',99:'其他']", - "type": "string" + "type": "integer" }, "Description": { "title": "String", @@ -7341,21 +7373,23 @@ } }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "消息起始日期時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "消息結束日期時間", "type": "string" }, "PublishTime": { + "format": "date-time", "title": "DateTime", "description": "消息發佈日期時間", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本筆資料之更新日期時間", "type": "string" @@ -7441,11 +7475,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7572,11 +7608,13 @@ "type": "number" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7716,11 +7754,13 @@ "type": "number" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7790,11 +7830,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7867,11 +7909,13 @@ "type": "boolean" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8024,11 +8068,13 @@ "type": "boolean" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8125,11 +8171,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8185,11 +8233,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8274,11 +8324,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8348,9 +8400,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "營運路線方向描述 : [0:'去程',1:'返程']", - "type": "string" + "type": "integer" }, "DestinationStaionID": { "title": "String", @@ -8407,11 +8459,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -8638,11 +8692,13 @@ "type": "object", "properties": { "SaterDate": { + "format": "date-time", "title": "DateTime", "description": "開始時間", "type": "string" }, "EndDate": { + "format": "date-time", "title": "DateTime", "description": "結束時間", "type": "string" @@ -8867,14 +8923,14 @@ "description": "座標資料型別", "type": "object", "properties": { - "PositionLat": { + "PositionLon": { "format": "double", - "description": "位置緯度(WGS84)", + "description": "位置經度(WGS84)", "type": "number" }, - "PositionLon": { + "PositionLat": { "format": "double", - "description": "位置經度(WGS84)", + "description": "位置緯度(WGS84)", "type": "number" }, "GeoHash": { @@ -8907,9 +8963,9 @@ "type": "object", "properties": { "Level": { - "title": "integer", + "title": "Int32", "description": "動態事件影響等級(本資料僅作參考,實際資料請參考高鐵http://www.thsrc.com.tw/tw/Operation) : [1:'全線正常運行',2:'有異常狀況']", - "type": "string" + "type": "integer" }, "Status": { "title": "String", @@ -8960,21 +9016,23 @@ } }, "OccuredTime": { - "title": "DateTime", + "format": "date-time", "description": "發生日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "PublishTime": { - "title": "DateTime", + "format": "date-time", "description": "訊息發布日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9009,9 +9067,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "方向 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -9132,6 +9190,7 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9221,21 +9280,24 @@ } }, "StartTime": { + "format": "date-time", "title": "DateTime", "description": "開始時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "結束時間", "type": "string" }, "PublishTime": { + "format": "date-time", "title": "DateTime", "description": "消息發布日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9378,9 +9440,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "方向 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "StationID": { "title": "String", @@ -9442,6 +9504,7 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源平台更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9495,6 +9558,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9530,9 +9594,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -9587,6 +9651,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9614,6 +9679,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "發布時間(格式: yyyy-MM-dd)", "type": "string" @@ -9675,9 +9741,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -9794,6 +9860,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9866,9 +9933,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "Fares": { "title": "Array", @@ -9882,11 +9949,13 @@ } }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -9978,6 +10047,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10094,9 +10164,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -10155,6 +10225,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10243,39 +10314,39 @@ "type": "object", "properties": { "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -10373,11 +10444,13 @@ "type": "boolean" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10518,6 +10591,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10561,9 +10635,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'南下',1:'北上']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -10668,7 +10742,7 @@ } }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } @@ -10754,6 +10828,7 @@ "type": "boolean" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10921,6 +10996,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -10974,6 +11050,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11019,9 +11096,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -11100,9 +11177,9 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "OverNightStationID": { "title": "String", @@ -11113,39 +11190,39 @@ } }, "WheelchairFlag": { - "title": "integer", + "title": "Int32", "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "PackageServiceFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供行李服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供訂便當服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BikeFlag": { - "title": "integer", + "title": "Int32", "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BreastFeedingFlag": { - "title": "integer", + "title": "Int32", "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DailyFlag": { - "title": "integer", + "title": "Int32", "description": "是否每日行駛 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "ServiceAddedFlag": { - "title": "integer", + "title": "Int32", "description": "是否為加班車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Note": { "title": "NameType", @@ -11160,6 +11237,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11185,6 +11263,7 @@ "type": "object", "properties": { "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期(格式: yyyy-MM-dd)", "type": "string" @@ -11238,9 +11317,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -11311,9 +11390,9 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "OverNightStationID": { "title": "String", @@ -11324,34 +11403,34 @@ } }, "WheelchairFlag": { - "title": "integer", + "title": "Int32", "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "PackageServiceFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供行李服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供訂便當服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BikeFlag": { - "title": "integer", + "title": "Int32", "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BreastFeedingFlag": { - "title": "integer", + "title": "Int32", "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DailyFlag": { - "title": "integer", + "title": "Int32", "description": "是否為每日行駛 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Note": { "title": "NameType", @@ -11366,6 +11445,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11428,9 +11508,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TrainTypeID": { "title": "String", @@ -11461,9 +11541,9 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "EndingStationID": { "title": "String", @@ -11508,11 +11588,13 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11570,11 +11652,13 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11642,6 +11726,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11713,9 +11798,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "Fares": { "title": "Array", @@ -11729,6 +11814,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11827,6 +11913,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -11943,14 +12030,14 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "TrainTypeID": { "title": "String", @@ -12037,6 +12124,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -12126,39 +12214,39 @@ "type": "object", "properties": { "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -12204,6 +12292,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -12238,9 +12327,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -12319,9 +12408,9 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "OverNightStationID": { "title": "String", @@ -12332,34 +12421,34 @@ } }, "WheelchairFlag": { - "title": "integer", + "title": "Int32", "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "PackageServiceFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供行李服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供訂便當服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BikeFlag": { - "title": "integer", + "title": "Int32", "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BreastFeedingFlag": { - "title": "integer", + "title": "Int32", "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DailyFlag": { - "title": "integer", + "title": "Int32", "description": "是否為每日行駛 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "ServiceAddedFlag": { "title": "Boolean", @@ -12407,9 +12496,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "順逆行 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "StartingStationID": { "title": "String", @@ -12480,9 +12569,9 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "OverNightStationID": { "title": "String", @@ -12493,34 +12582,34 @@ } }, "WheelchairFlag": { - "title": "integer", + "title": "Int32", "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "PackageServiceFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供行李服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供訂便當服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BikeFlag": { - "title": "integer", + "title": "Int32", "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BreastFeedingFlag": { - "title": "integer", + "title": "Int32", "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DailyFlag": { - "title": "integer", + "title": "Int32", "description": "是否為每日行駛 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Note": { "title": "NameType", @@ -12580,6 +12669,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -12637,6 +12727,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -12826,6 +12917,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" diff --git a/oas.rail.v3.json b/oas.rail.v3.json index 83108e76..27386a5b 100644 --- a/oas.rail.v3.json +++ b/oas.rail.v3.json @@ -137,7 +137,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -1372,7 +1372,8 @@ "name": "TrainDate", "description": "欲查詢車次的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -1458,7 +1459,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "path", @@ -1558,7 +1560,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "path", @@ -1823,7 +1826,8 @@ "name": "TrainDate", "description": "欲查詢的日期(格式: yyyy-MM-dd)", "required": true, - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -2773,151 +2777,3331 @@ } } } - } - }, - "definitions": { - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Line]": { - "title": "TRALineList", - "required": [ - "AuthorityCode", - "Lines", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" - ], - "type": "object", - "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { - "title": "String", - "description": "業管機關簡碼", - "type": "string", - "xml": { - "name": "String" + }, + "/v3/Rail/AFR/Network": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得小火車路網資料", + "description": "取得小火車路網資料", + "operationId": "LiteTrain_Network", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] } - }, - "Lines": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Line" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Network]" + } }, - "xml": { - "name": "List`1" + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } - }, - "xml": { - "name": "TRABaseWrapperOfLine", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.LineNetwork.LineNetwork]": { - "title": "TRALineNetworkList", - "required": [ - "AuthorityCode", - "LineNetworks", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" - ], - "type": "object", - "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { - "title": "String", - "description": "業管機關簡碼", - "type": "string", - "xml": { - "name": "String" - } - }, - "LineNetworks": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.LineNetwork.LineNetwork" + "/v3/Rail/AFR/Station": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得車站基本資料", + "description": "取得車站基本資料", + "operationId": "LiteTrain_Station", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" }, - "xml": { - "name": "List`1" + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$spatialFilter", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Station]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/Line": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得路線基本資料", + "description": "取得路線基本資料", + "operationId": "LiteTrain_Line", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Line]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/Operator": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得小火車營運業者基本資料", + "description": "取得小火車營運業者基本資料", + "operationId": "LiteTrain_Operator", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Operator]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/GeneralTrainTimetable": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得所有車次的定期時刻表資料", + "description": "取得所有車次的定期時刻表資料", + "operationId": "LiteTrain_GeneralTrainTimetable", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainGeneralTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/GeneralTrainTimetable/TrainNo/{TrainNo}": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得指定[車次]的定期時刻表資料", + "description": "取得指定[車次]的定期時刻表資料", + "operationId": "LiteTrain_GeneralTrainTimetable_1", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "path", + "name": "TrainNo", + "description": "欲查詢車次的代碼", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainGeneralTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/ODFare": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得所有票價資料", + "description": "取得所有票價資料", + "operationId": "LiteTrain_ODFare", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainODFareWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/ODFare/{OriginStationID}/to/{DestinationStationID}": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得指定起迄站間票價資料", + "description": "取得指定起迄站間票價資料", + "operationId": "LiteTrain_ODFare_1", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "path", + "name": "OriginStationID", + "description": "起點車站代碼", + "required": true, + "type": "string" + }, + { + "in": "path", + "name": "DestinationStationID", + "description": "迄點車站代碼", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainODFareWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/Route": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得營運路線基本資料", + "description": "取得營運路線基本資料", + "operationId": "LiteTrain_Route", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Route]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/StationOfLine": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得路線車站基本資料", + "description": "取得路線車站基本資料", + "operationId": "LiteTrain_StationOfLine", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.StationOfLine]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/TrainType": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得所有列車車種資料", + "description": "取得所有列車車種資料", + "operationId": "LiteTrain_TrainType", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.TrainType]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/StationOfRoute": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得營運路線車站基本資料", + "description": "取得營運路線車站基本資料", + "operationId": "LiteTrain_StationOfRoute", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.StationOfRoute]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + }, + "/v3/Rail/AFR/News": { + "get": { + "tags": [ + "AFR" + ], + "summary": "取得最新消息", + "description": "取得最新消息", + "operationId": "LiteTrain_News", + "produces": [ + "application/json", + "application/xml" + ], + "parameters": [ + { + "in": "query", + "name": "$select", + "description": "挑選", + "type": "string" + }, + { + "in": "query", + "name": "$filter", + "description": "過濾", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "排序", + "type": "string" + }, + { + "in": "query", + "name": "$top", + "description": "取前幾筆", + "type": "integer", + "default": 30 + }, + { + "in": "query", + "name": "$skip", + "description": "跳過前幾筆", + "type": "string" + }, + { + "in": "query", + "name": "$count", + "description": "查詢數量", + "type": "boolean", + "enum": [ + true, + false + ] + }, + { + "in": "query", + "name": "$format", + "description": "指定來源格式", + "required": true, + "type": "string", + "enum": [ + "JSON", + "XML" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/PTX.API.Rail.Model.LiteTrainRealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.LiteTrainNewsList.News]" + } + }, + "304": { + "description": "服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content" + } + } + } + } + }, + "definitions": { + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Line]": { + "title": "LiteTrainLineList", + "required": [ + "AuthorityCode", + "Lines", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Lines": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Line" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfLine", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Network]": { + "title": "LiteTrainNetworkList", + "required": [ + "AuthorityCode", + "Networks", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Networks": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Network" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfNetwork", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Operator]": { + "title": "LiteTrainOperatorList", + "required": [ + "AuthorityCode", + "Operators", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Operators": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Operator" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfOperator", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Route]": { + "title": "LiteTrainRouteList", + "required": [ + "AuthorityCode", + "Routes", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Routes": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Route" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfRoute", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Station]": { + "title": "LiteTrainStationList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "Stations", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Stations": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Station" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfStation", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.StationOfLine]": { + "title": "LiteTrainStationOfLineList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationOfLines", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationOfLines": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.StationOfLine" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfStationOfLine", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.StationOfRoute]": { + "title": "LiteTrainStationOfRouteList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationOfRoutes", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationOfRoutes": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.StationOfRoute" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfStationOfRoute", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.TrainType]": { + "title": "LiteTrainTrainTypeList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "TrainTypes", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainTypes": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.TrainType" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainBaseWrapperOfTrainType", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainGeneralTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable]": { + "title": "LiteTrainGeneralTrainTimetableList", + "required": [ + "AuthorityCode", + "EffectiveDate", + "SrcUpdateInterval", + "SrcUpdateTime", + "TrainTimetables", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "EffectiveDate": { + "format": "date-time", + "title": "DateTime", + "description": "有效起始日期", + "type": "string" + }, + "ExpireDate": { + "format": "date-time", + "description": "有效終止日期", + "type": "string" + }, + "SrcVersion": { + "title": "String", + "description": "來源版號", + "type": "string", + "xml": { + "name": "String" + } + }, + "TimetableName": { + "title": "String", + "description": "定期性站別時刻表名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "ValidityDesciption": { + "title": "String", + "description": "時刻表適用情形說明", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainTimetables": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainGeneralTrainWrapperOfGeneralTrainTimetable", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainODFareWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare]": { + "title": "LiteTrainODFareList", + "required": [ + "AuthorityCode", + "ODFares", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "EffectiveDate": { + "title": "String", + "description": "有效起始日期", + "type": "string", + "xml": { + "name": "String" + } + }, + "ExpireDate": { + "title": "String", + "description": "有效終止日期", + "type": "string", + "xml": { + "name": "String" + } + }, + "SrcVersion": { + "title": "String", + "description": "資料版本", + "type": "string", + "xml": { + "name": "String" + } + }, + "ODFares": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainODFareWrapperOfODFare", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.LiteTrainRealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.LiteTrainNewsList.News]": { + "title": "LiteTrainNewsList", + "required": [ + "AuthorityCode", + "Newses", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Newses": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.LiteTrainNewsList.News" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "LiteTrainRealTimeWrapperOfNews", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Line]": { + "title": "TRALineList", + "required": [ + "AuthorityCode", + "Lines", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Lines": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Line" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfLine", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.LineNetwork.LineNetwork]": { + "title": "TRALineNetworkList", + "required": [ + "AuthorityCode", + "LineNetworks", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "LineNetworks": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.LineNetwork.LineNetwork" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfLineNetwork", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.LineTransfer]": { + "title": "TRALineTransferList", + "required": [ + "AuthorityCode", + "LineTransfers", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "LineTransfers": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.LineTransfer" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfLineTransfer", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Network.Network]": { + "title": "TRANetworkList", + "required": [ + "AuthorityCode", + "Networks", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Networks": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Network.Network" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfNetwork", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Operator]": { + "title": "TRAOperatorList", + "required": [ + "AuthorityCode", + "Operators", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Operators": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Operator" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfOperator", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Shape]": { + "title": "TRAShapeList", + "required": [ + "AuthorityCode", + "Shapes", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Shapes": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Shape" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfShape", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Station]": { + "title": "TRAStationList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "Stations", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Stations": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Station" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfStation", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationExit.StationExit]": { + "title": "TRAStationExitList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationExits", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationExits": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationExit.StationExit" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfStationExit", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationFacility.StationFacility]": { + "title": "TRAStationFacilityList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationFacilities", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationFacilities": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationFacility.StationFacility" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfStationFacility", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationOfLine.StationOfLine]": { + "title": "TRAStationOfLineList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationOfLines", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationOfLines": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationOfLine.StationOfLine" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfStationOfLine", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationTransfer.StationTransfer]": { + "title": "TRAStationTransferList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationTransfers", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationTransfers": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationTransfer.StationTransfer" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfStationTransfer", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TrainType]": { + "title": "TRATrainTypeList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "TrainTypes", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainTypes": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TrainType" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRABaseWrapperOfTrainType", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TraDailyStationWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.DailyStationTimeTable.StationTimetable]": { + "title": "TRADailyStationTimeTableList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationTimetables", + "TrainDate", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainDate": { + "title": "String", + "description": "營運日說明(yyyy-MM-dd)", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationTimetables": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.DailyStationTimeTable.StationTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TraDailyStationWrapperOfStationTimetable", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TraDailyTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.DailyTrainTimeTable.TrainTimetable]": { + "title": "TRADailyTrainTimeTableList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "TrainDate", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainDate": { + "title": "String", + "description": "營運日說明(yyyy-MM-dd)", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainTimetables": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.DailyTrainTimeTable.TrainTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TraDailyTrainWrapperOfTrainTimetable", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRAGeneralStationWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralStationTimetable.GeneralStationTimetable]": { + "title": "TRAGeneralStationTimetableList", + "required": [ + "AuthorityCode", + "EffectiveDate", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationTimetables", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "EffectiveDate": { + "format": "date-time", + "title": "DateTime", + "description": "有效起始日期", + "type": "string" + }, + "ExpireDate": { + "format": "date-time", + "description": "有效終止日期", + "type": "string" + }, + "SrcVersion": { + "title": "String", + "description": "來源版號", + "type": "string", + "xml": { + "name": "String" + } + }, + "TimetableName": { + "title": "String", + "description": "定期性站別時刻表名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "ValidityDesciption": { + "title": "String", + "description": "時刻表適用情形說明", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationTimetables": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralStationTimetable.GeneralStationTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRAGeneralStationWrapperOfGeneralStationTimetable", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRAGeneralTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralTrainTimetable]": { + "title": "TRAGeneralTrainTimetableList", + "required": [ + "AuthorityCode", + "EffectiveDate", + "SrcUpdateInterval", + "SrcUpdateTime", + "TrainTimetables", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "EffectiveDate": { + "format": "date-time", + "title": "DateTime", + "description": "有效起始日期", + "type": "string" + }, + "ExpireDate": { + "format": "date-time", + "description": "有效終止日期", + "type": "string" + }, + "SrcVersion": { + "title": "String", + "description": "來源版號", + "type": "string", + "xml": { + "name": "String" + } + }, + "TimetableName": { + "title": "String", + "description": "定期性站別時刻表名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "ValidityDesciption": { + "title": "String", + "description": "時刻表適用情形說明", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainTimetables": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralTrainTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRAGeneralTrainWrapperOfGeneralTrainTimetable", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRAODFareWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.ODFare.ODFare]": { + "title": "TRAODFareList", + "required": [ + "AuthorityCode", + "ODFares", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "EffectiveDate": { + "title": "String", + "description": "有效起始日期", + "type": "string", + "xml": { + "name": "String" + } + }, + "ExpireDate": { + "title": "String", + "description": "有效終止日期", + "type": "string", + "xml": { + "name": "String" + } + }, + "SrcVersion": { + "title": "String", + "description": "資料版本", + "type": "string", + "xml": { + "name": "String" + } + }, + "ODFares": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.ODFare.ODFare" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRAODFareWrapperOfODFare", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRAAlertList.Alert]": { + "title": "TRAAlertList", + "required": [ + "Alerts", + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Alerts": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRAAlertList.Alert" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRARealTimeWrapperOfAlert", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRANewsList.News]": { + "title": "TRANewsList", + "required": [ + "AuthorityCode", + "Newses", + "SrcUpdateInterval", + "SrcUpdateTime", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Newses": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRANewsList.News" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRARealTimeWrapperOfNews", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRAStationLiveBoardList.StationLiveBoard]": { + "title": "TRAStationLiveBoardList", + "required": [ + "AuthorityCode", + "SrcUpdateInterval", + "SrcUpdateTime", + "StationLiveBoards", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationLiveBoards": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRAStationLiveBoardList.StationLiveBoard" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" } }, "xml": { - "name": "TRABaseWrapperOfLineNetwork", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "TRARealTimeWrapperOfStationLiveBoard", + "namespace": "https://ptx.transportdata.tw/standard/schema/" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.LineTransfer]": { - "title": "TRALineTransferList", + "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRATrainLiveBoardList.TrainLiveBoard]": { + "title": "TRATrainLiveBoardList", "required": [ "AuthorityCode", - "LineTransfers", "SrcUpdateInterval", "SrcUpdateTime", + "TrainLiveBoards", "UpdateInterval", "UpdateTime" ], "type": "object", "properties": { "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "本平台資料更新週期(秒)", + "type": "integer" + }, + "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "SrcUpdateInterval": { + "format": "int32", + "title": "Int32", + "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "type": "integer" + }, + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainLiveBoards": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRATrainLiveBoardList.TrainLiveBoard" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRARealTimeWrapperOfTrainLiveBoard", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.API.Rail.Model.TRASpecificWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.SpecificTrainTimetable]": { + "title": "TRASpecificTrainTimetableList", + "required": [ + "AuthorityCode", + "EffectiveDate", + "SrcUpdateInterval", + "SrcUpdateTime", + "TrainTimetables", + "UpdateInterval", + "UpdateTime" + ], + "type": "object", + "properties": { + "UpdateTime": { + "format": "date-time", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, @@ -2928,6 +6112,7 @@ "type": "integer" }, "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -2938,1396 +6123,1458 @@ "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", "type": "integer" }, - "AuthorityCode": { + "AuthorityCode": { + "title": "String", + "description": "業管機關簡碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "EffectiveDate": { + "format": "date-time", + "title": "DateTime", + "description": "有效起始日期", + "type": "string" + }, + "ExpireDate": { + "format": "date-time", + "description": "有效終止日期", + "type": "string" + }, + "SrcVersion": { + "title": "String", + "description": "來源版號", + "type": "string", + "xml": { + "name": "String" + } + }, + "TimetableName": { + "title": "String", + "description": "定期性站別時刻表名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "ValidityDesciption": { + "title": "String", + "description": "時刻表適用情形說明", + "type": "string", + "xml": { + "name": "String" + } + }, + "TrainTimetables": { + "title": "Array", + "description": "資料(陣列)", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.SpecificTrainTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Count": { + "format": "int64", + "description": "資料總筆數", + "type": "integer" + } + }, + "xml": { + "name": "TRASpecificWrapperOfSpecificTrainTimetable", + "namespace": "https://ptx.transportdata.tw/standard/schema/" + } + }, + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.ServiceDay": { + "title": "ServiceDay", + "description": "小火車服務日型態", + "required": [ + "DayAfterHoliday", + "DayBeforeHoliday", + "Friday", + "Monday", + "NationalHolidays", + "Saturday", + "Sunday", + "Thursday", + "Tuesday", + "TyphoonDay", + "Wednesday" + ], + "type": "object", + "properties": { + "ServiceTag": { + "title": "String", + "description": "服務日標籤", + "type": "string", + "xml": { + "name": "String" + } + }, + "Monday": { + "title": "Int32", + "description": "星期一是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Tuesday": { + "title": "Int32", + "description": "星期二是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Wednesday": { + "title": "Int32", + "description": "星期三是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Thursday": { + "title": "Int32", + "description": "星期四是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Friday": { + "title": "Int32", + "description": "星期五是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Saturday": { + "title": "Int32", + "description": "星期六是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Sunday": { + "title": "Int32", + "description": "星期日是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "NationalHolidays": { + "title": "Int32", + "description": "國定假日是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "DayBeforeHoliday": { + "title": "Int32", + "description": "假日前一日是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "DayAfterHoliday": { + "title": "Int32", + "description": "假日後一日是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "TyphoonDay": { + "title": "Int32", + "description": "颱風停止上班上課期間營運營運 : [0:'否',1:'是']", + "type": "integer" + } + }, + "xml": { + "name": "ServiceDay" + } + }, + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.StopTime": { + "title": "StopTime", + "description": "小火車停靠時間資料", + "required": [ + "ArrivalTime", + "DepartureTime", + "StationID", + "StationName", + "StopSequence" + ], + "type": "object", + "properties": { + "StopSequence": { + "format": "int32", + "title": "Int32", + "description": "停靠站序(由1開始)", + "type": "integer" + }, + "StationID": { + "title": "String", + "description": "車站代碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "StationName": { + "title": "NameType", + "description": "車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "ArrivalTime": { "title": "String", - "description": "業管機關簡碼", + "description": "到站時間(格式: HH:mm)", "type": "string", "xml": { "name": "String" } }, - "LineTransfers": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.LineTransfer" - }, + "DepartureTime": { + "title": "String", + "description": "離站時間(格式: HH:mm)", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRABaseWrapperOfLineTransfer", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "StopTime" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Network.Network]": { - "title": "TRANetworkList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.TrainInfo": { + "title": "TrainInfo", + "description": "小火車車次定期資料型別(時刻表用)", "required": [ - "AuthorityCode", - "Networks", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" + "BikeFlag", + "BreastFeedFlag", + "CarFlag", + "DailyFlag", + "DiningFlag", + "Direction", + "ExtraTrainFlag", + "PackageServiceFlag", + "TrainNo", + "WheelChairFlag" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" + "TrainNo": { + "title": "String", + "description": "車次代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "RouteID": { + "title": "String", + "description": "營運路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateInterval": { - "format": "int32", + "Direction": { "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "description": "行駛方向 : [0:'順行',1:'逆行']", "type": "integer" }, - "AuthorityCode": { + "TrainTypeID": { "title": "String", - "description": "業管機關簡碼", + "description": "車種代嗎", "type": "string", "xml": { "name": "String" } }, - "Networks": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Network.Network" - }, + "TrainTypeCode": { + "title": "String", + "description": "車種簡碼 = ['1: 太魯閣', '2: 普悠瑪', '3: 自強', '4: 莒光', '5: 復興', '6: 區間', '7: 普快', '10: 區間快']", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" - } - }, - "xml": { - "name": "TRABaseWrapperOfNetwork", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" - } - }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Operator]": { - "title": "TRAOperatorList", - "required": [ - "AuthorityCode", - "Operators", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" - ], - "type": "object", - "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "TrainTypeName": { + "title": "NameType", + "description": "車種名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" + "TripHeadSign": { + "title": "String", + "description": "車次之目的地方向描述", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "StartingStationID": { + "title": "String", + "description": "列車起點車站代號", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "StartingStationName": { + "title": "NameType", + "description": "列車起點車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "AuthorityCode": { + "EndingStationID": { "title": "String", - "description": "業管機關簡碼", + "description": "列車終點車站代號", "type": "string", "xml": { "name": "String" } }, - "Operators": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Operator" - }, + "EndingStationName": { + "title": "NameType", + "description": "列車終點車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], "xml": { - "name": "List`1" + "name": "NameType" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", + "OverNightStationID": { + "title": "String", + "description": "跨夜車站代碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "TripLine": { + "title": "Int32", + "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", "type": "integer" - } - }, - "xml": { - "name": "TRABaseWrapperOfOperator", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" - } - }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Shape]": { - "title": "TRAShapeList", - "required": [ - "AuthorityCode", - "Shapes", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" - ], - "type": "object", - "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" }, - "UpdateInterval": { - "format": "int32", + "WheelChairFlag": { + "title": "Int32", + "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", + "type": "integer" + }, + "PackageServiceFlag": { + "title": "Int32", + "description": "是否提供行李服務 : [0:'否',1:'是']", + "type": "integer" + }, + "DiningFlag": { + "title": "Int32", + "description": "是否提供訂便當服務 : [0:'否',1:'是']", + "type": "integer" + }, + "BreastFeedFlag": { + "title": "Int32", + "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", + "type": "integer" + }, + "BikeFlag": { + "title": "Int32", + "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", + "type": "integer" + }, + "CarFlag": { "title": "Int32", - "description": "本平台資料更新週期(秒)", + "description": "是否提供小客車 : [0:'否',1:'是']", "type": "integer" }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "DailyFlag": { + "title": "Int32", + "description": "是否為每日行駛 : [0:'否',1:'是']", + "type": "integer" }, - "SrcUpdateInterval": { - "format": "int32", + "ExtraTrainFlag": { "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "description": "是否為加班車 : [0:'否',1:'是']", "type": "integer" }, - "AuthorityCode": { + "Note": { "title": "String", - "description": "業管機關簡碼", + "description": "附註說明", "type": "string", "xml": { "name": "String" } - }, - "Shapes": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Shape" - }, - "xml": { - "name": "List`1" - } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRABaseWrapperOfShape", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "TrainInfo" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.Station]": { - "title": "TRAStationList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable": { + "title": "GeneralTrainTimetable", + "description": "小火車定期時刻表資料型別", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "Stations", - "UpdateInterval", - "UpdateTime" + "ServiceDay", + "StopTimes", + "TrainInfo" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { - "title": "String", - "description": "業管機關簡碼", - "type": "string", + "TrainInfo": { + "title": "TrainInfo", + "description": "定期車次資料", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.TrainInfo" + } + ], "xml": { - "name": "String" + "name": "TrainInfo" } }, - "Stations": { + "StopTimes": { "title": "Array", - "description": "資料(陣列)", + "description": "停靠時間資料", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.Station" + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.StopTime" }, "xml": { "name": "List`1" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "ServiceDay": { + "title": "ServiceDay", + "description": "營運日型態", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.ServiceDay" + } + ], + "xml": { + "name": "ServiceDay" + } } }, "xml": { - "name": "TRABaseWrapperOfStation", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "GeneralTrainTimetable" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationExit.StationExit]": { - "title": "TRAStationExitList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Line": { + "title": "Line", + "description": "路線基本資料", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationExits", - "UpdateInterval", - "UpdateTime" + "IsBranch", + "LineID", + "LineName", + "LineNo", + "LineSectionName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "LineNo": { + "title": "String", + "description": "路線編號", + "type": "string", + "xml": { + "name": "String" + } }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" + "LineID": { + "title": "String", + "description": "路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "LineName": { + "title": "NameType", + "description": "路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "LineSectionName": { + "title": "NameType", + "description": "路線區間名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "AuthorityCode": { + "LineColor": { "title": "String", - "description": "業管機關簡碼", + "description": "路線顏色", "type": "string", "xml": { "name": "String" } }, - "StationExits": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationExit.StationExit" - }, + "IsBranch": { + "title": "Boolean", + "description": "是否位於支線", + "type": "boolean" + }, + "LineGroup": { + "title": "String", + "description": "路線群組", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "LineURL": { + "title": "String", + "description": "路線群組", + "type": "string", + "xml": { + "name": "String" + } } }, "xml": { - "name": "TRABaseWrapperOfStationExit", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Line" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationFacility.StationFacility]": { - "title": "TRAStationFacilityList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.LiteTrainNewsList.News": { + "title": "News", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationFacilities", - "UpdateInterval", + "Description", + "Language", + "NewsCategory", + "NewsID", + "PublishTime", + "Title", "UpdateTime" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "NewsID": { + "title": "String", + "description": "消息代碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Language": { + "title": "Int32", + "description": "語系 : [1:'Zh_tw',2:'En_us',3:'Zh_cn',4:'Ja',5:'Ko',99:'Other']", + "type": "integer" + }, + "Department": { + "title": "String", + "description": "發布單位", + "type": "string", + "xml": { + "name": "String" + } + }, + "Title": { + "title": "String", + "description": "消息標題", + "type": "string", + "xml": { + "name": "String" + } }, - "UpdateInterval": { - "format": "int32", + "NewsCategory": { "title": "Int32", - "description": "本平台資料更新週期(秒)", + "description": "消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'新服務上架',8:'API修正',9:'來源異常',99:'其他']", "type": "integer" }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "Description": { + "title": "String", + "description": "內容描述", + "type": "string", + "xml": { + "name": "String" + } }, - "AuthorityCode": { + "NewsURL": { "title": "String", - "description": "業管機關簡碼", + "description": "消息網址連結", "type": "string", "xml": { "name": "String" } }, - "StationFacilities": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationFacility.StationFacility" - }, + "AttachmentURL": { + "title": "String", + "description": "附件網址連結", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "StartTime": { + "format": "date-time", + "description": "消息起始日期時間", + "type": "string" + }, + "EndTime": { + "format": "date-time", + "description": "消息結束日期時間", + "type": "string" + }, + "PublishTime": { + "format": "date-time", + "title": "DateTime", + "description": "消息發佈日期時間", + "type": "string" + }, + "UpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "本筆資料之更新日期時間", + "type": "string" } }, "xml": { - "name": "TRABaseWrapperOfStationFacility", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "News" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationOfLine.StationOfLine]": { - "title": "TRAStationOfLineList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Line": { + "title": "Line", + "description": "路線基本資料", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationOfLines", - "UpdateInterval", - "UpdateTime" + "LineID", + "LineNo" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { + "LineNo": { "title": "String", - "description": "業管機關簡碼", + "description": "路線編號", "type": "string", "xml": { "name": "String" } }, - "StationOfLines": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationOfLine.StationOfLine" - }, + "LineID": { + "title": "String", + "description": "路線代碼", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRABaseWrapperOfStationOfLine", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Line" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.StationTransfer.StationTransfer]": { - "title": "TRAStationTransferList", - "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationTransfers", - "UpdateInterval", - "UpdateTime" - ], + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.MapNameType": { + "title": "MapNameType", "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { + "MapName": { "title": "String", - "description": "業管機關簡碼", + "description": "路網圖名稱", "type": "string", "xml": { "name": "String" } }, - "StationTransfers": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.StationTransfer.StationTransfer" - }, + "Zh_tw": { + "title": "String", + "description": "小火車路網圖網址(中文版)", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "En": { + "title": "String", + "description": "小火車路網圖網址(英文版)", + "type": "string", + "xml": { + "name": "String" + } } }, "xml": { - "name": "TRABaseWrapperOfStationTransfer", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "MapNameType" } }, - "PTX.API.Rail.Model.TRABaseWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TrainType]": { - "title": "TRATrainTypeList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Network": { + "title": "Network", + "description": "小火車路網資料", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "TrainTypes", - "UpdateInterval", - "UpdateTime" + "Lines", + "NetworkID", + "NetworkMapURL", + "NetworkName", + "OperatorCode", + "OperatorName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "NetworkID": { + "title": "String", + "description": "小火車路網代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "NetworkName": { + "title": "NameType", + "description": "小火車路網名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "AuthorityCode": { + "OperatorCode": { "title": "String", - "description": "業管機關簡碼", + "description": "營運業者代碼", "type": "string", "xml": { - "name": "String" + "name": "String" + } + }, + "OperatorName": { + "title": "NameType", + "description": "營運業者名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "NetworkMapURL": { + "title": "MapNameType", + "description": "小火車路網圖網址URL", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.MapNameType" + } + ], + "xml": { + "name": "MapNameType" } }, - "TrainTypes": { + "Lines": { "title": "Array", - "description": "資料(陣列)", + "description": "小火車路線資訊", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TrainType" + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Line" }, "xml": { "name": "List`1" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRABaseWrapperOfTrainType", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Network" } }, - "PTX.API.Rail.Model.TraDailyStationWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.DailyStationTimeTable.StationTimetable]": { - "title": "TRADailyStationTimeTableList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.Fare": { + "title": "Fare", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationTimetables", - "TrainDate", - "UpdateInterval", - "UpdateTime" + "CabinClass", + "FareClass", + "Price", + "TicketType" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { + "TicketType": { "format": "int32", "title": "Int32", - "description": "本平台資料更新週期(秒)", + "description": "票種類型 = ['1: 一般票', '2: 來回票', '3: 電子票證', '4: 回數票', '5: 定期票(30天期)', '6: 定期票(60天期)', '7: 早鳥票']", "type": "integer" }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { + "FareClass": { "format": "int32", "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "description": "費率等級 = ['1: 成人', '2: 學生', '3: 孩童', '4: 敬老', '5: 愛心', '6: 愛心孩童', '7: 愛心優待/愛心陪伴', '8: 團體', '9: 軍警']", "type": "integer" }, - "AuthorityCode": { - "title": "String", - "description": "業管機關簡碼", - "type": "string", - "xml": { - "name": "String" - } - }, - "TrainDate": { - "title": "String", - "description": "營運日說明(yyyy-MM-dd)", - "type": "string", - "xml": { - "name": "String" - } - }, - "StationTimetables": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.DailyStationTimeTable.StationTimetable" - }, - "xml": { - "name": "List`1" - } + "CabinClass": { + "format": "int32", + "title": "Int32", + "description": "艙等 = ['1: 標準座車廂', '2: 商務座車廂', '3: 自由座車廂']", + "type": "integer" }, - "Count": { - "format": "int64", - "description": "資料總筆數", + "Price": { + "format": "int32", + "title": "Int32", + "description": "計費價格(新台幣)", "type": "integer" } }, "xml": { - "name": "TraDailyStationWrapperOfStationTimetable", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Fare" } }, - "PTX.API.Rail.Model.TraDailyTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.DailyTrainTimeTable.TrainTimetable]": { - "title": "TRADailyTrainTimeTableList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare": { + "title": "ODFare", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "TrainDate", - "UpdateInterval", - "UpdateTime" + "DestinationStationID", + "DestinationStationName", + "Fares", + "OriginStationID", + "OriginStationName", + "TrainType" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { + "OriginStationID": { "title": "String", - "description": "業管機關簡碼", + "description": "起點車站代碼", "type": "string", "xml": { "name": "String" } }, - "TrainDate": { + "OriginStationName": { + "title": "NameType", + "description": "起點車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "DestinationStationID": { "title": "String", - "description": "營運日說明(yyyy-MM-dd)", + "description": "迄點車站代碼", "type": "string", "xml": { "name": "String" } }, - "TrainTimetables": { + "DestinationStationName": { + "title": "NameType", + "description": "迄點車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "Direction": { + "title": "Int32", + "description": "方向 : [0:'順行',1:'逆行']", + "type": "integer" + }, + "TrainType": { + "format": "int32", + "title": "Int32", + "description": "車種簡碼 = ['1: 太魯閣', '2: 普悠瑪', '3: 自強', '4: 莒光', '5: 復興', '6: 區間', '7: 普快', '10: 區間快']", + "type": "integer" + }, + "Fares": { "title": "Array", - "description": "資料(陣列)", + "description": "票價", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.DailyTrainTimeTable.TrainTimetable" + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.Fare" }, "xml": { "name": "List`1" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "TravelDistance": { + "format": "float", + "description": "起迄站間乘車距離", + "type": "number" } }, "xml": { - "name": "TraDailyTrainWrapperOfTrainTimetable", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "ODFare" } }, - "PTX.API.Rail.Model.TRAGeneralStationWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralStationTimetable.GeneralStationTimetable]": { - "title": "TRAGeneralStationTimetableList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Operator": { + "title": "Operator", + "description": "小火車者營運業者基本資料", "required": [ - "AuthorityCode", - "EffectiveDate", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationTimetables", - "UpdateInterval", - "UpdateTime" + "OperatorCode", + "OperatorName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "OperatorCode": { + "title": "String", + "description": "營運業者簡碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "OperatorName": { + "title": "NameType", + "description": "營運業者名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "AuthorityCode": { + "OperatorPhone": { "title": "String", - "description": "業管機關簡碼", + "description": "營運業者連絡電話", "type": "string", "xml": { "name": "String" } }, - "EffectiveDate": { - "title": "DateTime", - "description": "有效起始日期", - "type": "string" + "OperatorEmail": { + "title": "String", + "description": "營運業者電子信箱", + "type": "string", + "xml": { + "name": "String" + } }, - "ExpireDate": { - "title": "DateTime", - "description": "有效終止日期", - "type": "string" + "OperatorURL": { + "title": "String", + "description": "營運業者網址連結", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcVersion": { + "FareURL": { "title": "String", - "description": "來源版號", + "description": "營運業者票價查詢網站連結", "type": "string", "xml": { "name": "String" } }, - "TimetableName": { + "ReservationURL": { "title": "String", - "description": "定期性站別時刻表名稱", + "description": "營運業者訂票網站", "type": "string", "xml": { "name": "String" } }, - "ValidityDesciption": { + "ReservationPhone": { "title": "String", - "description": "時刻表適用情形說明", + "description": "營運業者訂票電話", "type": "string", "xml": { "name": "String" } }, - "StationTimetables": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralStationTimetable.GeneralStationTimetable" - }, + "OperatorLogoURL": { + "title": "String", + "description": "營運業者Logo網址", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRAGeneralStationWrapperOfGeneralStationTimetable", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Operator" } }, - "PTX.API.Rail.Model.TRAGeneralTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralTrainTimetable]": { - "title": "TRAGeneralTrainTimetableList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Route": { + "title": "Route", + "description": "營運路線基本資料", "required": [ - "AuthorityCode", - "EffectiveDate", - "SrcUpdateInterval", - "SrcUpdateTime", - "TrainTimetables", - "UpdateInterval", - "UpdateTime" + "EndStationID", + "EndStationName", + "LineID", + "OperatorCode", + "RouteID", + "RouteName", + "RouteType", + "RouteURL", + "StartStationID", + "StartStationName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { + "LineNo": { "title": "String", - "description": "業管機關簡碼", + "description": "營運路線所屬之路線編號", "type": "string", "xml": { "name": "String" } }, - "EffectiveDate": { - "title": "DateTime", - "description": "有效起始日期", - "type": "string" + "LineID": { + "title": "String", + "description": "營運路線所屬之路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "ExpireDate": { - "title": "DateTime", - "description": "有效終止日期", - "type": "string" + "RouteID": { + "title": "String", + "description": "營運路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcVersion": { + "OperatorCode": { "title": "String", - "description": "來源版號", + "description": "營運業者代碼", "type": "string", "xml": { "name": "String" } }, - "TimetableName": { + "RouteName": { + "title": "NameType", + "description": "營運路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "RouteType": { + "format": "int32", + "title": "Int32", + "description": "營運路線種類", + "type": "integer" + }, + "StartStationID": { "title": "String", - "description": "定期性站別時刻表名稱", + "description": "營運路線起站代號", "type": "string", "xml": { "name": "String" } }, - "ValidityDesciption": { + "StartStationName": { + "title": "NameType", + "description": "營運路線起站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "EndStationID": { "title": "String", - "description": "時刻表適用情形說明", + "description": "營運路線迄站代號", "type": "string", "xml": { "name": "String" } }, - "TrainTimetables": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralTrainTimetable" - }, + "EndStationName": { + "title": "NameType", + "description": "營運路線迄站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], "xml": { - "name": "List`1" + "name": "NameType" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "RouteURL": { + "title": "String", + "description": "營運路線來源網址", + "type": "string", + "xml": { + "name": "String" + } + }, + "RouteDistance": { + "format": "float", + "description": "路線旅行長度", + "type": "number" } }, "xml": { - "name": "TRAGeneralTrainWrapperOfGeneralTrainTimetable", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Route" } }, - "PTX.API.Rail.Model.TRAODFareWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.ODFare.ODFare]": { - "title": "TRAODFareList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Station": { + "title": "Station", + "description": "小火車車站資料", "required": [ - "AuthorityCode", - "ODFares", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" + "StationID", + "StationName", + "StationPosition", + "StationUID" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "StationUID": { + "title": "String", + "description": "小火車車站唯一識別代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "StationID": { + "title": "String", + "description": "小火車車站代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "AuthorityCode": { + "ReservationCode": { "title": "String", - "description": "業管機關簡碼", + "description": "訂票車站代碼", "type": "string", "xml": { "name": "String" } }, - "EffectiveDate": { + "StationName": { + "title": "NameType", + "description": "車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "StationPosition": { + "title": "PointType", + "description": "車站座標(WGS84)", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.PointType" + } + ], + "xml": { + "name": "PointType" + } + }, + "StationAddress": { "title": "String", - "description": "有效起始日期", + "description": "車站地址", "type": "string", "xml": { "name": "String" } }, - "ExpireDate": { + "StationPhone": { "title": "String", - "description": "有效終止日期", + "description": "車站聯絡電話", "type": "string", "xml": { "name": "String" } }, - "SrcVersion": { + "StationClass": { "title": "String", - "description": "資料版本", + "description": "車站級別 = ['0: 特等', '1: 一等', '2: 二等', '3: 三等', '4: 簡易', '5: 招呼', '6: 號誌', '7:其他']", "type": "string", "xml": { "name": "String" } }, - "ODFares": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.ODFare.ODFare" - }, + "StationURL": { + "title": "String", + "description": "車站資訊說明網址", + "type": "string", "xml": { - "name": "List`1" + "name": "String" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRAODFareWrapperOfODFare", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "Station" } }, - "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRAAlertList.Alert]": { - "title": "TRAAlertList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.LineStation": { + "title": "LineStation", + "description": "路線車站資訊", "required": [ - "Alerts", - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" + "CumulativeDistance", + "Sequence", + "StationID", + "StationName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { + "Sequence": { "format": "int32", "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "description": "站序", "type": "integer" }, - "AuthorityCode": { + "StationID": { "title": "String", - "description": "業管機關簡碼", + "description": "車站代碼", "type": "string", "xml": { "name": "String" } }, - "Alerts": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRAAlertList.Alert" - }, + "StationName": { + "title": "NameType", + "description": "車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], "xml": { - "name": "List`1" + "name": "NameType" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "CumulativeDistance": { + "format": "float", + "title": "Single", + "description": "已累積之里程距離(公里)", + "type": "number" } }, "xml": { - "name": "TRARealTimeWrapperOfAlert", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "LineStation" } }, - "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRANewsList.News]": { - "title": "TRANewsList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.StationOfLine": { + "title": "StationOfLine", + "description": "路線車站基本資料", "required": [ - "AuthorityCode", - "Newses", - "SrcUpdateInterval", - "SrcUpdateTime", - "UpdateInterval", - "UpdateTime" + "LineID", + "LineNo", + "Stations" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "LineNo": { + "title": "String", + "description": "路線編號", + "type": "string", + "xml": { + "name": "String" + } }, - "AuthorityCode": { + "LineID": { "title": "String", - "description": "業管機關簡碼", + "description": "路線代碼", "type": "string", "xml": { "name": "String" } }, - "Newses": { + "Stations": { "title": "Array", - "description": "資料(陣列)", + "description": "路線車站資訊", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRANewsList.News" + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.LineStation" }, "xml": { "name": "List`1" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRARealTimeWrapperOfNews", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "StationOfLine" } }, - "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRAStationLiveBoardList.StationLiveBoard]": { - "title": "TRAStationLiveBoardList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.RouteStation": { + "title": "RouteStation", + "description": "路線車站資訊", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "StationLiveBoards", - "UpdateInterval", - "UpdateTime" + "CumulativeDistance", + "Sequence", + "StationID", + "StationName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { + "Sequence": { "format": "int32", "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", + "description": "站序", "type": "integer" }, - "AuthorityCode": { + "StationID": { "title": "String", - "description": "業管機關簡碼", + "description": "車站代碼", "type": "string", "xml": { "name": "String" } }, - "StationLiveBoards": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRAStationLiveBoardList.StationLiveBoard" - }, + "StationName": { + "title": "NameType", + "description": "車站名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], "xml": { - "name": "List`1" + "name": "NameType" } }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" + "CumulativeDistance": { + "format": "float", + "title": "Single", + "description": "已累積之里程距離(公里)", + "type": "number" } }, "xml": { - "name": "TRARealTimeWrapperOfStationLiveBoard", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "RouteStation" } }, - "PTX.API.Rail.Model.TRARealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.TRATrainLiveBoardList.TrainLiveBoard]": { - "title": "TRATrainLiveBoardList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.StationOfRoute": { + "title": "StationOfRoute", + "description": "營運路線車站基本資料", "required": [ - "AuthorityCode", - "SrcUpdateInterval", - "SrcUpdateTime", - "TrainLiveBoards", - "UpdateInterval", - "UpdateTime" + "Direction", + "LineID", + "LineNo", + "RouteID", + "RouteName", + "Stations" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "LineNo": { + "title": "String", + "description": "營運路線所屬之路線編號", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" + "LineID": { + "title": "String", + "description": "營運路線所屬之路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "AuthorityCode": { + "RouteID": { "title": "String", - "description": "業管機關簡碼", + "description": "營運路線代碼", "type": "string", "xml": { "name": "String" } }, - "TrainLiveBoards": { + "RouteName": { + "title": "NameType", + "description": "營運路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "Direction": { + "format": "int32", + "title": "Int32", + "description": "營運路線方向描述(0:去程,1:返程)", + "type": "integer" + }, + "Stations": { "title": "Array", - "description": "資料(陣列)", + "description": "營運路線車站資訊", "type": "array", "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.TRATrainLiveBoardList.TrainLiveBoard" + "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.RouteStation" }, "xml": { "name": "List`1" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRARealTimeWrapperOfTrainLiveBoard", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "StationOfRoute" } }, - "PTX.API.Rail.Model.TRASpecificWrapper[PTX.Service.DTO.Rail.Specification.V3.TRA.SpecificTrainTimetable]": { - "title": "TRASpecificTrainTimetableList", + "PTX.Service.DTO.Rail.Specification.V3.LiteTrain.TrainType": { + "title": "TrainType", + "description": "小火車列車車種資料", "required": [ - "AuthorityCode", - "EffectiveDate", - "SrcUpdateInterval", - "SrcUpdateTime", - "TrainTimetables", - "UpdateInterval", - "UpdateTime" + "TrainTypeCode", + "TrainTypeID", + "TrainTypeName" ], "type": "object", "properties": { - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "本平台資料更新週期(秒)", - "type": "integer" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "SrcUpdateInterval": { - "format": "int32", - "title": "Int32", - "description": "來源端平台資料更新週期(秒)['-1: 不定期更新']", - "type": "integer" - }, - "AuthorityCode": { - "title": "String", - "description": "業管機關簡碼", - "type": "string", - "xml": { - "name": "String" - } - }, - "EffectiveDate": { - "title": "DateTime", - "description": "有效起始日期", - "type": "string" - }, - "ExpireDate": { - "title": "DateTime", - "description": "有效終止日期", - "type": "string" - }, - "SrcVersion": { - "title": "String", - "description": "來源版號", - "type": "string", - "xml": { - "name": "String" - } - }, - "TimetableName": { + "TrainTypeID": { "title": "String", - "description": "定期性站別時刻表名稱", + "description": "列車車種代碼", "type": "string", "xml": { "name": "String" } }, - "ValidityDesciption": { + "TrainTypeCode": { "title": "String", - "description": "時刻表適用情形說明", + "description": "車種簡碼 = ['1: 中興號', '2: 區間', '3: 主題式列車', '5: 阿里山號', '6: 祝客', '7: 祝客(祝山線)', '8: 檜木車廂']", "type": "string", "xml": { "name": "String" } }, - "TrainTimetables": { - "title": "Array", - "description": "資料(陣列)", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Rail.Specification.V3.TRA.SpecificTrainTimetable" - }, + "TrainTypeName": { + "title": "NameType", + "description": "列車車種名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V3.Base.NameType" + } + ], "xml": { - "name": "List`1" + "name": "NameType" } - }, - "Count": { - "format": "int64", - "description": "資料總筆數", - "type": "integer" } }, "xml": { - "name": "TRASpecificWrapperOfSpecificTrainTimetable", - "namespace": "http://www.w3.org/2001/XMLSchema-instance" + "name": "TrainType" } }, "PTX.Service.DTO.Rail.Specification.V3.TRA.Common.ServiceDay": { @@ -4357,59 +7604,59 @@ } }, "Monday": { - "title": "integer", + "title": "Int32", "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Tuesday": { - "title": "integer", + "title": "Int32", "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Wednesday": { - "title": "integer", + "title": "Int32", "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Thursday": { - "title": "integer", + "title": "Int32", "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Friday": { - "title": "integer", + "title": "Int32", "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Saturday": { - "title": "integer", + "title": "Int32", "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Sunday": { - "title": "integer", + "title": "Int32", "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "NationalHolidays": { - "title": "integer", + "title": "Int32", "description": "國定假日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayBeforeHoliday": { - "title": "integer", + "title": "Int32", "description": "假日前一日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DayAfterHoliday": { - "title": "integer", + "title": "Int32", "description": "假日後一日是否營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "TyphoonDay": { - "title": "integer", + "title": "Int32", "description": "颱風停止上班上課期間營運營運 : [0:'否',1:'是']", - "type": "string" + "type": "integer" } }, "xml": { @@ -4430,19 +7677,19 @@ } }, "StartDate": { - "title": "DateTime", + "format": "date-time", "description": "開始日期", "type": "string" }, "EndDate": { - "title": "DateTime", + "format": "date-time", "description": "結束日期", "type": "string" }, "ServiceStatus": { - "title": "integer", + "title": "Int32", "description": "營運服務狀態代碼 : [0:'停止營運',1:'正常營運',2:'加班營運']", - "type": "string" + "type": "integer" }, "Description": { "title": "String", @@ -4550,9 +7797,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TrainTypeID": { "title": "String", @@ -4639,49 +7886,49 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "WheelChairFlag": { - "title": "integer", + "title": "Int32", "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "PackageServiceFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供行李服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供訂便當服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BreastFeedFlag": { - "title": "integer", + "title": "Int32", "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BikeFlag": { - "title": "integer", + "title": "Int32", "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "CarFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供小客車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DailyFlag": { - "title": "integer", + "title": "Int32", "description": "是否為每日行駛 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "ExtraTrainFlag": { - "title": "integer", + "title": "Int32", "description": "是否為加班車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Note": { "title": "String", @@ -4732,9 +7979,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TimeTables": { "title": "Array", @@ -5000,9 +8247,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TrainTypeID": { "title": "String", @@ -5089,24 +8336,24 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "WheelChairFlag": { - "title": "integer", + "title": "Int32", "description": "是否設身障旅客專用座位車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "PackageServiceFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供行李服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供訂便當服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DiningFlagSections": { "title": "DiningFlagSection[]", @@ -5120,29 +8367,29 @@ } }, "BreastFeedFlag": { - "title": "integer", + "title": "Int32", "description": "是否設有哺(集)乳室車廂 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "BikeFlag": { - "title": "integer", + "title": "Int32", "description": "是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "CarFlag": { - "title": "integer", + "title": "Int32", "description": "是否提供小汽車上火車服務 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "DailyFlag": { - "title": "integer", + "title": "Int32", "description": "是否每日行駛 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "ExtraTrainFlag": { - "title": "integer", + "title": "Int32", "description": "是否為加班車 : [0:'否',1:'是']", - "type": "string" + "type": "integer" }, "Note": { "title": "String", @@ -5233,9 +8480,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "Timetables": { "title": "Array", @@ -6032,9 +9279,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "方向 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TrainType": { "format": "int32", @@ -6202,6 +9449,7 @@ } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" @@ -7686,9 +10934,9 @@ } }, "Status": { - "title": "integer", + "title": "Int32", "description": "營運狀況 : [0:'全線營運停止',1:'全線營運正常',2:'有異常狀況']", - "type": "string" + "type": "integer" }, "Scope": { "title": "AlertScope", @@ -7703,14 +10951,14 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "影響方向 : [0:'南下',1:'北上',2:'雙向']", - "type": "string" + "type": "integer" }, "Level": { - "title": "integer", + "title": "Int32", "description": "影響等級程度 : [1:'重度',2:'中度',3:'輕度']", - "type": "string" + "type": "integer" }, "Effect": { "title": "String", @@ -7737,21 +10985,22 @@ } }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "訊息起始日期時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "訊息結束日期時間", "type": "string" }, "PublishTime": { - "title": "DateTime", + "format": "date-time", "description": "消息發佈日期時間", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "消息更新日期時間", "type": "string" @@ -8083,9 +11332,9 @@ } }, "Language": { - "title": "integer", + "title": "Int32", "description": "語系 : [1:'Zh_tw',2:'En_us',3:'Zh_cn',4:'Ja',5:'Ko',99:'Other']", - "type": "string" + "type": "integer" }, "Department": { "title": "String", @@ -8104,9 +11353,9 @@ } }, "NewsCategory": { - "title": "integer", + "title": "Int32", "description": "消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'新服務上架',8:'API修正',9:'來源異常',99:'其他']", - "type": "string" + "type": "integer" }, "Description": { "title": "String", @@ -8133,21 +11382,23 @@ } }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "消息起始日期時間", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "消息結束日期時間", "type": "string" }, "PublishTime": { + "format": "date-time", "title": "DateTime", "description": "消息發佈日期時間", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本筆資料之更新日期時間", "type": "string" @@ -8199,9 +11450,9 @@ } }, "Direction": { - "title": "integer", + "title": "Int32", "description": "行駛方向 : [0:'順行',1:'逆行']", - "type": "string" + "type": "integer" }, "TrainTypeID": { "title": "String", @@ -8252,9 +11503,9 @@ } }, "TripLine": { - "title": "integer", + "title": "Int32", "description": "山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線']", - "type": "string" + "type": "integer" }, "Platform": { "title": "String", @@ -8287,11 +11538,12 @@ "type": "integer" }, "RunningStatus": { - "title": "integer", + "title": "Int32", "description": "列車狀態 : [0:'準點',1:'誤點',2:'取消']", - "type": "string" + "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本筆資料之更新日期時間", "type": "string" @@ -8368,9 +11620,9 @@ } }, "TrainStationStatus": { - "title": "integer", + "title": "Int32", "description": "列車目前所在之車站狀態 : [0:'進站中',1:'在站上',2:'已離站']", - "type": "string" + "type": "integer" }, "DelayTime": { "format": "int32", @@ -8379,6 +11631,7 @@ "type": "integer" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本筆位置資料之更新日期時間", "type": "string" @@ -8418,14 +11671,14 @@ "description": "座標資料型別", "type": "object", "properties": { - "PositionLat": { + "PositionLon": { "format": "double", - "description": "位置緯度(WGS84)", + "description": "位置經度(WGS84)", "type": "number" }, - "PositionLon": { + "PositionLat": { "format": "double", - "description": "位置經度(WGS84)", + "description": "位置緯度(WGS84)", "type": "number" } }, @@ -8438,6 +11691,10 @@ { "name": "TRA", "description": "臺鐵" + }, + { + "name": "AFR", + "description": "阿里山小火車" } ] } diff --git a/oas.tourism.v2.json b/oas.tourism.v2.json index 966bb13d..cd5b4b37 100644 --- a/oas.tourism.v2.json +++ b/oas.tourism.v2.json @@ -58,7 +58,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -95,8 +95,8 @@ "tags": [ "Tourism" ], - "summary": "取得所有觀光景點資料", - "description": "取得所有觀光景點資料", + "summary": "取得指定[縣市]觀光景點資料", + "description": "取得指定[縣市]觀光景點資料", "operationId": "TourismApi_ScenicSpot_0", "produces": [ "application/json", @@ -106,6 +106,7 @@ { "in": "path", "name": "City", + "description": "縣市名稱", "required": true, "type": "string", "enum": [ @@ -191,7 +192,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -270,7 +271,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -404,7 +405,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -483,7 +484,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -617,7 +618,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -696,7 +697,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -830,7 +831,7 @@ { "in": "query", "name": "$spatialFilter", - "description": "空間過濾", + "description": "空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100)", "type": "string" }, { @@ -2053,13 +2054,22 @@ "Zh_tw": { "title": "String", "description": "中文繁體名稱", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "En": { "title": "String", "description": "英文名稱", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "NameType" } }, "PTX.Service.DTO.Shared.Specification.V2.Base.PointType": { @@ -2067,21 +2077,238 @@ "description": "座標資料型別", "type": "object", "properties": { - "PositionLat": { + "PositionLon": { "format": "double", - "description": "位置緯度(WGS84)", + "description": "位置經度(WGS84)", "type": "number" }, - "PositionLon": { + "PositionLat": { "format": "double", - "description": "位置經度(WGS84)", + "description": "位置緯度(WGS84)", "type": "number" }, "GeoHash": { "title": "String", "description": "地理空間編碼", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "PointType" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.ActivityTourismInfo": { + "title": "ActivityTourismInfo", + "description": "取得觀光活動資料", + "required": [ + "ID", + "SrcUpdateTime", + "UpdateTime" + ], + "type": "object", + "properties": { + "ID": { + "title": "String", + "description": "活動訊息代碼", + "type": "string", + "xml": { + "name": "String" + } + }, + "Name": { + "title": "String", + "description": "活動名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "Description": { + "title": "String", + "description": "活動簡述", + "type": "string", + "xml": { + "name": "String" + } + }, + "Particpation": { + "title": "String", + "description": "活動參與對象", + "type": "string", + "xml": { + "name": "String" + } + }, + "Location": { + "title": "String", + "description": "主要活動地點名稱", + "type": "string", + "xml": { + "name": "String" + } + }, + "Address": { + "title": "String", + "description": "主要活動地點地址", + "type": "string", + "xml": { + "name": "String" + } + }, + "Phone": { + "title": "String", + "description": "活動聯絡電話", + "type": "string", + "xml": { + "name": "String" + } + }, + "Organizer": { + "title": "String", + "description": "活動主辦單位", + "type": "string", + "xml": { + "name": "String" + } + }, + "StartTime": { + "format": "date-time", + "description": "活動開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "EndTime": { + "format": "date-time", + "description": "活動結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "Cycle": { + "title": "String", + "description": "週期性活動執行時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "NonCycle": { + "title": "String", + "description": "非週期性活動執行時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "WebsiteUrl": { + "title": "String", + "description": "活動網址", + "type": "string", + "xml": { + "name": "String" + } + }, + "Picture": { + "title": "TourismPicture", + "description": "活動照片", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" + } + ], + "xml": { + "name": "TourismPicture" + } + }, + "Position": { + "title": "PointType", + "description": "活動位置", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" + } + ], + "xml": { + "name": "PointType" + } + }, + "Class1": { + "title": "String", + "description": "活動分類1", + "type": "string", + "xml": { + "name": "String" + } + }, + "Class2": { + "title": "String", + "description": "活動分類2", + "type": "string", + "xml": { + "name": "String" + } + }, + "MapUrl": { + "title": "String", + "description": "活動地圖/簡圖連結網址", + "type": "string", + "xml": { + "name": "String" + } + }, + "TravelInfo": { + "title": "String", + "description": "交通資訊", + "type": "string", + "xml": { + "name": "String" + } + }, + "ParkingInfo": { + "title": "String", + "description": "停車資訊", + "type": "string", + "xml": { + "name": "String" + } + }, + "Charge": { + "title": "String", + "description": "費用標示", + "type": "string", + "xml": { + "name": "String" + } + }, + "Remarks": { + "title": "String", + "description": "備註(其他活動相關事項)", + "type": "string", + "xml": { + "name": "String" + } + }, + "City": { + "title": "String", + "description": "所屬縣市", + "type": "string", + "xml": { + "name": "String" + } + }, + "SrcUpdateTime": { + "format": "date-time", + "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "ActivityTourismInfo" } }, "PTX.Service.DTO.Tourism.Specification.V2.BusA1Data": { @@ -2101,22 +2328,34 @@ "PlateNumb": { "title": "String", "description": "車牌號碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "OperatorID": { "title": "String", "description": "營運業者代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RouteUID": { "title": "String", "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RouteID": { "title": "String", "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "TaiwanTripName": { "title": "NameType", @@ -2125,17 +2364,26 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "SubRouteUID": { "title": "String", "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "SubRouteID": { "title": "String", "description": "地區既用中之子路線代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "SubRouteName": { "title": "NameType", @@ -2144,11 +2392,13 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "Direction": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, @@ -2159,7 +2409,10 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, "Speed": { "format": "double", @@ -2172,48 +2425,50 @@ "type": "number" }, "DutyStatus": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "勤務狀態 : [0:'正常',1:'開始',2:'結束']", "type": "integer" }, "BusStatus": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知']", "type": "integer" }, "MessageType": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", "type": "integer" }, "GPSTime": { + "format": "date-time", "title": "DateTime", "description": "車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "TransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcRecTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BusA1Data" } }, "PTX.Service.DTO.Tourism.Specification.V2.BusA2Data": { @@ -2230,22 +2485,34 @@ "PlateNumb": { "title": "String", "description": "車牌號碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "OperatorID": { "title": "String", "description": "營運業者代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RouteUID": { "title": "String", "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RouteID": { "title": "String", "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "TaiwanTripName": { "title": "NameType", @@ -2254,17 +2521,26 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "SubRouteUID": { "title": "String", "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "SubRouteID": { "title": "String", "description": "地區既用中之子路線代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "SubRouteName": { "title": "NameType", @@ -2273,23 +2549,31 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "Direction": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, "StopUID": { "title": "String", "description": "站牌唯一識別代碼,規則為 {平台代碼} + {StopID},其中 {平台代碼} 可於Provider API中的ProviderCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StopID": { "title": "String", "description": "地區既用中之站牌代號(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StopName": { "title": "NameType", @@ -2298,397 +2582,669 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "MessageType": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", "type": "integer" }, "DutyStatus": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "勤務狀態 : [0:'正常',1:'開始',2:'結束']", "type": "integer" }, "BusStatus": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知']", "type": "integer" }, "A2EventType": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "進站離站 : [0:'離站',1:'進站']", "type": "integer" }, "GPSTime": { + "format": "date-time", "title": "DateTime", "description": "車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "TransTime": { - "title": "DateTime", + "format": "date-time", "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcRecTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", + "format": "date-time", "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BusA2Data" } }, - "PTX.Service.DTO.Tourism.Specification.V2.TourismPicture": { - "title": "TourismPicture", - "description": "觀光照片資料型別", + "PTX.Service.DTO.Tourism.Specification.V2.BusFrequency": { + "title": "BusFrequency", + "description": "發車班距資料", + "required": [ + "EndTime", + "MaxHeadwayMins", + "MinHeadwayMins", + "StartTime" + ], "type": "object", "properties": { - "PictureUrl1": { + "StartTime": { "title": "String", - "description": "照片連結網址1", - "type": "string" + "description": "發車班距起始適用時間,格式為: HH:mm", + "type": "string", + "xml": { + "name": "String" + } }, - "PictureDescription1": { + "EndTime": { "title": "String", - "description": "照片說明1", - "type": "string" + "description": "發車班距結束適用時間,格式為: HH:mm", + "type": "string", + "xml": { + "name": "String" + } }, - "PictureUrl2": { - "title": "String", - "description": "照片連結網址2", - "type": "string" + "MinHeadwayMins": { + "format": "int32", + "title": "Int32", + "description": "最小班距時間(分鐘)", + "type": "integer" }, - "PictureDescription2": { - "title": "String", - "description": "照片說明2", - "type": "string" + "MaxHeadwayMins": { + "format": "int32", + "title": "Int32", + "description": "最大班距時間(分鐘)", + "type": "integer" }, - "PictureUrl3": { - "title": "String", - "description": "照片連結網址3", - "type": "string" + "ServiceDay": { + "title": "ServiceDay", + "description": "週內營運日", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.ServiceDay" + } + ], + "xml": { + "name": "ServiceDay" + } }, - "PictureDescription3": { - "title": "String", - "description": "照片說明3", - "type": "string" + "SpecialDays": { + "title": "Array", + "description": "特殊營運日", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.SpecialDay" + }, + "xml": { + "name": "List`1" + } } + }, + "xml": { + "name": "BusFrequency" } }, - "PTX.Service.DTO.Tourism.Specification.V2.ActivityTourismInfo": { - "title": "ActivityTourismInfo", - "description": "取得觀光活動資料", + "PTX.Service.DTO.Tourism.Specification.V2.BusN1EstimateTime": { + "title": "BusN1EstimateTime", "required": [ - "ID", - "SrcUpdateTime", + "Direction", "UpdateTime" ], "type": "object", "properties": { - "ID": { - "title": "String", - "description": "活動訊息代碼", - "type": "string" - }, - "Name": { - "title": "String", - "description": "活動名稱", - "type": "string" - }, - "Description": { + "PlateNumb": { "title": "String", - "description": "活動簡述", - "type": "string" + "description": "車牌號碼", + "type": "string", + "xml": { + "name": "String" + } }, - "Particpation": { + "StopUID": { "title": "String", - "description": "活動參與對象", - "type": "string" + "description": "站牌唯一識別代碼,規則為 {業管機關代碼} + {StopID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "Location": { + "StopID": { "title": "String", - "description": "主要活動地點名稱", - "type": "string" + "description": "地區既用中之站牌代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "Address": { - "title": "String", - "description": "主要活動地點地址", - "type": "string" + "StopName": { + "title": "NameType", + "description": "站牌名", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "Phone": { + "RouteUID": { "title": "String", - "description": "活動聯絡電話", - "type": "string" + "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "Organizer": { + "RouteID": { "title": "String", - "description": "活動主辦單位", - "type": "string" - }, - "StartTime": { - "title": "DateTime", - "description": "活動開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "EndTime": { - "title": "DateTime", - "description": "活動結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "description": "地區既用中之路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "Cycle": { - "title": "String", - "description": "週期性活動執行時間", - "type": "string" + "TaiwanTripName": { + "title": "NameType", + "description": "台灣好行路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "NonCycle": { + "SubRouteUID": { "title": "String", - "description": "非週期性活動執行時間", - "type": "string" + "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "WebsiteUrl": { + "SubRouteID": { "title": "String", - "description": "活動網址", - "type": "string" + "description": "地區既用中之子路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "Picture": { - "title": "TourismPicture", - "description": "活動照片", + "SubRouteName": { + "title": "NameType", + "description": "子路線名稱", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, - "Position": { - "title": "PointType", - "description": "活動位置", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" - } - ] + "Direction": { + "title": "Int32", + "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" }, - "Class1": { - "title": "String", - "description": "活動分類1", - "type": "string" + "EstimateTime": { + "format": "int32", + "description": "到站時間預估(秒)", + "type": "integer" }, - "Class2": { - "title": "String", - "description": "活動分類2", - "type": "string" + "StopCountDown": { + "format": "int32", + "description": "車輛距離本站站數", + "type": "integer" }, - "MapUrl": { + "CurrentStop": { "title": "String", - "description": "活動地圖/簡圖連結網址", - "type": "string" + "description": "車輛目前所在站牌代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "TravelInfo": { + "DestinationStop": { "title": "String", - "description": "交通資訊", - "type": "string" + "description": "車輛目的站牌代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "ParkingInfo": { - "title": "String", - "description": "停車資訊", - "type": "string" + "StopStatus": { + "title": "Int32", + "description": "車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運']", + "type": "integer" }, - "Charge": { - "title": "String", - "description": "費用標示", + "MessageType": { + "title": "Int32", + "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", + "type": "integer" + }, + "NextBusTime": { + "format": "date-time", + "description": "下一班公車到達時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, - "Remarks": { - "title": "String", - "description": "備註(其他活動相關事項)", + "IsLastBus": { + "description": "是否為末班車", + "type": "boolean" + }, + "TransTime": { + "format": "date-time", + "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, - "City": { - "title": "String", - "description": "所屬縣市", + "SrcRecTime": { + "format": "date-time", + "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "SrcUpdateTime": { - "title": "DateTime", - "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "format": "date-time", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BusN1EstimateTime" } }, - "PTX.Service.DTO.Tourism.Specification.V2.HotelTourismInfo": { - "title": "HotelTourismInfo", - "description": "取得觀光旅宿資料", + "PTX.Service.DTO.Tourism.Specification.V2.BusRoute": { + "title": "BusRoute", + "description": "路線資料型別", "required": [ - "ID", - "SrcUpdateTime", + "AuthorityID", + "BusRouteType", + "HasSubRoutes", + "OperatorIDs", + "Operators", + "ProviderID", + "RouteID", + "RouteUID", + "TaiwanTripName", "UpdateTime" ], "type": "object", "properties": { - "ID": { + "RouteUID": { "title": "String", - "description": "旅館民宿代碼", - "type": "string" + "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "Name": { + "RouteID": { "title": "String", - "description": "旅館民宿名稱", - "type": "string" + "description": "地區既用中之路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "Description": { - "title": "String", - "description": "旅館民宿簡述", - "type": "string" + "HasSubRoutes": { + "title": "Boolean", + "description": "實際上是否有多條附屬路線。(此欄位值與SubRoutes結構並無強烈的絕對關聯。詳細說明請參閱swagger上方的【資料服務使用注意事項】)", + "type": "boolean" }, - "Grade": { - "title": "String", - "description": "觀光旅館星級", - "type": "string" + "OperatorIDs": { + "title": "Array", + "description": "營運業者代碼", + "type": "array", + "items": { + "title": "String", + "type": "string", + "xml": { + "name": "String" + } + }, + "xml": { + "name": "List`1" + } }, - "Address": { - "title": "String", - "description": "旅館民宿地址", - "type": "string" + "Operators": { + "title": "Array", + "description": "營運業者", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.RouteOperator" + }, + "xml": { + "name": "List`1" + } }, - "ZipCode": { + "AuthorityID": { "title": "String", - "description": "郵遞區號", - "type": "string" + "description": "業管單位代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "Phone": { + "ProviderID": { "title": "String", - "description": "旅館民宿電話", - "type": "string" + "description": "資料提供平台代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "Fax": { - "title": "String", - "description": "旅館民宿傳真", - "type": "string" + "SubRoutes": { + "title": "Array", + "description": "附屬路線資料(如果原始資料並無提供附屬路線ID,而本平台基於跨來源資料之一致性,會以SubRouteID=RouteID產製一份相對應的附屬路線資料(若有去返程,則會有兩筆))", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusSubRoute" + }, + "xml": { + "name": "List`1" + } }, - "WebsiteUrl": { - "title": "String", - "description": "旅館民宿網站網址", - "type": "string" + "BusRouteType": { + "title": "Int32", + "description": "公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車']", + "type": "integer" }, - "Picture": { - "title": "TourismPicture", - "description": "旅館民宿照片", + "TaiwanTripName": { + "title": "NameType", + "description": "台灣好行路線名稱", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, - "Position": { - "title": "PointType", - "description": "旅館民宿位置", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" - } - ] + "DepartureStopNameZh": { + "title": "String", + "description": "起站中文名稱", + "type": "string", + "xml": { + "name": "String" + } }, - "Class": { + "DepartureStopNameEn": { "title": "String", - "description": "旅館民宿分類", - "type": "string" + "description": "起站英文名稱", + "type": "string", + "xml": { + "name": "String" + } }, - "MapUrl": { + "DestinationStopNameZh": { "title": "String", - "description": "旅館民宿地點簡圖連結網址", - "type": "string" + "description": "終點站中文名稱", + "type": "string", + "xml": { + "name": "String" + } }, - "Spec": { + "DestinationStopNameEn": { "title": "String", - "description": "房型、價目及數量說明", - "type": "string" + "description": "終點站英文名稱", + "type": "string", + "xml": { + "name": "String" + } }, - "ServiceInfo": { + "TicketPriceDescriptionZh": { "title": "String", - "description": "服務內容介紹", - "type": "string" + "description": "票價中文敘述", + "type": "string", + "xml": { + "name": "String" + } }, - "ParkingInfo": { + "TicketPriceDescriptionEn": { "title": "String", - "description": "停車資訊", - "type": "string" + "description": "票價英文敘述", + "type": "string", + "xml": { + "name": "String" + } + }, + "FareBufferZoneDescriptionZh": { + "title": "String", + "description": "收費緩衝區中文敘述", + "type": "string", + "xml": { + "name": "String" + } + }, + "FareBufferZoneDescriptionEn": { + "title": "String", + "description": "收費緩衝區英文敘述", + "type": "string", + "xml": { + "name": "String" + } + }, + "RouteUrl": { + "title": "String", + "description": "路線資訊說明網址", + "type": "string", + "xml": { + "name": "String" + } + }, + "LiveBusUrl": { + "title": "String", + "description": "路線公車動態資訊網址", + "type": "string", + "xml": { + "name": "String" + } + }, + "RouteMapImageUrl": { + "title": "String", + "description": "路線簡圖網址", + "type": "string", + "xml": { + "name": "String" + } }, "City": { "title": "String", - "description": "所屬縣市", - "type": "string" + "description": "路線權管所屬縣市(相當於市區公車API的City參數)[若為公路/國道客運路線則為空值]", + "type": "string", + "xml": { + "name": "String" + } }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "CityCode": { + "title": "String", + "description": "路線權管所屬縣市之代碼(國際ISO 3166-2 三碼城市代碼)[若為公路/國道客運路線則為空值]", + "type": "string", + "xml": { + "name": "String" + } }, "UpdateTime": { + "format": "date-time", "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BusRoute" } }, - "PTX.Service.DTO.Tourism.Specification.V2.BusN1EstimateTime": { - "title": "BusN1EstimateTime", + "PTX.Service.DTO.Tourism.Specification.V2.BusSchedule": { + "title": "BusSchedule", "required": [ "Direction", + "RouteID", + "RouteUID", + "SubRouteID", + "SubRouteName", + "SubRouteUID", + "TaiwanTripName", "UpdateTime" ], "type": "object", "properties": { - "PlateNumb": { + "RouteUID": { "title": "String", - "description": "車牌號碼", - "type": "string" + "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "StopUID": { + "RouteID": { "title": "String", - "description": "站牌唯一識別代碼,規則為 {業管機關代碼} + {StopID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "description": "地區既用中之路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "StopID": { + "TaiwanTripName": { + "title": "NameType", + "description": "台灣好行路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } + }, + "SubRouteUID": { "title": "String", - "description": "地區既用中之站牌代碼(為原資料內碼)", - "type": "string" + "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "StopName": { + "SubRouteID": { + "title": "String", + "description": "地區既用中之子路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } + }, + "SubRouteName": { "title": "NameType", - "description": "站牌名", + "description": "子路線名稱", "allOf": [ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } + }, + "Direction": { + "title": "Int32", + "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" + }, + "Timetables": { + "title": "Array", + "description": "預定班表", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusTimetable" + }, + "xml": { + "name": "List`1" + } + }, + "Frequencys": { + "title": "Array", + "description": "發車班距", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusFrequency" + }, + "xml": { + "name": "List`1" + } }, + "UpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + } + }, + "xml": { + "name": "BusSchedule" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.BusStopOfRoute": { + "title": "BusStopOfRoute", + "description": "路線與站牌對應資料", + "required": [ + "Direction", + "KeyPattern", + "RouteID", + "RouteUID", + "Stops", + "SubRouteID", + "SubRouteName", + "SubRouteUID", + "TaiwanTripName", + "UpdateTime" + ], + "type": "object", + "properties": { "RouteUID": { "title": "String", "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "RouteID": { "title": "String", "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "TaiwanTripName": { "title": "NameType", @@ -2697,17 +3253,31 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } + }, + "KeyPattern": { + "title": "Boolean", + "description": "是否為主路線", + "type": "boolean" }, "SubRouteUID": { "title": "String", "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "SubRouteID": { "title": "String", "description": "地區既用中之子路線代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "SubRouteName": { "title": "NameType", @@ -2716,75 +3286,217 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "Direction": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", "type": "integer" }, - "EstimateTime": { - "format": "int32", - "description": "到站時間預估(秒)", - "type": "integer" + "Stops": { + "title": "Array", + "description": "所有經過站牌", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.Stop" + }, + "xml": { + "name": "List`1" + } }, - "StopCountDown": { - "format": "int32", - "description": "車輛距離本站站數", - "type": "integer" + "UpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + } + }, + "xml": { + "name": "BusStopOfRoute" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.BusStopTime": { + "title": "BusStopTime", + "description": "公車停靠時間資料", + "required": [ + "ArrivalTime", + "DepartureTime", + "StopID", + "StopName", + "StopSequence", + "StopUID" + ], + "type": "object", + "properties": { + "StopSequence": { + "format": "int32", + "title": "Int32", + "description": "路線經過站牌之順序(由1開始)", + "type": "integer" }, - "CurrentStop": { + "StopUID": { "title": "String", - "description": "車輛目前所在站牌代碼", - "type": "string" + "description": "站牌唯一識別代碼,規則為 {業管機關代碼} + {StopID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "DestinationStop": { + "StopID": { "title": "String", - "description": "車輛目的站牌代碼", - "type": "string" + "description": "地區既用中之站牌代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "StopStatus": { - "format": "int32", - "title": "integer", - "description": "車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運']", - "type": "integer" + "StopName": { + "title": "NameType", + "description": "站牌名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "MessageType": { - "format": "int32", - "title": "integer", - "description": "資料型態種類 : [0:'未知',1:'定期',2:'非定期']", - "type": "integer" + "ArrivalTime": { + "title": "String", + "description": "到站時間,格式為:HH:mm", + "type": "string", + "xml": { + "name": "String" + } }, - "NextBusTime": { - "title": "DateTime", - "description": "下一班公車到達時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "DepartureTime": { + "title": "String", + "description": "離站時間,格式為:HH:mm", + "type": "string", + "xml": { + "name": "String" + } + } + }, + "xml": { + "name": "BusStopTime" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.BusSubRoute": { + "title": "BusSubRoute", + "description": "附屬路線資料型別", + "required": [ + "Direction", + "OperatorIDs", + "SubRouteID", + "SubRouteName", + "SubRouteUID" + ], + "type": "object", + "properties": { + "SubRouteUID": { + "title": "String", + "description": "附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "IsLastBus": { - "description": "是否為末班車", - "type": "boolean" + "SubRouteID": { + "title": "String", + "description": "地區既用中之附屬路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "TransTime": { - "title": "DateTime", - "description": "車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "OperatorIDs": { + "title": "Array", + "description": "營運業者代碼", + "type": "array", + "items": { + "title": "String", + "type": "string", + "xml": { + "name": "String" + } + }, + "xml": { + "name": "List`1" + } }, - "SrcRecTime": { - "title": "DateTime", - "description": "來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "SubRouteName": { + "title": "NameType", + "description": "附屬路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "Headsign": { + "title": "String", + "description": "車頭描述", + "type": "string", + "xml": { + "name": "String" + } }, - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "HeadsignEn": { + "title": "String", + "description": "車頭英文描述", + "type": "string", + "xml": { + "name": "String" + } + }, + "Direction": { + "title": "Int32", + "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" + }, + "FirstBusTime": { + "title": "String", + "description": "平日第一班發車時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "LastBusTime": { + "title": "String", + "description": "平日返程第一班發車時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "HolidayFirstBusTime": { + "title": "String", + "description": "假日去程第一班發車時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "HolidayLastBusTime": { + "title": "String", + "description": "假日返程第一班發車時間", + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "BusSubRoute" } }, "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripNews": { @@ -2802,515 +3514,519 @@ "NewsID": { "title": "String", "description": "最新消息原單位發布代碼", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Language": { "title": "String", "description": "語系", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "NewsCategory": { "title": "String", "description": "消息類別", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Title": { "title": "String", "description": "消息標題", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "Description": { "title": "String", "description": "內容描述", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "PublishTime": { - "title": "DateTime", + "format": "date-time", "description": "消息公告日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "StartTime": { - "title": "DateTime", + "format": "date-time", "description": "開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "EndTime": { - "title": "DateTime", + "format": "date-time", "description": "結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, + "SrcUpdateTime": { + "format": "date-time", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, "UpdateTime": { + "format": "date-time", "title": "DateTime", "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BusTaiwanTripNews" } }, - "PTX.Service.DTO.Tourism.Specification.V2.RestaurantTourismInfo": { - "title": "RestaurantTourismInfo", - "description": "取得觀光餐飲資料", + "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripS2STravelTime": { + "title": "BusTaiwanTripS2STravelTime", "required": [ - "ID", - "SrcUpdateTime", + "RouteID", + "RouteUID", + "TravelTimes", "UpdateTime" ], "type": "object", "properties": { - "ID": { + "RouteUID": { "title": "String", - "description": "餐飲店家代碼", - "type": "string" + "description": "路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "Name": { + "RouteID": { "title": "String", - "description": "餐飲店家名稱", - "type": "string" + "description": "路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "Description": { + "SubRouteUID": { "title": "String", - "description": "店家簡述", - "type": "string" + "description": "附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "Address": { + "SubRouteID": { "title": "String", - "description": "店家地址", - "type": "string" + "description": "附屬路線代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "ZipCode": { - "title": "String", - "description": "郵遞區號", - "type": "string" + "TravelTimes": { + "title": "Array", + "description": "站間運行時間資訊", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripS2STravelTime+TravelTime" + }, + "xml": { + "name": "List`1" + } }, - "Phone": { - "title": "String", - "description": "預約電話", + "UpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" + } + }, + "xml": { + "name": "BusTaiwanTripS2STravelTime" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripS2STravelTime+TravelTime": { + "title": "TravelTime", + "required": [ + "Distance", + "FromStopID", + "RunTime", + "Sequence", + "StopTime", + "ToStopID" + ], + "type": "object", + "properties": { + "Sequence": { + "format": "int32", + "title": "Int32", + "description": "站間序號", + "type": "integer" }, - "OpenTime": { + "FromStopID": { "title": "String", - "description": "營業時間", - "type": "string" + "description": "起站站牌代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "WebsiteUrl": { + "ToStopID": { "title": "String", - "description": "店家網站網址", - "type": "string" + "description": "迄站站牌代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "Picture": { - "title": "TourismPicture", - "description": "店家照片", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" - } - ] + "Distance": { + "format": "float", + "title": "Single", + "description": "站間距離", + "type": "number" }, - "Position": { - "title": "PointType", - "description": "店家位置", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" - } - ] + "RunTime": { + "format": "int32", + "title": "Int32", + "description": "站間預估行駛時間", + "type": "integer" }, - "Class": { + "StopTime": { + "format": "int32", + "title": "Int32", + "description": "起站停靠時間", + "type": "integer" + } + }, + "xml": { + "name": "TravelTime" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripShape": { + "title": "BusTaiwanTripShape", + "description": "台灣好行線型資料", + "required": [ + "Direction", + "Geometry", + "RouteID", + "RouteUID", + "SrcUpdateTime", + "UpdateTime" + ], + "type": "object", + "properties": { + "RouteUID": { "title": "String", - "description": "店家分類", - "type": "string" + "description": "路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", + "type": "string", + "xml": { + "name": "String" + } }, - "MapUrl": { + "RouteID": { "title": "String", - "description": "店家地圖/簡圖介紹網址", - "type": "string" + "description": "地區既用中之路線代碼(為原資料內碼)", + "type": "string", + "xml": { + "name": "String" + } }, - "ParkingInfo": { - "title": "String", - "description": "停車資訊", - "type": "string" + "TaiwanTripName": { + "title": "NameType", + "description": "台灣好行路線名稱", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + } + ], + "xml": { + "name": "NameType" + } }, - "City": { + "Direction": { + "title": "Int32", + "description": "去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "type": "integer" + }, + "Geometry": { "title": "String", - "description": "所屬縣市", - "type": "string" + "description": "well-known text,為路線軌跡資料", + "type": "string", + "xml": { + "name": "String" + } }, "SrcUpdateTime": { - "title": "DateTime", - "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "format": "date-time", + "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, "UpdateTime": { + "format": "date-time", "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "BusTaiwanTripShape" } }, - "PTX.Service.DTO.Tourism.Specification.V2.RouteOperator": { - "title": "RouteOperator", - "description": "營運業者資訊", + "PTX.Service.DTO.Tourism.Specification.V2.BusTimetable": { + "title": "BusTimetable", + "description": "班次資料", "required": [ - "OperatorCode", - "OperatorID", - "OperatorName", - "OperatorNo" + "StopTimes" ], "type": "object", "properties": { - "OperatorID": { + "TripID": { "title": "String", - "description": "營運業者代碼", - "type": "string" + "description": "班次代碼,為無意義之編碼", + "type": "string", + "xml": { + "name": "String" + } }, - "OperatorName": { - "title": "NameType", - "description": "營運業者名稱", + "ServiceDay": { + "title": "ServiceDay", + "description": "週內營運日", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.ServiceDay" } - ] + ], + "xml": { + "name": "ServiceDay" + } }, - "OperatorCode": { + "SpecialDays": { + "title": "Array", + "description": "特殊營運日", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.SpecialDay" + }, + "xml": { + "name": "List`1" + } + }, + "StopTimes": { + "title": "Array", + "description": "公車停靠時間資料", + "type": "array", + "items": { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusStopTime" + }, + "xml": { + "name": "List`1" + } + } + }, + "xml": { + "name": "BusTimetable" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.DatePeriod": { + "title": "DatePeriod", + "type": "object", + "properties": { + "StartDate": { "title": "String", - "description": "營運業者簡碼", - "type": "string" + "description": "營運起始日(格式: yyyy-MM-dd)", + "type": "string", + "xml": { + "name": "String" + } }, - "OperatorNo": { + "EndDate": { "title": "String", - "description": "營運業者編號[交通部票證資料系統定義]", - "type": "string" + "description": "營運結束日(格式: yyyy-MM-dd)", + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "DatePeriod" } }, - "PTX.Service.DTO.Tourism.Specification.V2.BusSubRoute": { - "title": "BusSubRoute", - "description": "附屬路線資料型別", + "PTX.Service.DTO.Tourism.Specification.V2.HotelTourismInfo": { + "title": "HotelTourismInfo", + "description": "取得觀光旅宿資料", "required": [ - "Direction", - "OperatorIDs", - "SubRouteID", - "SubRouteName", - "SubRouteUID" + "ID", + "SrcUpdateTime", + "UpdateTime" ], "type": "object", "properties": { - "SubRouteUID": { + "ID": { "title": "String", - "description": "附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "description": "旅館民宿代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "SubRouteID": { + "Name": { "title": "String", - "description": "地區既用中之附屬路線代碼(為原資料內碼)", - "type": "string" + "description": "旅館民宿名稱", + "type": "string", + "xml": { + "name": "String" + } }, - "OperatorIDs": { - "title": "Array", - "description": "營運業者代碼", - "type": "array", - "items": { - "title": "String", - "type": "string" + "Description": { + "title": "String", + "description": "旅館民宿簡述", + "type": "string", + "xml": { + "name": "String" } }, - "SubRouteName": { - "title": "NameType", - "description": "附屬路線名稱", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" - } - ] + "Grade": { + "title": "String", + "description": "觀光旅館星級", + "type": "string", + "xml": { + "name": "String" + } }, - "Headsign": { + "Address": { "title": "String", - "description": "車頭描述", - "type": "string" + "description": "旅館民宿地址", + "type": "string", + "xml": { + "name": "String" + } }, - "HeadsignEn": { + "ZipCode": { "title": "String", - "description": "車頭英文描述", - "type": "string" + "description": "郵遞區號", + "type": "string", + "xml": { + "name": "String" + } }, - "Direction": { - "format": "int32", - "title": "integer", - "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer" + "Phone": { + "title": "String", + "description": "旅館民宿電話", + "type": "string", + "xml": { + "name": "String" + } }, - "FirstBusTime": { + "Fax": { "title": "String", - "description": "平日第一班發車時間", - "type": "string" + "description": "旅館民宿傳真", + "type": "string", + "xml": { + "name": "String" + } }, - "LastBusTime": { + "WebsiteUrl": { "title": "String", - "description": "平日返程第一班發車時間", - "type": "string" + "description": "旅館民宿網站網址", + "type": "string", + "xml": { + "name": "String" + } }, - "HolidayFirstBusTime": { + "Picture": { + "title": "TourismPicture", + "description": "旅館民宿照片", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" + } + ], + "xml": { + "name": "TourismPicture" + } + }, + "Position": { + "title": "PointType", + "description": "旅館民宿位置", + "allOf": [ + { + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" + } + ], + "xml": { + "name": "PointType" + } + }, + "Class": { "title": "String", - "description": "假日去程第一班發車時間", - "type": "string" + "description": "旅館民宿分類", + "type": "string", + "xml": { + "name": "String" + } }, - "HolidayLastBusTime": { + "MapUrl": { "title": "String", - "description": "假日返程第一班發車時間", - "type": "string" - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.BusRoute": { - "title": "BusRoute", - "description": "路線資料型別", - "required": [ - "AuthorityID", - "BusRouteType", - "HasSubRoutes", - "OperatorIDs", - "Operators", - "ProviderID", - "RouteID", - "RouteUID", - "TaiwanTripName", - "UpdateTime" - ], - "type": "object", - "properties": { - "RouteUID": { - "title": "String", - "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" - }, - "RouteID": { - "title": "String", - "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" - }, - "HasSubRoutes": { - "title": "Boolean", - "description": "實際上是否有多條附屬路線。(此欄位值與SubRoutes結構並無強烈的絕對關聯。詳細說明請參閱swagger上方的【資料服務使用注意事項】)", - "type": "boolean" - }, - "OperatorIDs": { - "title": "Array", - "description": "營運業者代碼", - "type": "array", - "items": { - "title": "String", - "type": "string" - } - }, - "Operators": { - "title": "Array", - "description": "營運業者", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.RouteOperator" + "description": "旅館民宿地點簡圖連結網址", + "type": "string", + "xml": { + "name": "String" } }, - "AuthorityID": { - "title": "String", - "description": "業管單位代碼", - "type": "string" - }, - "ProviderID": { + "Spec": { "title": "String", - "description": "資料提供平台代碼", - "type": "string" - }, - "SubRoutes": { - "title": "Array", - "description": "附屬路線資料(如果原始資料並無提供附屬路線ID,而本平台基於跨來源資料之一致性,會以SubRouteID=RouteID產製一份相對應的附屬路線資料(若有去返程,則會有兩筆))", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusSubRoute" + "description": "房型、價目及數量說明", + "type": "string", + "xml": { + "name": "String" } }, - "BusRouteType": { - "format": "int32", - "title": "integer", - "description": "公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車']", - "type": "integer" - }, - "TaiwanTripName": { - "title": "NameType", - "description": "台灣好行路線名稱", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" - } - ] - }, - "DepartureStopNameZh": { - "title": "String", - "description": "起站中文名稱", - "type": "string" - }, - "DepartureStopNameEn": { - "title": "String", - "description": "起站英文名稱", - "type": "string" - }, - "DestinationStopNameZh": { - "title": "String", - "description": "終點站中文名稱", - "type": "string" - }, - "DestinationStopNameEn": { - "title": "String", - "description": "終點站英文名稱", - "type": "string" - }, - "TicketPriceDescriptionZh": { - "title": "String", - "description": "票價中文敘述", - "type": "string" - }, - "TicketPriceDescriptionEn": { - "title": "String", - "description": "票價英文敘述", - "type": "string" - }, - "FareBufferZoneDescriptionZh": { - "title": "String", - "description": "收費緩衝區中文敘述", - "type": "string" - }, - "FareBufferZoneDescriptionEn": { - "title": "String", - "description": "收費緩衝區英文敘述", - "type": "string" - }, - "RouteUrl": { - "title": "String", - "description": "路線資訊說明網址", - "type": "string" - }, - "LiveBusUrl": { + "ServiceInfo": { "title": "String", - "description": "路線公車動態資訊網址", - "type": "string" + "description": "服務內容介紹", + "type": "string", + "xml": { + "name": "String" + } }, - "RouteMapImageUrl": { + "ParkingInfo": { "title": "String", - "description": "路線簡圖網址", - "type": "string" + "description": "停車資訊", + "type": "string", + "xml": { + "name": "String" + } }, "City": { "title": "String", - "description": "路線權管所屬縣市(相當於市區公車API的City參數)[若為公路/國道客運路線則為空值]", - "type": "string" - }, - "CityCode": { - "title": "String", - "description": "路線權管所屬縣市之代碼(國際ISO 3166-2 三碼城市代碼)[若為公路/國道客運路線則為空值]", - "type": "string" + "description": "所屬縣市", + "type": "string", + "xml": { + "name": "String" + } }, - "UpdateTime": { + "SrcUpdateTime": { + "format": "date-time", "title": "DateTime", - "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripS2STravelTime+TravelTime": { - "title": "TravelTime", - "required": [ - "Distance", - "FromStopID", - "RunTime", - "Sequence", - "StopTime", - "ToStopID" - ], - "type": "object", - "properties": { - "Sequence": { - "format": "int32", - "title": "Int32", - "description": "站間序號", - "type": "integer" - }, - "FromStopID": { - "title": "String", - "description": "起站站牌代碼", - "type": "string" - }, - "ToStopID": { - "title": "String", - "description": "迄站站牌代碼", - "type": "string" - }, - "Distance": { - "format": "float", - "title": "Single", - "description": "站間距離", - "type": "number" - }, - "RunTime": { - "format": "int32", - "title": "Int32", - "description": "站間預估行駛時間", - "type": "integer" - }, - "StopTime": { - "format": "int32", - "title": "Int32", - "description": "起站停靠時間", - "type": "integer" - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripS2STravelTime": { - "title": "BusTaiwanTripS2STravelTime", - "required": [ - "RouteID", - "RouteUID", - "TravelTimes", - "UpdateTime" - ], - "type": "object", - "properties": { - "RouteUID": { - "title": "String", - "description": "路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" - }, - "RouteID": { - "title": "String", - "description": "路線代碼", - "type": "string" - }, - "SubRouteUID": { - "title": "String", - "description": "附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" - }, - "SubRouteID": { - "title": "String", - "description": "附屬路線代碼", + "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" }, - "TravelTimes": { - "title": "Array", - "description": "站間運行時間資訊", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripS2STravelTime+TravelTime" - } - }, "UpdateTime": { + "format": "date-time", "title": "DateTime", - "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "HotelTourismInfo" } }, - "PTX.Service.DTO.Tourism.Specification.V2.ScenicSpotTourismInfo": { - "title": "ScenicSpotTourismInfo", - "description": "取得觀光景點資料", + "PTX.Service.DTO.Tourism.Specification.V2.RestaurantTourismInfo": { + "title": "RestaurantTourismInfo", + "description": "取得觀光餐飲資料", "required": [ "ID", "SrcUpdateTime", @@ -3320,535 +4036,521 @@ "properties": { "ID": { "title": "String", - "description": "景點代碼", - "type": "string" + "description": "餐飲店家代碼", + "type": "string", + "xml": { + "name": "String" + } }, "Name": { "title": "String", - "description": "景點名稱", - "type": "string" - }, - "DescriptionDetail": { - "title": "String", - "description": "景點特色詳細說明", - "type": "string" + "description": "餐飲店家名稱", + "type": "string", + "xml": { + "name": "String" + } }, "Description": { "title": "String", - "description": "景點特色精簡說明", - "type": "string" - }, - "Phone": { - "title": "String", - "description": "景點服務電話", - "type": "string" + "description": "店家簡述", + "type": "string", + "xml": { + "name": "String" + } }, "Address": { "title": "String", - "description": "景點地址", - "type": "string" + "description": "店家地址", + "type": "string", + "xml": { + "name": "String" + } }, "ZipCode": { "title": "String", "description": "郵遞區號", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, - "TravelInfo": { + "Phone": { "title": "String", - "description": "交通資訊", - "type": "string" + "description": "預約電話", + "type": "string", + "xml": { + "name": "String" + } }, "OpenTime": { "title": "String", - "description": "開放時間", - "type": "string" + "description": "營業時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "WebsiteUrl": { + "title": "String", + "description": "店家網站網址", + "type": "string", + "xml": { + "name": "String" + } }, "Picture": { "title": "TourismPicture", - "description": "景點照片", + "description": "店家照片", "allOf": [ { "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" } - ] - }, - "MapUrl": { - "title": "String", - "description": "景點地圖/簡圖介紹網址", - "type": "string" + ], + "xml": { + "name": "TourismPicture" + } }, "Position": { "title": "PointType", - "description": "景點位置", + "description": "店家位置", "allOf": [ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] - }, - "Class1": { - "title": "String", - "description": "景點分類1", - "type": "string" - }, - "Class2": { - "title": "String", - "description": "景點分類2", - "type": "string" - }, - "Class3": { - "title": "String", - "description": "景點分類3", - "type": "string" + ], + "xml": { + "name": "PointType" + } }, - "Level": { + "Class": { "title": "String", - "description": "古蹟分級", - "type": "string" + "description": "店家分類", + "type": "string", + "xml": { + "name": "String" + } }, - "WebsiteUrl": { + "MapUrl": { "title": "String", - "description": "景點官方網站網址", - "type": "string" + "description": "店家地圖/簡圖介紹網址", + "type": "string", + "xml": { + "name": "String" + } }, "ParkingInfo": { "title": "String", - "description": "停車資訊", - "type": "string" - }, - "ParkingPosition": { - "title": "PointType", - "description": "景點主要停車場位置", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" - } - ] - }, - "TicketInfo": { - "title": "String", - "description": "票價資訊", - "type": "string" - }, - "Remarks": { - "title": "String", - "description": "警告及注意事項", - "type": "string" - }, - "Keyword": { - "title": "String", - "description": "常用搜尋關鍵字", - "type": "string" - }, - "City": { - "title": "String", - "description": "所屬縣市", - "type": "string" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateTime": { - "title": "DateTime", - "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.ServiceDay": { - "title": "ServiceDay", - "description": "週內營運日資料", - "required": [ - "Friday", - "Monday", - "Saturday", - "Sunday", - "Thursday", - "Tuesday", - "Wednesday" - ], - "type": "object", - "properties": { - "Sunday": { - "format": "int32", - "title": "integer", - "description": "星期日是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "Monday": { - "format": "int32", - "title": "integer", - "description": "星期一是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "Tuesday": { - "format": "int32", - "title": "integer", - "description": "星期二是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "Wednesday": { - "format": "int32", - "title": "integer", - "description": "星期三是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "Thursday": { - "format": "int32", - "title": "integer", - "description": "星期四是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "Friday": { - "format": "int32", - "title": "integer", - "description": "星期五是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "Saturday": { - "format": "int32", - "title": "integer", - "description": "星期六是否營運 : [0:'否',1:'是']", - "type": "integer" - }, - "NationalHolidays": { - "format": "int32", - "title": "integer", - "description": "國定假日是否營運 : [0:'否',1:'是']", - "type": "integer" - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.DatePeriod": { - "title": "DatePeriod", - "type": "object", - "properties": { - "StartDate": { - "title": "String", - "description": "營運起始日(格式: yyyy-MM-dd)", - "type": "string" - }, - "EndDate": { - "title": "String", - "description": "營運結束日(格式: yyyy-MM-dd)", - "type": "string" - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.SpecialDay": { - "title": "SpecialDay", - "description": "特殊營運日資料", - "type": "object", - "properties": { - "Dates": { - "title": "Array", - "description": "不連續特殊日期", - "type": "array", - "items": { - "title": "String", - "type": "string" + "description": "停車資訊", + "type": "string", + "xml": { + "name": "String" } }, - "DatePeriod": { - "title": "DatePeriod", - "description": "連續特殊日期", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.DatePeriod" - } - ] + "City": { + "title": "String", + "description": "所屬縣市", + "type": "string", + "xml": { + "name": "String" + } }, - "ServiceStatus": { - "format": "int32", - "title": "integer", - "description": "營運服務狀態代碼 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運']", - "type": "integer" + "SrcUpdateTime": { + "format": "date-time", + "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" }, - "Description": { - "title": "String", - "description": "特殊營運描述", + "UpdateTime": { + "format": "date-time", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "RestaurantTourismInfo" } }, - "PTX.Service.DTO.Tourism.Specification.V2.BusStopTime": { - "title": "BusStopTime", - "description": "公車停靠時間資料", + "PTX.Service.DTO.Tourism.Specification.V2.RouteOperator": { + "title": "RouteOperator", + "description": "營運業者資訊", "required": [ - "ArrivalTime", - "DepartureTime", - "StopID", - "StopName", - "StopSequence", - "StopUID" + "OperatorCode", + "OperatorID", + "OperatorName", + "OperatorNo" ], "type": "object", "properties": { - "StopSequence": { - "format": "int32", - "title": "Int32", - "description": "路線經過站牌之順序(由1開始)", - "type": "integer" - }, - "StopUID": { - "title": "String", - "description": "站牌唯一識別代碼,規則為 {業管機關代碼} + {StopID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" - }, - "StopID": { + "OperatorID": { "title": "String", - "description": "地區既用中之站牌代碼(為原資料內碼)", - "type": "string" + "description": "營運業者代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "StopName": { + "OperatorName": { "title": "NameType", - "description": "站牌名稱", + "description": "營運業者名稱", "allOf": [ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, - "ArrivalTime": { + "OperatorCode": { "title": "String", - "description": "到站時間,格式為:HH:mm", - "type": "string" + "description": "營運業者簡碼", + "type": "string", + "xml": { + "name": "String" + } }, - "DepartureTime": { + "OperatorNo": { "title": "String", - "description": "離站時間,格式為:HH:mm", - "type": "string" + "description": "營運業者編號[交通部票證資料系統定義]", + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "RouteOperator" } }, - "PTX.Service.DTO.Tourism.Specification.V2.BusTimetable": { - "title": "BusTimetable", - "description": "班次資料", + "PTX.Service.DTO.Tourism.Specification.V2.ScenicSpotTourismInfo": { + "title": "ScenicSpotTourismInfo", + "description": "取得觀光景點資料", "required": [ - "StopTimes" + "ID", + "SrcUpdateTime", + "UpdateTime" ], "type": "object", "properties": { - "TripID": { + "ID": { "title": "String", - "description": "班次代碼,為無意義之編碼", - "type": "string" + "description": "景點代碼", + "type": "string", + "xml": { + "name": "String" + } }, - "ServiceDay": { - "title": "ServiceDay", - "description": "週內營運日", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.ServiceDay" - } - ] + "Name": { + "title": "String", + "description": "景點名稱", + "type": "string", + "xml": { + "name": "String" + } }, - "SpecialDays": { - "title": "Array", - "description": "特殊營運日", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.SpecialDay" + "DescriptionDetail": { + "title": "String", + "description": "景點特色詳細說明", + "type": "string", + "xml": { + "name": "String" } }, - "StopTimes": { - "title": "Array", - "description": "公車停靠時間資料", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusStopTime" + "Description": { + "title": "String", + "description": "景點特色精簡說明", + "type": "string", + "xml": { + "name": "String" } - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.BusFrequency": { - "title": "BusFrequency", - "description": "發車班距資料", - "required": [ - "EndTime", - "MaxHeadwayMins", - "MinHeadwayMins", - "StartTime" - ], - "type": "object", - "properties": { - "StartTime": { + }, + "Phone": { "title": "String", - "description": "發車班距起始適用時間,格式為: HH:mm", - "type": "string" + "description": "景點服務電話", + "type": "string", + "xml": { + "name": "String" + } }, - "EndTime": { + "Address": { "title": "String", - "description": "發車班距結束適用時間,格式為: HH:mm", - "type": "string" + "description": "景點地址", + "type": "string", + "xml": { + "name": "String" + } }, - "MinHeadwayMins": { - "format": "int32", - "title": "Int32", - "description": "最小班距時間(分鐘)", - "type": "integer" + "ZipCode": { + "title": "String", + "description": "郵遞區號", + "type": "string", + "xml": { + "name": "String" + } }, - "MaxHeadwayMins": { - "format": "int32", - "title": "Int32", - "description": "最大班距時間(分鐘)", - "type": "integer" + "TravelInfo": { + "title": "String", + "description": "交通資訊", + "type": "string", + "xml": { + "name": "String" + } }, - "ServiceDay": { - "title": "ServiceDay", - "description": "週內營運日", + "OpenTime": { + "title": "String", + "description": "開放時間", + "type": "string", + "xml": { + "name": "String" + } + }, + "Picture": { + "title": "TourismPicture", + "description": "景點照片", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.ServiceDay" + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.TourismPicture" } - ] - }, - "SpecialDays": { - "title": "Array", - "description": "特殊營運日", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.SpecialDay" + ], + "xml": { + "name": "TourismPicture" } - } - } - }, - "PTX.Service.DTO.Tourism.Specification.V2.BusSchedule": { - "title": "BusSchedule", - "required": [ - "Direction", - "RouteID", - "RouteUID", - "SubRouteID", - "SubRouteName", - "SubRouteUID", - "TaiwanTripName", - "UpdateTime" - ], - "type": "object", - "properties": { - "RouteUID": { - "title": "String", - "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" }, - "RouteID": { + "MapUrl": { "title": "String", - "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" + "description": "景點地圖/簡圖介紹網址", + "type": "string", + "xml": { + "name": "String" + } }, - "TaiwanTripName": { - "title": "NameType", - "description": "台灣好行路線名稱", + "Position": { + "title": "PointType", + "description": "景點位置", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, - "SubRouteUID": { + "Class1": { "title": "String", - "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "description": "景點分類1", + "type": "string", + "xml": { + "name": "String" + } }, - "SubRouteID": { + "Class2": { "title": "String", - "description": "地區既用中之子路線代碼(為原資料內碼)", - "type": "string" + "description": "景點分類2", + "type": "string", + "xml": { + "name": "String" + } }, - "SubRouteName": { - "title": "NameType", - "description": "子路線名稱", + "Class3": { + "title": "String", + "description": "景點分類3", + "type": "string", + "xml": { + "name": "String" + } + }, + "Level": { + "title": "String", + "description": "古蹟分級", + "type": "string", + "xml": { + "name": "String" + } + }, + "WebsiteUrl": { + "title": "String", + "description": "景點官方網站網址", + "type": "string", + "xml": { + "name": "String" + } + }, + "ParkingInfo": { + "title": "String", + "description": "停車資訊", + "type": "string", + "xml": { + "name": "String" + } + }, + "ParkingPosition": { + "title": "PointType", + "description": "景點主要停車場位置", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, - "Direction": { - "format": "int32", - "title": "integer", - "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer" + "TicketInfo": { + "title": "String", + "description": "票價資訊", + "type": "string", + "xml": { + "name": "String" + } }, - "Timetables": { - "title": "Array", - "description": "預定班表", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusTimetable" + "Remarks": { + "title": "String", + "description": "警告及注意事項", + "type": "string", + "xml": { + "name": "String" } }, - "Frequencys": { - "title": "Array", - "description": "發車班距", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.BusFrequency" + "Keyword": { + "title": "String", + "description": "常用搜尋關鍵字", + "type": "string", + "xml": { + "name": "String" + } + }, + "City": { + "title": "String", + "description": "所屬縣市", + "type": "string", + "xml": { + "name": "String" } }, + "SrcUpdateTime": { + "format": "date-time", + "title": "DateTime", + "description": "觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "type": "string" + }, "UpdateTime": { + "format": "date-time", "title": "DateTime", - "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", + "description": "本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", "type": "string" } + }, + "xml": { + "name": "ScenicSpotTourismInfo" } }, - "PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripShape": { - "title": "BusTaiwanTripShape", - "description": "台灣好行線型資料", + "PTX.Service.DTO.Tourism.Specification.V2.ServiceDay": { + "title": "ServiceDay", + "description": "週內營運日資料", "required": [ - "Direction", - "Geometry", - "RouteID", - "RouteUID", - "SrcUpdateTime", - "UpdateTime" + "Friday", + "Monday", + "Saturday", + "Sunday", + "Thursday", + "Tuesday", + "Wednesday" ], "type": "object", "properties": { - "RouteUID": { - "title": "String", - "description": "路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "Sunday": { + "title": "Int32", + "description": "星期日是否營運 : [0:'否',1:'是']", + "type": "integer" }, - "RouteID": { - "title": "String", - "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" + "Monday": { + "title": "Int32", + "description": "星期一是否營運 : [0:'否',1:'是']", + "type": "integer" }, - "TaiwanTripName": { - "title": "NameType", - "description": "台灣好行路線名稱", + "Tuesday": { + "title": "Int32", + "description": "星期二是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Wednesday": { + "title": "Int32", + "description": "星期三是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Thursday": { + "title": "Int32", + "description": "星期四是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Friday": { + "title": "Int32", + "description": "星期五是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "Saturday": { + "title": "Int32", + "description": "星期六是否營運 : [0:'否',1:'是']", + "type": "integer" + }, + "NationalHolidays": { + "title": "Int32", + "description": "國定假日是否營運 : [0:'否',1:'是']", + "type": "integer" + } + }, + "xml": { + "name": "ServiceDay" + } + }, + "PTX.Service.DTO.Tourism.Specification.V2.SpecialDay": { + "title": "SpecialDay", + "description": "特殊營運日資料", + "type": "object", + "properties": { + "Dates": { + "title": "Array", + "description": "不連續特殊日期", + "type": "array", + "items": { + "title": "String", + "type": "string", + "xml": { + "name": "String" + } + }, + "xml": { + "name": "List`1" + } + }, + "DatePeriod": { + "title": "DatePeriod", + "description": "連續特殊日期", "allOf": [ { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" + "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.DatePeriod" } - ] + ], + "xml": { + "name": "DatePeriod" + } }, - "Direction": { - "format": "int32", - "title": "integer", - "description": "去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", + "ServiceStatus": { + "title": "Int32", + "description": "營運服務狀態代碼 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運']", "type": "integer" }, - "Geometry": { + "Description": { "title": "String", - "description": "well-known text,為路線軌跡資料", - "type": "string" - }, - "SrcUpdateTime": { - "title": "DateTime", - "description": "來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" - }, - "UpdateTime": { - "title": "DateTime", - "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "description": "特殊營運描述", + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "SpecialDay" } }, "PTX.Service.DTO.Tourism.Specification.V2.Stop": { @@ -3867,12 +4569,18 @@ "StopUID": { "title": "String", "description": "站牌唯一識別代碼,規則為 {業管機關簡碼} + {StopID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StopID": { "title": "String", "description": "地區既用中之站牌代碼(為原資料內碼)", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StopName": { "title": "NameType", @@ -3881,11 +4589,13 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" } - ] + ], + "xml": { + "name": "NameType" + } }, "StopBoarding": { - "format": "int32", - "title": "integer", + "title": "Int32", "description": "上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車']", "type": "integer" }, @@ -3902,104 +4612,96 @@ { "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.PointType" } - ] + ], + "xml": { + "name": "PointType" + } }, "StationID": { "title": "String", "description": "站牌所屬的站位ID", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "StationGroupID": { "title": "String", "description": "站牌所屬的組站位ID", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } }, "LocationCityCode": { "title": "String", "description": "站牌位置縣市之代碼(國際ISO 3166-2 三碼城市代碼)[若為公路/國道客運路線則為空值]", - "type": "string" + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "Stop" } }, - "PTX.Service.DTO.Tourism.Specification.V2.BusStopOfRoute": { - "title": "BusStopOfRoute", - "description": "路線與站牌對應資料", - "required": [ - "Direction", - "KeyPattern", - "RouteID", - "RouteUID", - "Stops", - "SubRouteID", - "SubRouteName", - "SubRouteUID", - "TaiwanTripName", - "UpdateTime" - ], + "PTX.Service.DTO.Tourism.Specification.V2.TourismPicture": { + "title": "TourismPicture", + "description": "觀光照片資料型別", "type": "object", "properties": { - "RouteUID": { + "PictureUrl1": { "title": "String", - "description": "路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "description": "照片連結網址1", + "type": "string", + "xml": { + "name": "String" + } }, - "RouteID": { + "PictureDescription1": { "title": "String", - "description": "地區既用中之路線代碼(為原資料內碼)", - "type": "string" - }, - "TaiwanTripName": { - "title": "NameType", - "description": "台灣好行路線名稱", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" - } - ] - }, - "KeyPattern": { - "title": "Boolean", - "description": "是否為主路線", - "type": "boolean" + "description": "照片說明1", + "type": "string", + "xml": { + "name": "String" + } }, - "SubRouteUID": { + "PictureUrl2": { "title": "String", - "description": "子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢", - "type": "string" + "description": "照片連結網址2", + "type": "string", + "xml": { + "name": "String" + } }, - "SubRouteID": { + "PictureDescription2": { "title": "String", - "description": "地區既用中之子路線代碼(為原資料內碼)", - "type": "string" - }, - "SubRouteName": { - "title": "NameType", - "description": "子路線名稱", - "allOf": [ - { - "$ref": "#/definitions/PTX.Service.DTO.Shared.Specification.V2.Base.NameType" - } - ] - }, - "Direction": { - "format": "int32", - "title": "integer", - "description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer" + "description": "照片說明2", + "type": "string", + "xml": { + "name": "String" + } }, - "Stops": { - "title": "Array", - "description": "所有經過站牌", - "type": "array", - "items": { - "$ref": "#/definitions/PTX.Service.DTO.Tourism.Specification.V2.Stop" + "PictureUrl3": { + "title": "String", + "description": "照片連結網址3", + "type": "string", + "xml": { + "name": "String" } }, - "UpdateTime": { - "title": "DateTime", - "description": "資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz)", - "type": "string" + "PictureDescription3": { + "title": "String", + "description": "照片說明3", + "type": "string", + "xml": { + "name": "String" + } } + }, + "xml": { + "name": "TourismPicture" } } }, diff --git a/rail/v2/client/metro/metro_api_station_exit_parameters.go b/rail/v2/client/metro/metro_api_station_exit_parameters.go index 1a281cf8..5a8175be 100644 --- a/rail/v2/client/metro/metro_api_station_exit_parameters.go +++ b/rail/v2/client/metro/metro_api_station_exit_parameters.go @@ -92,7 +92,7 @@ type MetroAPIStationExitParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/rail/v2/client/metro/metro_api_station_parameters.go b/rail/v2/client/metro/metro_api_station_parameters.go index e9a268e4..39105a34 100644 --- a/rail/v2/client/metro/metro_api_station_parameters.go +++ b/rail/v2/client/metro/metro_api_station_parameters.go @@ -92,7 +92,7 @@ type MetroAPIStationParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go index 8da56d4f..a4695036 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status1_parameters.go @@ -107,8 +107,10 @@ type THSRAPIAvailableSeatStatus1Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -252,13 +254,13 @@ func (o *THSRAPIAvailableSeatStatus1Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t h s r Api available seat status 1 params -func (o *THSRAPIAvailableSeatStatus1Params) WithTrainDate(trainDate string) *THSRAPIAvailableSeatStatus1Params { +func (o *THSRAPIAvailableSeatStatus1Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIAvailableSeatStatus1Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api available seat status 1 params -func (o *THSRAPIAvailableSeatStatus1Params) SetTrainDate(trainDate string) { +func (o *THSRAPIAvailableSeatStatus1Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -383,7 +385,7 @@ func (o *THSRAPIAvailableSeatStatus1Params) WriteToRequest(r runtime.ClientReque } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d1_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d1_parameters.go index f73c84e5..344ac823 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d1_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d1_parameters.go @@ -119,8 +119,10 @@ type THSRAPIAvailableSeatStatusOD1Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -286,13 +288,13 @@ func (o *THSRAPIAvailableSeatStatusOD1Params) SetOriginStationID(originStationID } // WithTrainDate adds the trainDate to the t h s r Api available seat status o d 1 params -func (o *THSRAPIAvailableSeatStatusOD1Params) WithTrainDate(trainDate string) *THSRAPIAvailableSeatStatusOD1Params { +func (o *THSRAPIAvailableSeatStatusOD1Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIAvailableSeatStatusOD1Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api available seat status o d 1 params -func (o *THSRAPIAvailableSeatStatusOD1Params) SetTrainDate(trainDate string) { +func (o *THSRAPIAvailableSeatStatusOD1Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -427,7 +429,7 @@ func (o *THSRAPIAvailableSeatStatusOD1Params) WriteToRequest(r runtime.ClientReq } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d2_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d2_parameters.go index 8625fce4..101e4820 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d2_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d2_parameters.go @@ -119,8 +119,10 @@ type THSRAPIAvailableSeatStatusOD2Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime /* TrainNo. @@ -292,13 +294,13 @@ func (o *THSRAPIAvailableSeatStatusOD2Params) SetOriginStationID(originStationID } // WithTrainDate adds the trainDate to the t h s r Api available seat status o d 2 params -func (o *THSRAPIAvailableSeatStatusOD2Params) WithTrainDate(trainDate string) *THSRAPIAvailableSeatStatusOD2Params { +func (o *THSRAPIAvailableSeatStatusOD2Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIAvailableSeatStatusOD2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api available seat status o d 2 params -func (o *THSRAPIAvailableSeatStatusOD2Params) SetTrainDate(trainDate string) { +func (o *THSRAPIAvailableSeatStatusOD2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -444,7 +446,7 @@ func (o *THSRAPIAvailableSeatStatusOD2Params) WriteToRequest(r runtime.ClientReq } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d_parameters.go index d79e0669..a1245a32 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_available_seat_status_o_d_parameters.go @@ -107,8 +107,10 @@ type THSRAPIAvailableSeatStatusODParams struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -252,13 +254,13 @@ func (o *THSRAPIAvailableSeatStatusODParams) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t h s r Api available seat status o d params -func (o *THSRAPIAvailableSeatStatusODParams) WithTrainDate(trainDate string) *THSRAPIAvailableSeatStatusODParams { +func (o *THSRAPIAvailableSeatStatusODParams) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIAvailableSeatStatusODParams { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api available seat status o d params -func (o *THSRAPIAvailableSeatStatusODParams) SetTrainDate(trainDate string) { +func (o *THSRAPIAvailableSeatStatusODParams) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -383,7 +385,7 @@ func (o *THSRAPIAvailableSeatStatusODParams) WriteToRequest(r runtime.ClientRequ } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_parameters.go index 1ea4ba2f..0404ae47 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable2_parameters.go @@ -101,8 +101,10 @@ type THSRAPIDailyTimetable2Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -235,13 +237,13 @@ func (o *THSRAPIDailyTimetable2Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t h s r Api daily timetable 2 params -func (o *THSRAPIDailyTimetable2Params) WithTrainDate(trainDate string) *THSRAPIDailyTimetable2Params { +func (o *THSRAPIDailyTimetable2Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIDailyTimetable2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api daily timetable 2 params -func (o *THSRAPIDailyTimetable2Params) SetTrainDate(trainDate string) { +func (o *THSRAPIDailyTimetable2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -349,7 +351,7 @@ func (o *THSRAPIDailyTimetable2Params) WriteToRequest(r runtime.ClientRequest, r } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_parameters.go index 94242494..e65f7168 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_timetable3_parameters.go @@ -101,8 +101,10 @@ type THSRAPIDailyTimetable3Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime /* TrainNo. @@ -241,13 +243,13 @@ func (o *THSRAPIDailyTimetable3Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t h s r Api daily timetable 3 params -func (o *THSRAPIDailyTimetable3Params) WithTrainDate(trainDate string) *THSRAPIDailyTimetable3Params { +func (o *THSRAPIDailyTimetable3Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIDailyTimetable3Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api daily timetable 3 params -func (o *THSRAPIDailyTimetable3Params) SetTrainDate(trainDate string) { +func (o *THSRAPIDailyTimetable3Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -366,7 +368,7 @@ func (o *THSRAPIDailyTimetable3Params) WriteToRequest(r runtime.ClientRequest, r } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_parameters.go index 33e35152..4903e7d8 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info2_parameters.go @@ -101,8 +101,10 @@ type THSRAPIDailyTrainInfo2Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -235,13 +237,13 @@ func (o *THSRAPIDailyTrainInfo2Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t h s r Api daily train info 2 params -func (o *THSRAPIDailyTrainInfo2Params) WithTrainDate(trainDate string) *THSRAPIDailyTrainInfo2Params { +func (o *THSRAPIDailyTrainInfo2Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIDailyTrainInfo2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api daily train info 2 params -func (o *THSRAPIDailyTrainInfo2Params) SetTrainDate(trainDate string) { +func (o *THSRAPIDailyTrainInfo2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -349,7 +351,7 @@ func (o *THSRAPIDailyTrainInfo2Params) WriteToRequest(r runtime.ClientRequest, r } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_parameters.go index 12956b78..098f3e0f 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_daily_train_info3_parameters.go @@ -101,8 +101,10 @@ type THSRAPIDailyTrainInfo3Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime /* TrainNo. @@ -241,13 +243,13 @@ func (o *THSRAPIDailyTrainInfo3Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t h s r Api daily train info 3 params -func (o *THSRAPIDailyTrainInfo3Params) WithTrainDate(trainDate string) *THSRAPIDailyTrainInfo3Params { +func (o *THSRAPIDailyTrainInfo3Params) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIDailyTrainInfo3Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api daily train info 3 params -func (o *THSRAPIDailyTrainInfo3Params) SetTrainDate(trainDate string) { +func (o *THSRAPIDailyTrainInfo3Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -366,7 +368,7 @@ func (o *THSRAPIDailyTrainInfo3Params) WriteToRequest(r runtime.ClientRequest, r } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_parameters.go index 04a0d437..60d09723 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_o_d_daily_timetable_parameters.go @@ -113,8 +113,10 @@ type THSRAPIODDailyTimetableParams struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -269,13 +271,13 @@ func (o *THSRAPIODDailyTimetableParams) SetOriginStationID(originStationID strin } // WithTrainDate adds the trainDate to the t h s r Api o d daily timetable params -func (o *THSRAPIODDailyTimetableParams) WithTrainDate(trainDate string) *THSRAPIODDailyTimetableParams { +func (o *THSRAPIODDailyTimetableParams) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIODDailyTimetableParams { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api o d daily timetable params -func (o *THSRAPIODDailyTimetableParams) SetTrainDate(trainDate string) { +func (o *THSRAPIODDailyTimetableParams) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -393,7 +395,7 @@ func (o *THSRAPIODDailyTimetableParams) WriteToRequest(r runtime.ClientRequest, } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_parameters.go index 6f77fe3c..b6a12bf6 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_exit_parameters.go @@ -92,7 +92,7 @@ type THSRAPIStationExitParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_parameters.go index c5529da7..d338cb44 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_parameters.go @@ -92,7 +92,7 @@ type THSRAPIStationParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_parameters.go b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_parameters.go index cf1822e7..e6b44f96 100644 --- a/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_parameters.go +++ b/rail/v2/client/t_h_s_r/t_h_s_r_api_station_timetable_parameters.go @@ -102,7 +102,9 @@ type THSRAPIStationTimetableParams struct { StationID string // TrainDate. - TrainDate string + // + // Format: date-time + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -246,13 +248,13 @@ func (o *THSRAPIStationTimetableParams) SetStationID(stationID string) { } // WithTrainDate adds the trainDate to the t h s r Api station timetable params -func (o *THSRAPIStationTimetableParams) WithTrainDate(trainDate string) *THSRAPIStationTimetableParams { +func (o *THSRAPIStationTimetableParams) WithTrainDate(trainDate strfmt.DateTime) *THSRAPIStationTimetableParams { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t h s r Api station timetable params -func (o *THSRAPIStationTimetableParams) SetTrainDate(trainDate string) { +func (o *THSRAPIStationTimetableParams) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -365,7 +367,7 @@ func (o *THSRAPIStationTimetableParams) WriteToRequest(r runtime.ClientRequest, } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_parameters.go index bcd22594..ad653fb4 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable2_parameters.go @@ -101,8 +101,10 @@ type TRAAPIDailyTimetable2Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -235,13 +237,13 @@ func (o *TRAAPIDailyTimetable2Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t r a Api daily timetable 2 params -func (o *TRAAPIDailyTimetable2Params) WithTrainDate(trainDate string) *TRAAPIDailyTimetable2Params { +func (o *TRAAPIDailyTimetable2Params) WithTrainDate(trainDate strfmt.DateTime) *TRAAPIDailyTimetable2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t r a Api daily timetable 2 params -func (o *TRAAPIDailyTimetable2Params) SetTrainDate(trainDate string) { +func (o *TRAAPIDailyTimetable2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -349,7 +351,7 @@ func (o *TRAAPIDailyTimetable2Params) WriteToRequest(r runtime.ClientRequest, re } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_parameters.go index 98c085d2..3eb8d897 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_daily_timetable3_parameters.go @@ -101,8 +101,10 @@ type TRAAPIDailyTimetable3Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime /* TrainNo. @@ -241,13 +243,13 @@ func (o *TRAAPIDailyTimetable3Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t r a Api daily timetable 3 params -func (o *TRAAPIDailyTimetable3Params) WithTrainDate(trainDate string) *TRAAPIDailyTimetable3Params { +func (o *TRAAPIDailyTimetable3Params) WithTrainDate(trainDate strfmt.DateTime) *TRAAPIDailyTimetable3Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t r a Api daily timetable 3 params -func (o *TRAAPIDailyTimetable3Params) SetTrainDate(trainDate string) { +func (o *TRAAPIDailyTimetable3Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -366,7 +368,7 @@ func (o *TRAAPIDailyTimetable3Params) WriteToRequest(r runtime.ClientRequest, re } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_parameters.go index e69c860c..e08fd533 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info2_parameters.go @@ -101,8 +101,10 @@ type TRAAPIDailyTrainInfo2Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -235,13 +237,13 @@ func (o *TRAAPIDailyTrainInfo2Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t r a Api daily train info 2 params -func (o *TRAAPIDailyTrainInfo2Params) WithTrainDate(trainDate string) *TRAAPIDailyTrainInfo2Params { +func (o *TRAAPIDailyTrainInfo2Params) WithTrainDate(trainDate strfmt.DateTime) *TRAAPIDailyTrainInfo2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t r a Api daily train info 2 params -func (o *TRAAPIDailyTrainInfo2Params) SetTrainDate(trainDate string) { +func (o *TRAAPIDailyTrainInfo2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -349,7 +351,7 @@ func (o *TRAAPIDailyTrainInfo2Params) WriteToRequest(r runtime.ClientRequest, re } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_parameters.go index 7376d0f5..a728980c 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_daily_train_info3_parameters.go @@ -101,8 +101,10 @@ type TRAAPIDailyTrainInfo3Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime /* TrainNo. @@ -241,13 +243,13 @@ func (o *TRAAPIDailyTrainInfo3Params) SetDollarTop(dollarTop *int64) { } // WithTrainDate adds the trainDate to the t r a Api daily train info 3 params -func (o *TRAAPIDailyTrainInfo3Params) WithTrainDate(trainDate string) *TRAAPIDailyTrainInfo3Params { +func (o *TRAAPIDailyTrainInfo3Params) WithTrainDate(trainDate strfmt.DateTime) *TRAAPIDailyTrainInfo3Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t r a Api daily train info 3 params -func (o *TRAAPIDailyTrainInfo3Params) SetTrainDate(trainDate string) { +func (o *TRAAPIDailyTrainInfo3Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -366,7 +368,7 @@ func (o *TRAAPIDailyTrainInfo3Params) WriteToRequest(r runtime.ClientRequest, re } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_parameters.go index dd5ab103..68000f8a 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_o_d_daily_timetable_parameters.go @@ -113,8 +113,10 @@ type TRAAPIODDailyTimetableParams struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -269,13 +271,13 @@ func (o *TRAAPIODDailyTimetableParams) SetOriginStationID(originStationID string } // WithTrainDate adds the trainDate to the t r a Api o d daily timetable params -func (o *TRAAPIODDailyTimetableParams) WithTrainDate(trainDate string) *TRAAPIODDailyTimetableParams { +func (o *TRAAPIODDailyTimetableParams) WithTrainDate(trainDate strfmt.DateTime) *TRAAPIODDailyTimetableParams { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t r a Api o d daily timetable params -func (o *TRAAPIODDailyTimetableParams) SetTrainDate(trainDate string) { +func (o *TRAAPIODDailyTimetableParams) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -393,7 +395,7 @@ func (o *TRAAPIODDailyTimetableParams) WriteToRequest(r runtime.ClientRequest, r } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/client/t_r_a/t_r_a_api_station_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_station_parameters.go index a0e36df7..d6e5a8db 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_station_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_station_parameters.go @@ -92,7 +92,7 @@ type TRAAPIStationParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/rail/v2/client/t_r_a/t_r_a_api_station_timetable_parameters.go b/rail/v2/client/t_r_a/t_r_a_api_station_timetable_parameters.go index a79f36d1..5be6f1b9 100644 --- a/rail/v2/client/t_r_a/t_r_a_api_station_timetable_parameters.go +++ b/rail/v2/client/t_r_a/t_r_a_api_station_timetable_parameters.go @@ -107,8 +107,10 @@ type TRAAPIStationTimetableParams struct { /* TrainDate. 時刻表日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -252,13 +254,13 @@ func (o *TRAAPIStationTimetableParams) SetStationID(stationID string) { } // WithTrainDate adds the trainDate to the t r a Api station timetable params -func (o *TRAAPIStationTimetableParams) WithTrainDate(trainDate string) *TRAAPIStationTimetableParams { +func (o *TRAAPIStationTimetableParams) WithTrainDate(trainDate strfmt.DateTime) *TRAAPIStationTimetableParams { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the t r a Api station timetable params -func (o *TRAAPIStationTimetableParams) SetTrainDate(trainDate string) { +func (o *TRAAPIStationTimetableParams) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -371,7 +373,7 @@ func (o *TRAAPIStationTimetableParams) WriteToRequest(r runtime.ClientRequest, r } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go b/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go index 9503a510..981fb757 100644 --- a/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go +++ b/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go @@ -45,7 +45,8 @@ type PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroAlert // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroAlert // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model m r t real time wrapper p t x service d t o rail specification v2 metro alert @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroA return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroA return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go b/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go index ac2f3821..64e9dcfa 100644 --- a/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go +++ b/rail/v2/models/p_t_x_api_rail_model_m_r_t_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go @@ -45,7 +45,8 @@ type PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroMRTNe // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroMRTNe // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model m r t real time wrapper p t x service d t o rail specification v2 metro m r t news list news @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroM return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelMRTRealTimeWrapperPTXServiceDTORailSpecificationV2MetroM return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_old_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go b/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_old_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go index e5ca3511..ab0636f9 100644 --- a/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_old_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go +++ b/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_old_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go @@ -29,10 +29,9 @@ type PTXAPIRailModelV2THSRAvailableSeatStatusOldWrapperPTXServiceDTORailSpecific // 資料總筆數 Count int64 `json:"Count,omitempty"` - // DateTime - // // 更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - UpdateTime string `json:"UpdateTime,omitempty"` + // Format: date-time + UpdateTime strfmt.DateTime `json:"UpdateTime,omitempty"` } // Validate validates this p t x API rail model v2 t h s r available seat status old wrapper p t x service d t o rail specification v2 t h s r old available seat @@ -43,6 +42,10 @@ func (m *PTXAPIRailModelV2THSRAvailableSeatStatusOldWrapperPTXServiceDTORailSpec res = append(res, err) } + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -74,6 +77,18 @@ func (m *PTXAPIRailModelV2THSRAvailableSeatStatusOldWrapperPTXServiceDTORailSpec return nil } +func (m *PTXAPIRailModelV2THSRAvailableSeatStatusOldWrapperPTXServiceDTORailSpecificationV2THSROldAvailableSeat) validateUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.UpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + // ContextValidate validate this p t x API rail model v2 t h s r available seat status old wrapper p t x service d t o rail specification v2 t h s r old available seat based on the context it is used func (m *PTXAPIRailModelV2THSRAvailableSeatStatusOldWrapperPTXServiceDTORailSpecificationV2THSROldAvailableSeat) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go b/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go index 29010e31..a8d6a857 100644 --- a/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go +++ b/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go @@ -29,20 +29,18 @@ type PTXAPIRailModelV2THSRAvailableSeatStatusWrapperPTXServiceDTORailSpecificati // 資料總筆數 Count int64 `json:"Count,omitempty"` - // DateTime - // // 來源平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // // 營運日說明(格式: yyyy-MM-dd) TrainDate string `json:"TrainDate,omitempty" xml:"String,omitempty"` - // DateTime - // // PTX平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - UpdateTime string `json:"UpdateTime,omitempty"` + // Format: date-time + UpdateTime strfmt.DateTime `json:"UpdateTime,omitempty"` } // Validate validates this p t x API rail model v2 t h s r available seat status wrapper p t x service d t o rail specification v2 t h s r available seat @@ -53,6 +51,14 @@ func (m *PTXAPIRailModelV2THSRAvailableSeatStatusWrapperPTXServiceDTORailSpecifi res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -84,6 +90,30 @@ func (m *PTXAPIRailModelV2THSRAvailableSeatStatusWrapperPTXServiceDTORailSpecifi return nil } +func (m *PTXAPIRailModelV2THSRAvailableSeatStatusWrapperPTXServiceDTORailSpecificationV2THSRAvailableSeat) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelV2THSRAvailableSeatStatusWrapperPTXServiceDTORailSpecificationV2THSRAvailableSeat) validateUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.UpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + // ContextValidate validate this p t x API rail model v2 t h s r available seat status wrapper p t x service d t o rail specification v2 t h s r available seat based on the context it is used func (m *PTXAPIRailModelV2THSRAvailableSeatStatusWrapperPTXServiceDTORailSpecificationV2THSRAvailableSeat) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_o_d_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_o_d_available_seat.go b/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_o_d_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_o_d_available_seat.go index 87062ff0..952f80d8 100644 --- a/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_o_d_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_o_d_available_seat.go +++ b/rail/v2/models/p_t_x_api_rail_model_v2_t_h_s_r_o_d_available_seat_status_wrapper_p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_o_d_available_seat.go @@ -34,10 +34,9 @@ type PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpecifica // 來源平台更新週期(秒) SrcUpdateInterval int32 `json:"SrcUpdateInterval,omitempty"` - // DateTime - // // 來源平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // @@ -49,10 +48,9 @@ type PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpecifica // PTX平台更新調期(秒) UpdateInterval int32 `json:"UpdateInterval,omitempty"` - // DateTime - // // PTX平台更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - UpdateTime string `json:"UpdateTime,omitempty"` + // Format: date-time + UpdateTime strfmt.DateTime `json:"UpdateTime,omitempty"` } // Validate validates this p t x API rail model v2 t h s r o d available seat status wrapper p t x service d t o rail specification v2 t h s r o d available seat @@ -63,6 +61,14 @@ func (m *PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpeci res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -94,6 +100,30 @@ func (m *PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpeci return nil } +func (m *PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpecificationV2THSRODAvailableSeat) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpecificationV2THSRODAvailableSeat) validateUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.UpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + // ContextValidate validate this p t x API rail model v2 t h s r o d available seat status wrapper p t x service d t o rail specification v2 t h s r o d available seat based on the context it is used func (m *PTXAPIRailModelV2THSRODAvailableSeatStatusWrapperPTXServiceDTORailSpecificationV2THSRODAvailableSeat) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go index 61f32035..eaffe3a9 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_alert.go @@ -36,30 +36,28 @@ type PTXServiceDTORailSpecificationV2MetroAlert struct { // Required: true Description *string `json:"Description" xml:"String"` - // integer + // Int32 // // 影響方向 : [0:'去程',1:'返程'] - Direction string `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` // String // // 影響說明 Effect string `json:"Effect,omitempty" xml:"String,omitempty"` - // DateTime - // // 訊息結束日期時間 - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` - // integer + // Int32 // // 影響等級程度 : [1:'重度',2:'中度',3:'輕度'] - Level string `json:"Level,omitempty"` + Level int64 `json:"Level,omitempty"` - // DateTime - // // 消息發佈日期時間 - PublishTime string `json:"PublishTime,omitempty"` + // Format: date-time + PublishTime strfmt.DateTime `json:"PublishTime,omitempty"` // String // @@ -74,16 +72,15 @@ type PTXServiceDTORailSpecificationV2MetroAlert struct { PTXServiceDTORailSpecificationV2MetroMRTAlertListAlertScope } `json:"Scope" xml:"AlertScope"` - // DateTime - // // 訊息起始日期時間 - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` - // integer + // Int32 // // 營運狀況 : [0:'全線營運停止',1:'全線營運正常',2:'有異常狀況'] // Required: true - Status *string `json:"Status"` + Status *int64 `json:"Status"` // String // @@ -95,7 +92,8 @@ type PTXServiceDTORailSpecificationV2MetroAlert struct { // // 消息更新日期時間 // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 metro alert @@ -110,10 +108,22 @@ func (m *PTXServiceDTORailSpecificationV2MetroAlert) Validate(formats strfmt.Reg res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateScope(formats); err != nil { res = append(res, err) } + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStatus(formats); err != nil { res = append(res, err) } @@ -150,11 +160,47 @@ func (m *PTXServiceDTORailSpecificationV2MetroAlert) validateDescription(formats return nil } +func (m *PTXServiceDTORailSpecificationV2MetroAlert) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV2MetroAlert) validatePublishTime(formats strfmt.Registry) error { + if swag.IsZero(m.PublishTime) { // not required + return nil + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2MetroAlert) validateScope(formats strfmt.Registry) error { return nil } +func (m *PTXServiceDTORailSpecificationV2MetroAlert) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2MetroAlert) validateStatus(formats strfmt.Registry) error { if err := validate.Required("Status", "body", m.Status); err != nil { @@ -179,6 +225,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroAlert) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_first_last_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_first_last_timetable.go index d0113f81..37f2b784 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_first_last_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_first_last_timetable.go @@ -70,7 +70,8 @@ type PTXServiceDTORailSpecificationV2MetroFirstLastTimetable struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -98,7 +99,8 @@ type PTXServiceDTORailSpecificationV2MetroFirstLastTimetable struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -213,6 +215,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroFirstLastTimetable) validateSrcUpd return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -236,6 +242,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroFirstLastTimetable) validateUpdate return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_frequency.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_frequency.go index ec4b4629..c35dd11e 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_frequency.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_frequency.go @@ -65,7 +65,8 @@ type PTXServiceDTORailSpecificationV2MetroFrequency struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // 車種(0:不分車種, 1:普通車, 2:直達車) TrainType int32 `json:"TrainType,omitempty"` @@ -74,7 +75,8 @@ type PTXServiceDTORailSpecificationV2MetroFrequency struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -184,6 +186,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroFrequency) validateSrcUpdateTime(f return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -193,6 +199,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroFrequency) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line.go index 2b67dbbf..7bfe4e54 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line.go @@ -64,13 +64,15 @@ type PTXServiceDTORailSpecificationV2MetroLine struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -164,6 +166,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroLine) validateSrcUpdateTime(format return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -173,6 +179,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroLine) validateUpdateTime(formats s return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line_transfer.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line_transfer.go index 51424a99..0934bc24 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line_transfer.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_line_transfer.go @@ -54,16 +54,17 @@ type PTXServiceDTORailSpecificationV2MetroLineTransfer struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"FromStationName" xml:"NameType"` - // integer + // Int32 // // 是否為站內或站外轉乘 : [0:'站外',1:'站內'] - IsOnSiteTransfer string `json:"IsOnSiteTransfer,omitempty"` + IsOnSiteTransfer int64 `json:"IsOnSiteTransfer,omitempty"` // DateTime // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -115,7 +116,8 @@ type PTXServiceDTORailSpecificationV2MetroLineTransfer struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -224,6 +226,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroLineTransfer) validateSrcUpdateTim return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -288,6 +294,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroLineTransfer) validateUpdateTime(f return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_live_board.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_live_board.go index f4735471..50a2ad4e 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_live_board.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_live_board.go @@ -70,7 +70,8 @@ type PTXServiceDTORailSpecificationV2MetroLiveBoard struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -96,7 +97,8 @@ type PTXServiceDTORailSpecificationV2MetroLiveBoard struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 metro live board @@ -205,6 +207,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroLiveBoard) validateSrcUpdateTime(f return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -237,6 +243,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroLiveBoard) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go index b67f2063..8304e3ab 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_m_r_t_news_list_news.go @@ -35,21 +35,20 @@ type PTXServiceDTORailSpecificationV2MetroMRTNewsListNews struct { // Required: true Description *string `json:"Description" xml:"String"` - // DateTime - // // 消息結束日期時間 - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` - // integer + // Int32 // // 語系 : [1:'Zh_tw',2:'En_us',3:'Zh_cn',4:'Ja',5:'Ko',99:'Other'] - Language string `json:"Language,omitempty"` + Language int64 `json:"Language,omitempty"` - // integer + // Int32 // // 消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'新服務上架',8:'API修正',9:'來源異常',99:'其他'] // Required: true - NewsCategory *string `json:"NewsCategory"` + NewsCategory *int64 `json:"NewsCategory"` // String // @@ -66,12 +65,12 @@ type PTXServiceDTORailSpecificationV2MetroMRTNewsListNews struct { // // 消息發佈日期時間 // Required: true - PublishTime *string `json:"PublishTime"` + // Format: date-time + PublishTime *strfmt.DateTime `json:"PublishTime"` - // DateTime - // // 消息起始日期時間 - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // @@ -83,7 +82,8 @@ type PTXServiceDTORailSpecificationV2MetroMRTNewsListNews struct { // // 本筆資料之更新日期時間 // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 metro m r t news list news @@ -94,6 +94,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) Validate(formats res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateNewsCategory(formats); err != nil { res = append(res, err) } @@ -106,6 +110,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) Validate(formats res = append(res, err) } + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateTitle(formats); err != nil { res = append(res, err) } @@ -129,6 +137,18 @@ func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) validateDescripti return nil } +func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) validateNewsCategory(formats strfmt.Registry) error { if err := validate.Required("NewsCategory", "body", m.NewsCategory); err != nil { @@ -153,6 +173,22 @@ func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) validatePublishTi return err } + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + return nil } @@ -171,6 +207,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroMRTNewsListNews) validateUpdateTim return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_metro_shape.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_metro_shape.go index 7f4ec859..943e313f 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_metro_shape.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_metro_shape.go @@ -56,7 +56,8 @@ type PTXServiceDTORailSpecificationV2MetroMetroShape struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 metro metro shape @@ -127,6 +128,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroMetroShape) validateUpdateTime(for return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_network.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_network.go index 23ed1c73..8cea00b0 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_network.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_network.go @@ -66,13 +66,15 @@ type PTXServiceDTORailSpecificationV2MetroNetwork struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -195,6 +197,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroNetwork) validateSrcUpdateTime(for return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -204,6 +210,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroNetwork) validateUpdateTime(format return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_o_d_fare.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_o_d_fare.go index f328b828..393f0d3d 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_o_d_fare.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_o_d_fare.go @@ -60,7 +60,8 @@ type PTXServiceDTORailSpecificationV2MetroODFare struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // 車種(0:不分車種, 1:普通車, 2:直達車) TrainType int32 `json:"TrainType,omitempty"` @@ -75,7 +76,8 @@ type PTXServiceDTORailSpecificationV2MetroODFare struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -185,6 +187,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroODFare) validateSrcUpdateTime(form return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -194,6 +200,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroODFare) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_route.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_route.go index 0e0fc7a4..32291c32 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_route.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_route.go @@ -82,7 +82,8 @@ type PTXServiceDTORailSpecificationV2MetroRoute struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -108,7 +109,8 @@ type PTXServiceDTORailSpecificationV2MetroRoute struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -253,6 +255,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroRoute) validateSrcUpdateTime(forma return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -285,6 +291,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroRoute) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_s2_s_travel_time.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_s2_s_travel_time.go index 7c774a9e..b790c6a7 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_s2_s_travel_time.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_s2_s_travel_time.go @@ -43,7 +43,8 @@ type PTXServiceDTORailSpecificationV2MetroS2STravelTime struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // 車種(0:不分車種, 1:普通車, 2:直達車) TrainType int32 `json:"TrainType,omitempty"` @@ -58,7 +59,8 @@ type PTXServiceDTORailSpecificationV2MetroS2STravelTime struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -125,6 +127,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroS2STravelTime) validateSrcUpdateTi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -159,6 +165,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroS2STravelTime) validateUpdateTime( return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station.go index 17621578..96d348ad 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station.go @@ -51,7 +51,8 @@ type PTXServiceDTORailSpecificationV2MetroStation struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -90,7 +91,8 @@ type PTXServiceDTORailSpecificationV2MetroStation struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -160,6 +162,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStation) validateSrcUpdateTime(for return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -209,6 +215,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStation) validateUpdateTime(format return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_exit.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_exit.go index cc4034a4..74e38246 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_exit.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_exit.go @@ -61,7 +61,8 @@ type PTXServiceDTORailSpecificationV2MetroStationExit struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // 是否有樓梯 // Required: true @@ -85,7 +86,8 @@ type PTXServiceDTORailSpecificationV2MetroStationExit struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -204,6 +206,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationExit) validateSrcUpdateTime return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -236,6 +242,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationExit) validateUpdateTime(fo return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_facility.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_facility.go index b3db4d6d..5df71b82 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_facility.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_facility.go @@ -44,7 +44,8 @@ type PTXServiceDTORailSpecificationV2MetroStationFacility struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -70,7 +71,8 @@ type PTXServiceDTORailSpecificationV2MetroStationFacility struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -206,6 +208,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationFacility) validateSrcUpdate return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -254,6 +260,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationFacility) validateUpdateTim return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_line.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_line.go index 48002c27..f2d28004 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_line.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_line.go @@ -37,7 +37,8 @@ type PTXServiceDTORailSpecificationV2MetroStationOfLine struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -49,7 +50,8 @@ type PTXServiceDTORailSpecificationV2MetroStationOfLine struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -103,6 +105,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationOfLine) validateSrcUpdateTi return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -137,6 +143,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationOfLine) validateUpdateTime( return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_route.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_route.go index f4cd302d..168e2c15 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_route.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_of_route.go @@ -57,7 +57,8 @@ type PTXServiceDTORailSpecificationV2MetroStationOfRoute struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -69,7 +70,8 @@ type PTXServiceDTORailSpecificationV2MetroStationOfRoute struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -158,6 +160,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationOfRoute) validateSrcUpdateT return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -192,6 +198,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationOfRoute) validateUpdateTime return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_time_table.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_time_table.go index d529b72e..60a07e4e 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_time_table.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_station_time_table.go @@ -36,10 +36,10 @@ type PTXServiceDTORailSpecificationV2MetroStationTimeTable struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"DestinationStationName" xml:"NameType"` - // integer + // Int32 // // 營運路線方向描述 : [0:'去程',1:'返程'] - Direction string `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` // String // @@ -69,7 +69,8 @@ type PTXServiceDTORailSpecificationV2MetroStationTimeTable struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -95,7 +96,8 @@ type PTXServiceDTORailSpecificationV2MetroStationTimeTable struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -216,6 +218,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationTimeTable) validateSrcUpdat return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -264,6 +270,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroStationTimeTable) validateUpdateTi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_sub_class_special_day.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_sub_class_special_day.go index d183c7af..1b082a70 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_sub_class_special_day.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_metro_sub_class_special_day.go @@ -31,13 +31,15 @@ type PTXServiceDTORailSpecificationV2MetroSubClassSpecialDay struct { // // 結束時間 // Required: true - EndDate *string `json:"EndDate"` + // Format: date-time + EndDate *strfmt.DateTime `json:"EndDate"` // DateTime // // 開始時間 // Required: true - SaterDate *string `json:"SaterDate"` + // Format: date-time + SaterDate *strfmt.DateTime `json:"SaterDate"` } // Validate validates this p t x service d t o rail specification v2 metro sub class special day @@ -77,6 +79,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroSubClassSpecialDay) validateEndDat return err } + if err := validate.FormatOf("EndDate", "body", "date-time", m.EndDate.String(), formats); err != nil { + return err + } + return nil } @@ -86,6 +92,10 @@ func (m *PTXServiceDTORailSpecificationV2MetroSubClassSpecialDay) validateSaterD return err } + if err := validate.FormatOf("SaterDate", "body", "date-time", m.SaterDate.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_alert_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_alert_info.go index b705d034..3a89f61a 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_alert_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_alert_info.go @@ -45,27 +45,26 @@ type PTXServiceDTORailSpecificationV2THSRAlertInfo struct { // Required: true Effects *string `json:"Effects" xml:"String"` - // integer + // Int32 // // 動態事件影響等級(本資料僅作參考,實際資料請參考高鐵http://www.thsrc.com.tw/tw/Operation) : [1:'全線正常運行',2:'有異常狀況'] // Required: true - Level *string `json:"Level"` + Level *int64 `json:"Level"` - // DateTime - // // 發生日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - OccuredTime string `json:"OccuredTime,omitempty"` + // Format: date-time + OccuredTime strfmt.DateTime `json:"OccuredTime,omitempty"` - // DateTime - // // 訊息發布日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - PublishTime string `json:"PublishTime,omitempty"` + // Format: date-time + PublishTime strfmt.DateTime `json:"PublishTime,omitempty"` // DateTime // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -83,7 +82,8 @@ type PTXServiceDTORailSpecificationV2THSRAlertInfo struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t h s r alert info @@ -110,6 +110,14 @@ func (m *PTXServiceDTORailSpecificationV2THSRAlertInfo) Validate(formats strfmt. res = append(res, err) } + if err := m.validateOccuredTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateSrcUpdateTime(formats); err != nil { res = append(res, err) } @@ -177,12 +185,40 @@ func (m *PTXServiceDTORailSpecificationV2THSRAlertInfo) validateLevel(formats st return nil } +func (m *PTXServiceDTORailSpecificationV2THSRAlertInfo) validateOccuredTime(formats strfmt.Registry) error { + if swag.IsZero(m.OccuredTime) { // not required + return nil + } + + if err := validate.FormatOf("OccuredTime", "body", "date-time", m.OccuredTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV2THSRAlertInfo) validatePublishTime(formats strfmt.Registry) error { + if swag.IsZero(m.PublishTime) { // not required + return nil + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2THSRAlertInfo) validateSrcUpdateTime(formats strfmt.Registry) error { if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -210,6 +246,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRAlertInfo) validateUpdateTime(forma return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go index cb3c5d27..ed39488b 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_available_seat.go @@ -22,11 +22,11 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.THSR.AvailableSeat type PTXServiceDTORailSpecificationV2THSRAvailableSeat struct { - // integer + // Int32 // // 方向 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_general_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_general_timetable.go index 186279bf..45ebb396 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_general_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_general_timetable.go @@ -42,7 +42,8 @@ type PTXServiceDTORailSpecificationV2THSRGeneralTimetable struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -93,6 +94,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRGeneralTimetable) validateSrcUpdate return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_news.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_news.go index 83b5fa18..7442eb55 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_news.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_news.go @@ -33,11 +33,10 @@ type PTXServiceDTORailSpecificationV2THSRNews struct { // Required: true Description *string `json:"Description" xml:"String"` - // DateTime - // // 結束時間 // Required: true - EndTime *string `json:"EndTime"` + // Format: date-time + EndTime *strfmt.DateTime `json:"EndTime"` // String // @@ -68,13 +67,15 @@ type PTXServiceDTORailSpecificationV2THSRNews struct { // // 消息發布日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - PublishTime *string `json:"PublishTime"` + // Format: date-time + PublishTime *strfmt.DateTime `json:"PublishTime"` // DateTime // // 開始時間 // Required: true - StartTime *string `json:"StartTime"` + // Format: date-time + StartTime *strfmt.DateTime `json:"StartTime"` // String // @@ -86,7 +87,8 @@ type PTXServiceDTORailSpecificationV2THSRNews struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t h s r news @@ -167,6 +169,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRNews) validateEndTime(formats strfm return err } + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + return nil } @@ -216,6 +222,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRNews) validatePublishTime(formats s return err } + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + return nil } @@ -225,6 +235,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRNews) validateStartTime(formats str return err } + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + return nil } @@ -243,6 +257,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRNews) validateUpdateTime(formats st return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go index f915807e..d5063d5a 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_old_available_seat.go @@ -28,11 +28,11 @@ type PTXServiceDTORailSpecificationV2THSROldAvailableSeat struct { // Required: true DepartureTime *string `json:"DepartureTime" xml:"String"` - // integer + // Int32 // // 方向 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -52,7 +52,8 @@ type PTXServiceDTORailSpecificationV2THSROldAvailableSeat struct { // // 來源平台更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -165,6 +166,10 @@ func (m *PTXServiceDTORailSpecificationV2THSROldAvailableSeat) validateSrcUpdate return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_timetable.go index 8f316709..af9bcf5b 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_timetable.go @@ -46,7 +46,8 @@ type PTXServiceDTORailSpecificationV2THSRRailDailyTimetable struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +131,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailDailyTimetable) validateUpdateT return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_train_info.go index c91d5c1b..f0110a7f 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_daily_train_info.go @@ -21,11 +21,11 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.THSR.RailDailyTrainInfo type PTXServiceDTORailSpecificationV2THSRRailDailyTrainInfo struct { - // integer + // Int32 // // 行駛方向 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -68,7 +68,8 @@ type PTXServiceDTORailSpecificationV2THSRRailDailyTrainInfo struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -163,6 +164,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailDailyTrainInfo) validateUpdateT return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_timetable.go index 4573e1b6..723acc18 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_timetable.go @@ -44,7 +44,8 @@ type PTXServiceDTORailSpecificationV2THSRRailGeneralTimetable struct { // DateTime // // 發布時間(格式: yyyy-MM-dd) - UpdateTime string `json:"UpdateTime,omitempty"` + // Format: date-time + UpdateTime strfmt.DateTime `json:"UpdateTime,omitempty"` // Int32 // @@ -69,6 +70,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailGeneralTimetable) Validate(form res = append(res, err) } + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateVersionID(formats); err != nil { res = append(res, err) } @@ -102,6 +107,18 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailGeneralTimetable) validateGener return nil } +func (m *PTXServiceDTORailSpecificationV2THSRRailGeneralTimetable) validateUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.UpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2THSRRailGeneralTimetable) validateVersionID(formats strfmt.Registry) error { if err := validate.Required("VersionID", "body", m.VersionID); err != nil { diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_train_info.go index a5b96d2b..44d1d570 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_general_train_info.go @@ -21,11 +21,11 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.THSR.RailGeneralTrainInfo type PTXServiceDTORailSpecificationV2THSRRailGeneralTrainInfo struct { - // integer + // Int32 // // 行駛方向 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_daily_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_daily_timetable.go index 583c43f9..b8b45f05 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_daily_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_daily_timetable.go @@ -55,7 +55,8 @@ type PTXServiceDTORailSpecificationV2THSRRailODDailyTimetable struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -128,6 +129,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailODDailyTimetable) validateUpdat return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_fare.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_fare.go index 14dee932..35825d5d 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_fare.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_o_d_fare.go @@ -36,11 +36,11 @@ type PTXServiceDTORailSpecificationV2THSRRailODFare struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"DestinationStationName" xml:"NameType"` - // integer + // Int32 // // 行駛方向 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // @@ -66,13 +66,15 @@ type PTXServiceDTORailSpecificationV2THSRRailODFare struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -195,6 +197,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailODFare) validateSrcUpdateTime(f return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -204,6 +210,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailODFare) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station.go index 4e91df3b..003a75cb 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station.go @@ -95,7 +95,8 @@ type PTXServiceDTORailSpecificationV2THSRRailStation struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -214,6 +215,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailStation) validateUpdateTime(for return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station_timetable.go index bef629b5..999cbea9 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_rail_station_timetable.go @@ -33,11 +33,11 @@ type PTXServiceDTORailSpecificationV2THSRRailStationTimetable struct { // Required: true DepartureTime *string `json:"DepartureTime" xml:"String"` - // integer + // Int32 // // 順逆行 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -97,7 +97,8 @@ type PTXServiceDTORailSpecificationV2THSRRailStationTimetable struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -261,6 +262,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRRailStationTimetable) validateUpdat return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_service_day.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_service_day.go index 96e9b01a..0bfcabbd 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_service_day.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_service_day.go @@ -21,47 +21,47 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.THSR.ServiceDay type PTXServiceDTORailSpecificationV2THSRServiceDay struct { - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *string `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *string `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *string `json:"Saturday"` + Saturday *int64 `json:"Saturday"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *string `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *string `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *string `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *string `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o rail specification v2 t h s r service day diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_station_exit.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_station_exit.go index da84f480..b3878e51 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_station_exit.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_station_exit.go @@ -61,7 +61,8 @@ type PTXServiceDTORailSpecificationV2THSRStationExit struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // 是否有樓梯 // Required: true @@ -85,7 +86,8 @@ type PTXServiceDTORailSpecificationV2THSRStationExit struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t h s r station exit @@ -194,6 +196,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRStationExit) validateSrcUpdateTime( return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -226,6 +232,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRStationExit) validateUpdateTime(for return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_t_h_s_r_shape.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_t_h_s_r_shape.go index 77a550be..f144f067 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_t_h_s_r_shape.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_t_h_s_r_shape.go @@ -49,7 +49,8 @@ type PTXServiceDTORailSpecificationV2THSRTHSRShape struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t h s r t h s r shape @@ -120,6 +121,10 @@ func (m *PTXServiceDTORailSpecificationV2THSRTHSRShape) validateUpdateTime(forma return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_time_info_rail_daily_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_time_info_rail_daily_train_info.go index 3c56cfc3..55c54542 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_time_info_rail_daily_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_h_s_r_time_info_rail_daily_train_info.go @@ -21,11 +21,11 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.THSR.TimeInfo.RailDailyTrainInfo type PTXServiceDTORailSpecificationV2THSRTimeInfoRailDailyTrainInfo struct { - // integer + // Int32 // // 行駛方向 : [0:'南下',1:'北上'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_general_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_general_timetable.go index 83683a3d..56245a8c 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_general_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_general_timetable.go @@ -38,10 +38,9 @@ type PTXServiceDTORailSpecificationV2TRAGeneralTimetable struct { PTXServiceDTORailSpecificationV2TRAServiceDay } `json:"ServiceDay" xml:"ServiceDay"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // Array // @@ -62,6 +61,10 @@ func (m *PTXServiceDTORailSpecificationV2TRAGeneralTimetable) Validate(formats s res = append(res, err) } + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStopTimes(formats); err != nil { res = append(res, err) } @@ -82,6 +85,18 @@ func (m *PTXServiceDTORailSpecificationV2TRAGeneralTimetable) validateServiceDay return nil } +func (m *PTXServiceDTORailSpecificationV2TRAGeneralTimetable) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2TRAGeneralTimetable) validateStopTimes(formats strfmt.Registry) error { if err := validate.Required("StopTimes", "body", m.StopTimes); err != nil { diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_line.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_line.go index d88c1a8b..d855902a 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_line.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_line.go @@ -72,7 +72,8 @@ type PTXServiceDTORailSpecificationV2TRALine struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t r a line @@ -186,6 +187,10 @@ func (m *PTXServiceDTORailSpecificationV2TRALine) validateUpdateTime(formats str return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_network.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_network.go index 94ba3743..60bd278f 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_network.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_network.go @@ -74,7 +74,8 @@ type PTXServiceDTORailSpecificationV2TRANetwork struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t r a network @@ -217,6 +218,10 @@ func (m *PTXServiceDTORailSpecificationV2TRANetwork) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_timetable.go index 495b371b..b5bfdbe4 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_timetable.go @@ -46,7 +46,8 @@ type PTXServiceDTORailSpecificationV2TRARailDailyTimetable struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -130,6 +131,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailDailyTimetable) validateUpdateTi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_train_info.go index e5643d03..f8fca6b6 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_daily_train_info.go @@ -21,35 +21,35 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.TRA.RailDailyTrainInfo type PTXServiceDTORailSpecificationV2TRARailDailyTrainInfo struct { - // integer + // Int32 // // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] // Required: true - BikeFlag *string `json:"BikeFlag"` + BikeFlag *int64 `json:"BikeFlag"` - // integer + // Int32 // // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] // Required: true - BreastFeedingFlag *string `json:"BreastFeedingFlag"` + BreastFeedingFlag *int64 `json:"BreastFeedingFlag"` - // integer + // Int32 // // 是否每日行駛 : [0:'否',1:'是'] // Required: true - DailyFlag *string `json:"DailyFlag"` + DailyFlag *int64 `json:"DailyFlag"` - // integer + // Int32 // // 是否提供訂便當服務 : [0:'否',1:'是'] // Required: true - DiningFlag *string `json:"DiningFlag"` + DiningFlag *int64 `json:"DiningFlag"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -75,17 +75,17 @@ type PTXServiceDTORailSpecificationV2TRARailDailyTrainInfo struct { // 跨夜車站代碼 OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 是否提供行李服務 : [0:'否',1:'是'] // Required: true - PackageServiceFlag *string `json:"PackageServiceFlag"` + PackageServiceFlag *int64 `json:"PackageServiceFlag"` - // integer + // Int32 // // 是否為加班車 : [0:'否',1:'是'] // Required: true - ServiceAddedFlag *string `json:"ServiceAddedFlag"` + ServiceAddedFlag *int64 `json:"ServiceAddedFlag"` // String // @@ -130,16 +130,17 @@ type PTXServiceDTORailSpecificationV2TRARailDailyTrainInfo struct { // 車次車頭文字描述(通用以"往"+ 迄站中文站名") TripHeadsign string `json:"TripHeadsign,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -147,11 +148,11 @@ type PTXServiceDTORailSpecificationV2TRARailDailyTrainInfo struct { // Required: true VersionID *int32 `json:"VersionID"` - // integer + // Int32 // // 是否設身障旅客專用座位車 : [0:'否',1:'是'] // Required: true - WheelchairFlag *string `json:"WheelchairFlag"` + WheelchairFlag *int64 `json:"WheelchairFlag"` } // Validate validates this p t x service d t o rail specification v2 t r a rail daily train info @@ -357,6 +358,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailDailyTrainInfo) validateUpdateTi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_timetable.go index d963f9c0..8ed3ba7a 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_timetable.go @@ -32,7 +32,8 @@ type PTXServiceDTORailSpecificationV2TRARailGeneralTimetable struct { // DateTime // // 資料更新日期(格式: yyyy-MM-dd) - UpdateTime string `json:"UpdateTime,omitempty"` + // Format: date-time + UpdateTime strfmt.DateTime `json:"UpdateTime,omitempty"` // Int32 // @@ -49,6 +50,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailGeneralTimetable) Validate(forma res = append(res, err) } + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateVersionID(formats); err != nil { res = append(res, err) } @@ -64,6 +69,18 @@ func (m *PTXServiceDTORailSpecificationV2TRARailGeneralTimetable) validateGenera return nil } +func (m *PTXServiceDTORailSpecificationV2TRARailGeneralTimetable) validateUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.UpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV2TRARailGeneralTimetable) validateVersionID(formats strfmt.Registry) error { if err := validate.Required("VersionID", "body", m.VersionID); err != nil { diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_train_info.go index 2d85aa59..0b731cd8 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_general_train_info.go @@ -21,35 +21,35 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.TRA.RailGeneralTrainInfo type PTXServiceDTORailSpecificationV2TRARailGeneralTrainInfo struct { - // integer + // Int32 // // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] // Required: true - BikeFlag *string `json:"BikeFlag"` + BikeFlag *int64 `json:"BikeFlag"` - // integer + // Int32 // // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] // Required: true - BreastFeedingFlag *string `json:"BreastFeedingFlag"` + BreastFeedingFlag *int64 `json:"BreastFeedingFlag"` - // integer + // Int32 // // 是否為每日行駛 : [0:'否',1:'是'] // Required: true - DailyFlag *string `json:"DailyFlag"` + DailyFlag *int64 `json:"DailyFlag"` - // integer + // Int32 // // 是否提供訂便當服務 : [0:'否',1:'是'] // Required: true - DiningFlag *string `json:"DiningFlag"` + DiningFlag *int64 `json:"DiningFlag"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -75,11 +75,11 @@ type PTXServiceDTORailSpecificationV2TRARailGeneralTrainInfo struct { // 跨夜車站代碼 OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 是否提供行李服務 : [0:'否',1:'是'] // Required: true - PackageServiceFlag *string `json:"PackageServiceFlag"` + PackageServiceFlag *int64 `json:"PackageServiceFlag"` // String // @@ -116,16 +116,17 @@ type PTXServiceDTORailSpecificationV2TRARailGeneralTrainInfo struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"TrainTypeName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -133,11 +134,11 @@ type PTXServiceDTORailSpecificationV2TRARailGeneralTrainInfo struct { // Required: true VersionID *int32 `json:"VersionID"` - // integer + // Int32 // // 是否設身障旅客專用座位車 : [0:'否',1:'是'] // Required: true - WheelchairFlag *string `json:"WheelchairFlag"` + WheelchairFlag *int64 `json:"WheelchairFlag"` } // Validate validates this p t x service d t o rail specification v2 t r a rail general train info @@ -307,6 +308,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailGeneralTrainInfo) validateUpdate return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_board.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_board.go index d08b2154..5cf185dc 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_board.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_board.go @@ -27,11 +27,11 @@ type PTXServiceDTORailSpecificationV2TRARailLiveBoard struct { // Required: true DelayTime *int32 `json:"DelayTime"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -63,7 +63,8 @@ type PTXServiceDTORailSpecificationV2TRARailLiveBoard struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -102,16 +103,17 @@ type PTXServiceDTORailSpecificationV2TRARailLiveBoard struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"TrainTypeName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t r a rail live board @@ -228,6 +230,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailLiveBoard) validateSrcUpdateTime return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -268,6 +274,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailLiveBoard) validateUpdateTime(fo return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_train_delay.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_train_delay.go index b1e728eb..75739c15 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_train_delay.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_live_train_delay.go @@ -31,7 +31,8 @@ type PTXServiceDTORailSpecificationV2TRARailLiveTrainDelay struct { // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -57,7 +58,8 @@ type PTXServiceDTORailSpecificationV2TRARailLiveTrainDelay struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t r a rail live train delay @@ -109,6 +111,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailLiveTrainDelay) validateSrcUpdat return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -141,6 +147,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailLiveTrainDelay) validateUpdateTi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_daily_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_daily_timetable.go index 70001796..02b50b6a 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_daily_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_daily_timetable.go @@ -55,7 +55,8 @@ type PTXServiceDTORailSpecificationV2TRARailODDailyTimetable struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -128,6 +129,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailODDailyTimetable) validateUpdate return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_fare.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_fare.go index cd1b091e..bba34fd1 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_fare.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_o_d_fare.go @@ -36,11 +36,11 @@ type PTXServiceDTORailSpecificationV2TRARailODFare struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"DestinationStationName" xml:"NameType"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // @@ -66,7 +66,8 @@ type PTXServiceDTORailSpecificationV2TRARailODFare struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -185,6 +186,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailODFare) validateUpdateTime(forma return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station.go index a2203a1f..0cee19c5 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station.go @@ -99,7 +99,8 @@ type PTXServiceDTORailSpecificationV2TRARailStation struct { // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -205,6 +206,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailStation) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station_timetable.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station_timetable.go index a7cffcaa..83ebab1b 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station_timetable.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_rail_station_timetable.go @@ -33,11 +33,11 @@ type PTXServiceDTORailSpecificationV2TRARailStationTimetable struct { // Required: true DepartureTime *string `json:"DepartureTime" xml:"String"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -110,16 +110,17 @@ type PTXServiceDTORailSpecificationV2TRARailStationTimetable struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"TrainTypeName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -295,6 +296,10 @@ func (m *PTXServiceDTORailSpecificationV2TRARailStationTimetable) validateUpdate return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_service_day.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_service_day.go index 80221e11..49206cff 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_service_day.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_service_day.go @@ -21,47 +21,47 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.TRA.ServiceDay type PTXServiceDTORailSpecificationV2TRAServiceDay struct { - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *string `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *string `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *string `json:"Saturday"` + Saturday *int64 `json:"Saturday"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *string `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *string `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *string `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *string `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o rail specification v2 t r a service day diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_station_of_line.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_station_of_line.go index b4517cbd..d7df6997 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_station_of_line.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_station_of_line.go @@ -44,7 +44,8 @@ type PTXServiceDTORailSpecificationV2TRAStationOfLine struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t r a station of line @@ -122,6 +123,10 @@ func (m *PTXServiceDTORailSpecificationV2TRAStationOfLine) validateUpdateTime(fo return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_t_r_a_shape.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_t_r_a_shape.go index 15c716fc..b983f5f9 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_t_r_a_shape.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_t_r_a_shape.go @@ -57,7 +57,8 @@ type PTXServiceDTORailSpecificationV2TRATRAShape struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v2 t r a t r a shape @@ -141,6 +142,10 @@ func (m *PTXServiceDTORailSpecificationV2TRATRAShape) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_daily_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_daily_train_info.go index 3520a544..142b6935 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_daily_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_daily_train_info.go @@ -21,35 +21,35 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.TRA.TimeInfo.RailDailyTrainInfo type PTXServiceDTORailSpecificationV2TRATimeInfoRailDailyTrainInfo struct { - // integer + // Int32 // // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] // Required: true - BikeFlag *string `json:"BikeFlag"` + BikeFlag *int64 `json:"BikeFlag"` - // integer + // Int32 // // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] // Required: true - BreastFeedingFlag *string `json:"BreastFeedingFlag"` + BreastFeedingFlag *int64 `json:"BreastFeedingFlag"` - // integer + // Int32 // // 是否為每日行駛 : [0:'否',1:'是'] // Required: true - DailyFlag *string `json:"DailyFlag"` + DailyFlag *int64 `json:"DailyFlag"` - // integer + // Int32 // // 是否提供訂便當服務 : [0:'否',1:'是'] // Required: true - DiningFlag *string `json:"DiningFlag"` + DiningFlag *int64 `json:"DiningFlag"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -75,11 +75,11 @@ type PTXServiceDTORailSpecificationV2TRATimeInfoRailDailyTrainInfo struct { // 跨夜車站代碼 OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 是否提供行李服務 : [0:'否',1:'是'] // Required: true - PackageServiceFlag *string `json:"PackageServiceFlag"` + PackageServiceFlag *int64 `json:"PackageServiceFlag"` // Boolean // @@ -127,16 +127,16 @@ type PTXServiceDTORailSpecificationV2TRATimeInfoRailDailyTrainInfo struct { // 車次車頭文字描述(通用以"往"+ 迄站中文站名") TripHeadsign string `json:"TripHeadsign,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` - // integer + // Int32 // // 是否設身障旅客專用座位車 : [0:'否',1:'是'] // Required: true - WheelchairFlag *string `json:"WheelchairFlag"` + WheelchairFlag *int64 `json:"WheelchairFlag"` } // Validate validates this p t x service d t o rail specification v2 t r a time info rail daily train info diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_general_train_info.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_general_train_info.go index 329c2e11..8c0657b8 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_general_train_info.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_time_info_rail_general_train_info.go @@ -21,35 +21,35 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V2.TRA.TimeInfo.RailGeneralTrainInfo type PTXServiceDTORailSpecificationV2TRATimeInfoRailGeneralTrainInfo struct { - // integer + // Int32 // // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] // Required: true - BikeFlag *string `json:"BikeFlag"` + BikeFlag *int64 `json:"BikeFlag"` - // integer + // Int32 // // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] // Required: true - BreastFeedingFlag *string `json:"BreastFeedingFlag"` + BreastFeedingFlag *int64 `json:"BreastFeedingFlag"` - // integer + // Int32 // // 是否為每日行駛 : [0:'否',1:'是'] // Required: true - DailyFlag *string `json:"DailyFlag"` + DailyFlag *int64 `json:"DailyFlag"` - // integer + // Int32 // // 是否提供訂便當服務 : [0:'否',1:'是'] // Required: true - DiningFlag *string `json:"DiningFlag"` + DiningFlag *int64 `json:"DiningFlag"` - // integer + // Int32 // // 順逆行 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -75,11 +75,11 @@ type PTXServiceDTORailSpecificationV2TRATimeInfoRailGeneralTrainInfo struct { // 跨夜車站代碼 OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 是否提供行李服務 : [0:'否',1:'是'] // Required: true - PackageServiceFlag *string `json:"PackageServiceFlag"` + PackageServiceFlag *int64 `json:"PackageServiceFlag"` // String // @@ -116,16 +116,16 @@ type PTXServiceDTORailSpecificationV2TRATimeInfoRailGeneralTrainInfo struct { PTXServiceDTOSharedSpecificationV2BaseNameType } `json:"TrainTypeName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` - // integer + // Int32 // // 是否設身障旅客專用座位車 : [0:'否',1:'是'] // Required: true - WheelchairFlag *string `json:"WheelchairFlag"` + WheelchairFlag *int64 `json:"WheelchairFlag"` } // Validate validates this p t x service d t o rail specification v2 t r a time info rail general train info diff --git a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_train_type.go b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_train_type.go index 6ddc30f7..5bae0f52 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_train_type.go +++ b/rail/v2/models/p_t_x_service_d_t_o_rail_specification_v2_t_r_a_train_type.go @@ -45,7 +45,8 @@ type PTXServiceDTORailSpecificationV2TRATrainType struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // Int32 // @@ -113,6 +114,10 @@ func (m *PTXServiceDTORailSpecificationV2TRATrainType) validateUpdateTime(format return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go b/rail/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go index 47178923..e37a421d 100644 --- a/rail/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go +++ b/rail/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_operator.go @@ -93,7 +93,8 @@ type PTXServiceDTOSharedSpecificationV2BaseOperator struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o shared specification v2 base operator @@ -190,6 +191,10 @@ func (m *PTXServiceDTOSharedSpecificationV2BaseOperator) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/client/a_f_r/afr_client.go b/rail/v3/client/a_f_r/afr_client.go new file mode 100644 index 00000000..534ea1c2 --- /dev/null +++ b/rail/v3/client/a_f_r/afr_client.go @@ -0,0 +1,585 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" +) + +// New creates a new a f r API client. +func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { + return &Client{transport: transport, formats: formats} +} + +/* +Client for a f r API +*/ +type Client struct { + transport runtime.ClientTransport + formats strfmt.Registry +} + +// ClientOption is the option for Client methods +type ClientOption func(*runtime.ClientOperation) + +// ClientService is the interface for Client methods +type ClientService interface { + LiteTrainGeneralTrainTimetable(params *LiteTrainGeneralTrainTimetableParams, opts ...ClientOption) (*LiteTrainGeneralTrainTimetableOK, error) + + LiteTrainGeneralTrainTimetable1(params *LiteTrainGeneralTrainTimetable1Params, opts ...ClientOption) (*LiteTrainGeneralTrainTimetable1OK, error) + + LiteTrainLine(params *LiteTrainLineParams, opts ...ClientOption) (*LiteTrainLineOK, error) + + LiteTrainNetwork(params *LiteTrainNetworkParams, opts ...ClientOption) (*LiteTrainNetworkOK, error) + + LiteTrainNews(params *LiteTrainNewsParams, opts ...ClientOption) (*LiteTrainNewsOK, error) + + LiteTrainODFare(params *LiteTrainODFareParams, opts ...ClientOption) (*LiteTrainODFareOK, error) + + LiteTrainODFare1(params *LiteTrainODFare1Params, opts ...ClientOption) (*LiteTrainODFare1OK, error) + + LiteTrainOperator(params *LiteTrainOperatorParams, opts ...ClientOption) (*LiteTrainOperatorOK, error) + + LiteTrainRoute(params *LiteTrainRouteParams, opts ...ClientOption) (*LiteTrainRouteOK, error) + + LiteTrainStation(params *LiteTrainStationParams, opts ...ClientOption) (*LiteTrainStationOK, error) + + LiteTrainStationOfLine(params *LiteTrainStationOfLineParams, opts ...ClientOption) (*LiteTrainStationOfLineOK, error) + + LiteTrainStationOfRoute(params *LiteTrainStationOfRouteParams, opts ...ClientOption) (*LiteTrainStationOfRouteOK, error) + + LiteTrainTrainType(params *LiteTrainTrainTypeParams, opts ...ClientOption) (*LiteTrainTrainTypeOK, error) + + SetTransport(transport runtime.ClientTransport) +} + +/* + LiteTrainGeneralTrainTimetable 取得所有車次的定期時刻表資料s + + 取得所有車次的定期時刻表資料 +*/ +func (a *Client) LiteTrainGeneralTrainTimetable(params *LiteTrainGeneralTrainTimetableParams, opts ...ClientOption) (*LiteTrainGeneralTrainTimetableOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainGeneralTrainTimetableParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_GeneralTrainTimetable", + Method: "GET", + PathPattern: "/v3/Rail/AFR/GeneralTrainTimetable", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainGeneralTrainTimetableReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainGeneralTrainTimetableOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_GeneralTrainTimetable: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainGeneralTrainTimetable1 取得指定s 車次 的定期時刻表資料 + + 取得指定[車次]的定期時刻表資料 +*/ +func (a *Client) LiteTrainGeneralTrainTimetable1(params *LiteTrainGeneralTrainTimetable1Params, opts ...ClientOption) (*LiteTrainGeneralTrainTimetable1OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainGeneralTrainTimetable1Params() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_GeneralTrainTimetable_1", + Method: "GET", + PathPattern: "/v3/Rail/AFR/GeneralTrainTimetable/TrainNo/{TrainNo}", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainGeneralTrainTimetable1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainGeneralTrainTimetable1OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_GeneralTrainTimetable_1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainLine 取得路線基本資料s + + 取得路線基本資料 +*/ +func (a *Client) LiteTrainLine(params *LiteTrainLineParams, opts ...ClientOption) (*LiteTrainLineOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainLineParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_Line", + Method: "GET", + PathPattern: "/v3/Rail/AFR/Line", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainLineReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainLineOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_Line: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainNetwork 取得小火車路網資料s + + 取得小火車路網資料 +*/ +func (a *Client) LiteTrainNetwork(params *LiteTrainNetworkParams, opts ...ClientOption) (*LiteTrainNetworkOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainNetworkParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_Network", + Method: "GET", + PathPattern: "/v3/Rail/AFR/Network", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainNetworkReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainNetworkOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_Network: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainNews 取得最新消息s + + 取得最新消息 +*/ +func (a *Client) LiteTrainNews(params *LiteTrainNewsParams, opts ...ClientOption) (*LiteTrainNewsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainNewsParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_News", + Method: "GET", + PathPattern: "/v3/Rail/AFR/News", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainNewsReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainNewsOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_News: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainODFare 取得所有票價資料s + + 取得所有票價資料 +*/ +func (a *Client) LiteTrainODFare(params *LiteTrainODFareParams, opts ...ClientOption) (*LiteTrainODFareOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainODFareParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_ODFare", + Method: "GET", + PathPattern: "/v3/Rail/AFR/ODFare", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainODFareReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainODFareOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_ODFare: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainODFare1 取得指定起迄站間票價資料s + + 取得指定起迄站間票價資料 +*/ +func (a *Client) LiteTrainODFare1(params *LiteTrainODFare1Params, opts ...ClientOption) (*LiteTrainODFare1OK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainODFare1Params() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_ODFare_1", + Method: "GET", + PathPattern: "/v3/Rail/AFR/ODFare/{OriginStationID}/to/{DestinationStationID}", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainODFare1Reader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainODFare1OK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_ODFare_1: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainOperator 取得小火車營運業者基本資料s + + 取得小火車營運業者基本資料 +*/ +func (a *Client) LiteTrainOperator(params *LiteTrainOperatorParams, opts ...ClientOption) (*LiteTrainOperatorOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainOperatorParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_Operator", + Method: "GET", + PathPattern: "/v3/Rail/AFR/Operator", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainOperatorReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainOperatorOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_Operator: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainRoute 取得營運路線基本資料s + + 取得營運路線基本資料 +*/ +func (a *Client) LiteTrainRoute(params *LiteTrainRouteParams, opts ...ClientOption) (*LiteTrainRouteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainRouteParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_Route", + Method: "GET", + PathPattern: "/v3/Rail/AFR/Route", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainRouteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainRouteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_Route: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainStation 取得車站基本資料s + + 取得車站基本資料 +*/ +func (a *Client) LiteTrainStation(params *LiteTrainStationParams, opts ...ClientOption) (*LiteTrainStationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainStationParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_Station", + Method: "GET", + PathPattern: "/v3/Rail/AFR/Station", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainStationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainStationOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_Station: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainStationOfLine 取得路線車站基本資料s + + 取得路線車站基本資料 +*/ +func (a *Client) LiteTrainStationOfLine(params *LiteTrainStationOfLineParams, opts ...ClientOption) (*LiteTrainStationOfLineOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainStationOfLineParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_StationOfLine", + Method: "GET", + PathPattern: "/v3/Rail/AFR/StationOfLine", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainStationOfLineReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainStationOfLineOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_StationOfLine: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainStationOfRoute 取得營運路線車站基本資料s + + 取得營運路線車站基本資料 +*/ +func (a *Client) LiteTrainStationOfRoute(params *LiteTrainStationOfRouteParams, opts ...ClientOption) (*LiteTrainStationOfRouteOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainStationOfRouteParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_StationOfRoute", + Method: "GET", + PathPattern: "/v3/Rail/AFR/StationOfRoute", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainStationOfRouteReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainStationOfRouteOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_StationOfRoute: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +/* + LiteTrainTrainType 取得所有列車車種資料s + + 取得所有列車車種資料 +*/ +func (a *Client) LiteTrainTrainType(params *LiteTrainTrainTypeParams, opts ...ClientOption) (*LiteTrainTrainTypeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLiteTrainTrainTypeParams() + } + op := &runtime.ClientOperation{ + ID: "LiteTrain_TrainType", + Method: "GET", + PathPattern: "/v3/Rail/AFR/TrainType", + ProducesMediaTypes: []string{"application/json", "application/xml"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"https"}, + Params: params, + Reader: &LiteTrainTrainTypeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LiteTrainTrainTypeOK) + if ok { + return success, nil + } + // unexpected success response + // safeguard: normally, absent a default response, unknown success responses return an error above: so this is a codegen issue + msg := fmt.Sprintf("unexpected success response for LiteTrain_TrainType: API contract not enforced by server. Client expected to get an error, but got: %T", result) + panic(msg) +} + +// SetTransport changes the transport on the client +func (a *Client) SetTransport(transport runtime.ClientTransport) { + a.transport = transport +} diff --git a/rail/v3/client/a_f_r/lite_train_general_train_timetable1_parameters.go b/rail/v3/client/a_f_r/lite_train_general_train_timetable1_parameters.go new file mode 100644 index 00000000..5643397c --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_general_train_timetable1_parameters.go @@ -0,0 +1,394 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainGeneralTrainTimetable1Params creates a new LiteTrainGeneralTrainTimetable1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainGeneralTrainTimetable1Params() *LiteTrainGeneralTrainTimetable1Params { + return &LiteTrainGeneralTrainTimetable1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainGeneralTrainTimetable1ParamsWithTimeout creates a new LiteTrainGeneralTrainTimetable1Params object +// with the ability to set a timeout on a request. +func NewLiteTrainGeneralTrainTimetable1ParamsWithTimeout(timeout time.Duration) *LiteTrainGeneralTrainTimetable1Params { + return &LiteTrainGeneralTrainTimetable1Params{ + timeout: timeout, + } +} + +// NewLiteTrainGeneralTrainTimetable1ParamsWithContext creates a new LiteTrainGeneralTrainTimetable1Params object +// with the ability to set a context for a request. +func NewLiteTrainGeneralTrainTimetable1ParamsWithContext(ctx context.Context) *LiteTrainGeneralTrainTimetable1Params { + return &LiteTrainGeneralTrainTimetable1Params{ + Context: ctx, + } +} + +// NewLiteTrainGeneralTrainTimetable1ParamsWithHTTPClient creates a new LiteTrainGeneralTrainTimetable1Params object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainGeneralTrainTimetable1ParamsWithHTTPClient(client *http.Client) *LiteTrainGeneralTrainTimetable1Params { + return &LiteTrainGeneralTrainTimetable1Params{ + HTTPClient: client, + } +} + +/* LiteTrainGeneralTrainTimetable1Params contains all the parameters to send to the API endpoint + for the lite train general train timetable 1 operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainGeneralTrainTimetable1Params struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + /* TrainNo. + + 欲查詢車次的代碼 + */ + TrainNo string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train general train timetable 1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainGeneralTrainTimetable1Params) WithDefaults() *LiteTrainGeneralTrainTimetable1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train general train timetable 1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainGeneralTrainTimetable1Params) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainGeneralTrainTimetable1Params{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithTimeout(timeout time.Duration) *LiteTrainGeneralTrainTimetable1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithContext(ctx context.Context) *LiteTrainGeneralTrainTimetable1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithHTTPClient(client *http.Client) *LiteTrainGeneralTrainTimetable1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarCount(dollarCount *bool) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarFilter(dollarFilter *string) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarFormat(dollarFormat string) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarOrderby(dollarOrderby *string) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarSelect(dollarSelect *string) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarSkip(dollarSkip *string) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithDollarTop(dollarTop *int64) *LiteTrainGeneralTrainTimetable1Params { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WithTrainNo adds the trainNo to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) WithTrainNo(trainNo string) *LiteTrainGeneralTrainTimetable1Params { + o.SetTrainNo(trainNo) + return o +} + +// SetTrainNo adds the trainNo to the lite train general train timetable 1 params +func (o *LiteTrainGeneralTrainTimetable1Params) SetTrainNo(trainNo string) { + o.TrainNo = trainNo +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainGeneralTrainTimetable1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + // path param TrainNo + if err := r.SetPathParam("TrainNo", o.TrainNo); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_general_train_timetable1_responses.go b/rail/v3/client/a_f_r/lite_train_general_train_timetable1_responses.go new file mode 100644 index 00000000..6c1ccbc2 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_general_train_timetable1_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainGeneralTrainTimetable1Reader is a Reader for the LiteTrainGeneralTrainTimetable1 structure. +type LiteTrainGeneralTrainTimetable1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainGeneralTrainTimetable1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainGeneralTrainTimetable1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainGeneralTrainTimetable1NotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainGeneralTrainTimetable1OK creates a LiteTrainGeneralTrainTimetable1OK with default headers values +func NewLiteTrainGeneralTrainTimetable1OK() *LiteTrainGeneralTrainTimetable1OK { + return &LiteTrainGeneralTrainTimetable1OK{} +} + +/* LiteTrainGeneralTrainTimetable1OK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainGeneralTrainTimetable1OK struct { + Payload *models.PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable +} + +func (o *LiteTrainGeneralTrainTimetable1OK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/GeneralTrainTimetable/TrainNo/{TrainNo}][%d] liteTrainGeneralTrainTimetable1OK %+v", 200, o.Payload) +} +func (o *LiteTrainGeneralTrainTimetable1OK) GetPayload() *models.PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable { + return o.Payload +} + +func (o *LiteTrainGeneralTrainTimetable1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainGeneralTrainTimetable1NotModified creates a LiteTrainGeneralTrainTimetable1NotModified with default headers values +func NewLiteTrainGeneralTrainTimetable1NotModified() *LiteTrainGeneralTrainTimetable1NotModified { + return &LiteTrainGeneralTrainTimetable1NotModified{} +} + +/* LiteTrainGeneralTrainTimetable1NotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainGeneralTrainTimetable1NotModified struct { +} + +func (o *LiteTrainGeneralTrainTimetable1NotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/GeneralTrainTimetable/TrainNo/{TrainNo}][%d] liteTrainGeneralTrainTimetable1NotModified ", 304) +} + +func (o *LiteTrainGeneralTrainTimetable1NotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_general_train_timetable_parameters.go b/rail/v3/client/a_f_r/lite_train_general_train_timetable_parameters.go new file mode 100644 index 00000000..b14f0453 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_general_train_timetable_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainGeneralTrainTimetableParams creates a new LiteTrainGeneralTrainTimetableParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainGeneralTrainTimetableParams() *LiteTrainGeneralTrainTimetableParams { + return &LiteTrainGeneralTrainTimetableParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainGeneralTrainTimetableParamsWithTimeout creates a new LiteTrainGeneralTrainTimetableParams object +// with the ability to set a timeout on a request. +func NewLiteTrainGeneralTrainTimetableParamsWithTimeout(timeout time.Duration) *LiteTrainGeneralTrainTimetableParams { + return &LiteTrainGeneralTrainTimetableParams{ + timeout: timeout, + } +} + +// NewLiteTrainGeneralTrainTimetableParamsWithContext creates a new LiteTrainGeneralTrainTimetableParams object +// with the ability to set a context for a request. +func NewLiteTrainGeneralTrainTimetableParamsWithContext(ctx context.Context) *LiteTrainGeneralTrainTimetableParams { + return &LiteTrainGeneralTrainTimetableParams{ + Context: ctx, + } +} + +// NewLiteTrainGeneralTrainTimetableParamsWithHTTPClient creates a new LiteTrainGeneralTrainTimetableParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainGeneralTrainTimetableParamsWithHTTPClient(client *http.Client) *LiteTrainGeneralTrainTimetableParams { + return &LiteTrainGeneralTrainTimetableParams{ + HTTPClient: client, + } +} + +/* LiteTrainGeneralTrainTimetableParams contains all the parameters to send to the API endpoint + for the lite train general train timetable operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainGeneralTrainTimetableParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train general train timetable params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainGeneralTrainTimetableParams) WithDefaults() *LiteTrainGeneralTrainTimetableParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train general train timetable params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainGeneralTrainTimetableParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainGeneralTrainTimetableParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithTimeout(timeout time.Duration) *LiteTrainGeneralTrainTimetableParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithContext(ctx context.Context) *LiteTrainGeneralTrainTimetableParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithHTTPClient(client *http.Client) *LiteTrainGeneralTrainTimetableParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarCount(dollarCount *bool) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarFilter(dollarFilter *string) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarFormat(dollarFormat string) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarSelect(dollarSelect *string) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarSkip(dollarSkip *string) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) WithDollarTop(dollarTop *int64) *LiteTrainGeneralTrainTimetableParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train general train timetable params +func (o *LiteTrainGeneralTrainTimetableParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainGeneralTrainTimetableParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_general_train_timetable_responses.go b/rail/v3/client/a_f_r/lite_train_general_train_timetable_responses.go new file mode 100644 index 00000000..cbe1f60c --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_general_train_timetable_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainGeneralTrainTimetableReader is a Reader for the LiteTrainGeneralTrainTimetable structure. +type LiteTrainGeneralTrainTimetableReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainGeneralTrainTimetableReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainGeneralTrainTimetableOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainGeneralTrainTimetableNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainGeneralTrainTimetableOK creates a LiteTrainGeneralTrainTimetableOK with default headers values +func NewLiteTrainGeneralTrainTimetableOK() *LiteTrainGeneralTrainTimetableOK { + return &LiteTrainGeneralTrainTimetableOK{} +} + +/* LiteTrainGeneralTrainTimetableOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainGeneralTrainTimetableOK struct { + Payload *models.PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable +} + +func (o *LiteTrainGeneralTrainTimetableOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/GeneralTrainTimetable][%d] liteTrainGeneralTrainTimetableOK %+v", 200, o.Payload) +} +func (o *LiteTrainGeneralTrainTimetableOK) GetPayload() *models.PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable { + return o.Payload +} + +func (o *LiteTrainGeneralTrainTimetableOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainGeneralTrainTimetableNotModified creates a LiteTrainGeneralTrainTimetableNotModified with default headers values +func NewLiteTrainGeneralTrainTimetableNotModified() *LiteTrainGeneralTrainTimetableNotModified { + return &LiteTrainGeneralTrainTimetableNotModified{} +} + +/* LiteTrainGeneralTrainTimetableNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainGeneralTrainTimetableNotModified struct { +} + +func (o *LiteTrainGeneralTrainTimetableNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/GeneralTrainTimetable][%d] liteTrainGeneralTrainTimetableNotModified ", 304) +} + +func (o *LiteTrainGeneralTrainTimetableNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_line_parameters.go b/rail/v3/client/a_f_r/lite_train_line_parameters.go new file mode 100644 index 00000000..0dc401f1 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_line_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainLineParams creates a new LiteTrainLineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainLineParams() *LiteTrainLineParams { + return &LiteTrainLineParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainLineParamsWithTimeout creates a new LiteTrainLineParams object +// with the ability to set a timeout on a request. +func NewLiteTrainLineParamsWithTimeout(timeout time.Duration) *LiteTrainLineParams { + return &LiteTrainLineParams{ + timeout: timeout, + } +} + +// NewLiteTrainLineParamsWithContext creates a new LiteTrainLineParams object +// with the ability to set a context for a request. +func NewLiteTrainLineParamsWithContext(ctx context.Context) *LiteTrainLineParams { + return &LiteTrainLineParams{ + Context: ctx, + } +} + +// NewLiteTrainLineParamsWithHTTPClient creates a new LiteTrainLineParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainLineParamsWithHTTPClient(client *http.Client) *LiteTrainLineParams { + return &LiteTrainLineParams{ + HTTPClient: client, + } +} + +/* LiteTrainLineParams contains all the parameters to send to the API endpoint + for the lite train line operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainLineParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train line params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainLineParams) WithDefaults() *LiteTrainLineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train line params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainLineParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainLineParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train line params +func (o *LiteTrainLineParams) WithTimeout(timeout time.Duration) *LiteTrainLineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train line params +func (o *LiteTrainLineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train line params +func (o *LiteTrainLineParams) WithContext(ctx context.Context) *LiteTrainLineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train line params +func (o *LiteTrainLineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train line params +func (o *LiteTrainLineParams) WithHTTPClient(client *http.Client) *LiteTrainLineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train line params +func (o *LiteTrainLineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train line params +func (o *LiteTrainLineParams) WithDollarCount(dollarCount *bool) *LiteTrainLineParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train line params +func (o *LiteTrainLineParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train line params +func (o *LiteTrainLineParams) WithDollarFilter(dollarFilter *string) *LiteTrainLineParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train line params +func (o *LiteTrainLineParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train line params +func (o *LiteTrainLineParams) WithDollarFormat(dollarFormat string) *LiteTrainLineParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train line params +func (o *LiteTrainLineParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train line params +func (o *LiteTrainLineParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainLineParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train line params +func (o *LiteTrainLineParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train line params +func (o *LiteTrainLineParams) WithDollarSelect(dollarSelect *string) *LiteTrainLineParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train line params +func (o *LiteTrainLineParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train line params +func (o *LiteTrainLineParams) WithDollarSkip(dollarSkip *string) *LiteTrainLineParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train line params +func (o *LiteTrainLineParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train line params +func (o *LiteTrainLineParams) WithDollarTop(dollarTop *int64) *LiteTrainLineParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train line params +func (o *LiteTrainLineParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainLineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_line_responses.go b/rail/v3/client/a_f_r/lite_train_line_responses.go new file mode 100644 index 00000000..75c91c54 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_line_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainLineReader is a Reader for the LiteTrainLine structure. +type LiteTrainLineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainLineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainLineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainLineNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainLineOK creates a LiteTrainLineOK with default headers values +func NewLiteTrainLineOK() *LiteTrainLineOK { + return &LiteTrainLineOK{} +} + +/* LiteTrainLineOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainLineOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine +} + +func (o *LiteTrainLineOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Line][%d] liteTrainLineOK %+v", 200, o.Payload) +} +func (o *LiteTrainLineOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine { + return o.Payload +} + +func (o *LiteTrainLineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainLineNotModified creates a LiteTrainLineNotModified with default headers values +func NewLiteTrainLineNotModified() *LiteTrainLineNotModified { + return &LiteTrainLineNotModified{} +} + +/* LiteTrainLineNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainLineNotModified struct { +} + +func (o *LiteTrainLineNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Line][%d] liteTrainLineNotModified ", 304) +} + +func (o *LiteTrainLineNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_network_parameters.go b/rail/v3/client/a_f_r/lite_train_network_parameters.go new file mode 100644 index 00000000..468e8f35 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_network_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainNetworkParams creates a new LiteTrainNetworkParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainNetworkParams() *LiteTrainNetworkParams { + return &LiteTrainNetworkParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainNetworkParamsWithTimeout creates a new LiteTrainNetworkParams object +// with the ability to set a timeout on a request. +func NewLiteTrainNetworkParamsWithTimeout(timeout time.Duration) *LiteTrainNetworkParams { + return &LiteTrainNetworkParams{ + timeout: timeout, + } +} + +// NewLiteTrainNetworkParamsWithContext creates a new LiteTrainNetworkParams object +// with the ability to set a context for a request. +func NewLiteTrainNetworkParamsWithContext(ctx context.Context) *LiteTrainNetworkParams { + return &LiteTrainNetworkParams{ + Context: ctx, + } +} + +// NewLiteTrainNetworkParamsWithHTTPClient creates a new LiteTrainNetworkParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainNetworkParamsWithHTTPClient(client *http.Client) *LiteTrainNetworkParams { + return &LiteTrainNetworkParams{ + HTTPClient: client, + } +} + +/* LiteTrainNetworkParams contains all the parameters to send to the API endpoint + for the lite train network operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainNetworkParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainNetworkParams) WithDefaults() *LiteTrainNetworkParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train network params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainNetworkParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainNetworkParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train network params +func (o *LiteTrainNetworkParams) WithTimeout(timeout time.Duration) *LiteTrainNetworkParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train network params +func (o *LiteTrainNetworkParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train network params +func (o *LiteTrainNetworkParams) WithContext(ctx context.Context) *LiteTrainNetworkParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train network params +func (o *LiteTrainNetworkParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train network params +func (o *LiteTrainNetworkParams) WithHTTPClient(client *http.Client) *LiteTrainNetworkParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train network params +func (o *LiteTrainNetworkParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarCount(dollarCount *bool) *LiteTrainNetworkParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarFilter(dollarFilter *string) *LiteTrainNetworkParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarFormat(dollarFormat string) *LiteTrainNetworkParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainNetworkParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarSelect(dollarSelect *string) *LiteTrainNetworkParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarSkip(dollarSkip *string) *LiteTrainNetworkParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train network params +func (o *LiteTrainNetworkParams) WithDollarTop(dollarTop *int64) *LiteTrainNetworkParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train network params +func (o *LiteTrainNetworkParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainNetworkParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_network_responses.go b/rail/v3/client/a_f_r/lite_train_network_responses.go new file mode 100644 index 00000000..a61f9988 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_network_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainNetworkReader is a Reader for the LiteTrainNetwork structure. +type LiteTrainNetworkReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainNetworkReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainNetworkOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainNetworkNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainNetworkOK creates a LiteTrainNetworkOK with default headers values +func NewLiteTrainNetworkOK() *LiteTrainNetworkOK { + return &LiteTrainNetworkOK{} +} + +/* LiteTrainNetworkOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainNetworkOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork +} + +func (o *LiteTrainNetworkOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Network][%d] liteTrainNetworkOK %+v", 200, o.Payload) +} +func (o *LiteTrainNetworkOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork { + return o.Payload +} + +func (o *LiteTrainNetworkOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainNetworkNotModified creates a LiteTrainNetworkNotModified with default headers values +func NewLiteTrainNetworkNotModified() *LiteTrainNetworkNotModified { + return &LiteTrainNetworkNotModified{} +} + +/* LiteTrainNetworkNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainNetworkNotModified struct { +} + +func (o *LiteTrainNetworkNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Network][%d] liteTrainNetworkNotModified ", 304) +} + +func (o *LiteTrainNetworkNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_news_parameters.go b/rail/v3/client/a_f_r/lite_train_news_parameters.go new file mode 100644 index 00000000..39b7c281 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_news_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainNewsParams creates a new LiteTrainNewsParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainNewsParams() *LiteTrainNewsParams { + return &LiteTrainNewsParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainNewsParamsWithTimeout creates a new LiteTrainNewsParams object +// with the ability to set a timeout on a request. +func NewLiteTrainNewsParamsWithTimeout(timeout time.Duration) *LiteTrainNewsParams { + return &LiteTrainNewsParams{ + timeout: timeout, + } +} + +// NewLiteTrainNewsParamsWithContext creates a new LiteTrainNewsParams object +// with the ability to set a context for a request. +func NewLiteTrainNewsParamsWithContext(ctx context.Context) *LiteTrainNewsParams { + return &LiteTrainNewsParams{ + Context: ctx, + } +} + +// NewLiteTrainNewsParamsWithHTTPClient creates a new LiteTrainNewsParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainNewsParamsWithHTTPClient(client *http.Client) *LiteTrainNewsParams { + return &LiteTrainNewsParams{ + HTTPClient: client, + } +} + +/* LiteTrainNewsParams contains all the parameters to send to the API endpoint + for the lite train news operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainNewsParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train news params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainNewsParams) WithDefaults() *LiteTrainNewsParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train news params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainNewsParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainNewsParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train news params +func (o *LiteTrainNewsParams) WithTimeout(timeout time.Duration) *LiteTrainNewsParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train news params +func (o *LiteTrainNewsParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train news params +func (o *LiteTrainNewsParams) WithContext(ctx context.Context) *LiteTrainNewsParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train news params +func (o *LiteTrainNewsParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train news params +func (o *LiteTrainNewsParams) WithHTTPClient(client *http.Client) *LiteTrainNewsParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train news params +func (o *LiteTrainNewsParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train news params +func (o *LiteTrainNewsParams) WithDollarCount(dollarCount *bool) *LiteTrainNewsParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train news params +func (o *LiteTrainNewsParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train news params +func (o *LiteTrainNewsParams) WithDollarFilter(dollarFilter *string) *LiteTrainNewsParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train news params +func (o *LiteTrainNewsParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train news params +func (o *LiteTrainNewsParams) WithDollarFormat(dollarFormat string) *LiteTrainNewsParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train news params +func (o *LiteTrainNewsParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train news params +func (o *LiteTrainNewsParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainNewsParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train news params +func (o *LiteTrainNewsParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train news params +func (o *LiteTrainNewsParams) WithDollarSelect(dollarSelect *string) *LiteTrainNewsParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train news params +func (o *LiteTrainNewsParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train news params +func (o *LiteTrainNewsParams) WithDollarSkip(dollarSkip *string) *LiteTrainNewsParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train news params +func (o *LiteTrainNewsParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train news params +func (o *LiteTrainNewsParams) WithDollarTop(dollarTop *int64) *LiteTrainNewsParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train news params +func (o *LiteTrainNewsParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainNewsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_news_responses.go b/rail/v3/client/a_f_r/lite_train_news_responses.go new file mode 100644 index 00000000..29813354 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_news_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainNewsReader is a Reader for the LiteTrainNews structure. +type LiteTrainNewsReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainNewsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainNewsOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainNewsNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainNewsOK creates a LiteTrainNewsOK with default headers values +func NewLiteTrainNewsOK() *LiteTrainNewsOK { + return &LiteTrainNewsOK{} +} + +/* LiteTrainNewsOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainNewsOK struct { + Payload *models.PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews +} + +func (o *LiteTrainNewsOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/News][%d] liteTrainNewsOK %+v", 200, o.Payload) +} +func (o *LiteTrainNewsOK) GetPayload() *models.PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews { + return o.Payload +} + +func (o *LiteTrainNewsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainNewsNotModified creates a LiteTrainNewsNotModified with default headers values +func NewLiteTrainNewsNotModified() *LiteTrainNewsNotModified { + return &LiteTrainNewsNotModified{} +} + +/* LiteTrainNewsNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainNewsNotModified struct { +} + +func (o *LiteTrainNewsNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/News][%d] liteTrainNewsNotModified ", 304) +} + +func (o *LiteTrainNewsNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_o_d_fare1_parameters.go b/rail/v3/client/a_f_r/lite_train_o_d_fare1_parameters.go new file mode 100644 index 00000000..d7a0de2e --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_o_d_fare1_parameters.go @@ -0,0 +1,416 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainODFare1Params creates a new LiteTrainODFare1Params object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainODFare1Params() *LiteTrainODFare1Params { + return &LiteTrainODFare1Params{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainODFare1ParamsWithTimeout creates a new LiteTrainODFare1Params object +// with the ability to set a timeout on a request. +func NewLiteTrainODFare1ParamsWithTimeout(timeout time.Duration) *LiteTrainODFare1Params { + return &LiteTrainODFare1Params{ + timeout: timeout, + } +} + +// NewLiteTrainODFare1ParamsWithContext creates a new LiteTrainODFare1Params object +// with the ability to set a context for a request. +func NewLiteTrainODFare1ParamsWithContext(ctx context.Context) *LiteTrainODFare1Params { + return &LiteTrainODFare1Params{ + Context: ctx, + } +} + +// NewLiteTrainODFare1ParamsWithHTTPClient creates a new LiteTrainODFare1Params object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainODFare1ParamsWithHTTPClient(client *http.Client) *LiteTrainODFare1Params { + return &LiteTrainODFare1Params{ + HTTPClient: client, + } +} + +/* LiteTrainODFare1Params contains all the parameters to send to the API endpoint + for the lite train o d fare 1 operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainODFare1Params struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + /* DestinationStationID. + + 迄點車站代碼 + */ + DestinationStationID string + + /* OriginStationID. + + 起點車站代碼 + */ + OriginStationID string + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train o d fare 1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainODFare1Params) WithDefaults() *LiteTrainODFare1Params { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train o d fare 1 params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainODFare1Params) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainODFare1Params{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithTimeout(timeout time.Duration) *LiteTrainODFare1Params { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithContext(ctx context.Context) *LiteTrainODFare1Params { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithHTTPClient(client *http.Client) *LiteTrainODFare1Params { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarCount(dollarCount *bool) *LiteTrainODFare1Params { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarFilter(dollarFilter *string) *LiteTrainODFare1Params { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarFormat(dollarFormat string) *LiteTrainODFare1Params { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarOrderby(dollarOrderby *string) *LiteTrainODFare1Params { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarSelect(dollarSelect *string) *LiteTrainODFare1Params { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarSkip(dollarSkip *string) *LiteTrainODFare1Params { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDollarTop(dollarTop *int64) *LiteTrainODFare1Params { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WithDestinationStationID adds the destinationStationID to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithDestinationStationID(destinationStationID string) *LiteTrainODFare1Params { + o.SetDestinationStationID(destinationStationID) + return o +} + +// SetDestinationStationID adds the destinationStationId to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetDestinationStationID(destinationStationID string) { + o.DestinationStationID = destinationStationID +} + +// WithOriginStationID adds the originStationID to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) WithOriginStationID(originStationID string) *LiteTrainODFare1Params { + o.SetOriginStationID(originStationID) + return o +} + +// SetOriginStationID adds the originStationId to the lite train o d fare 1 params +func (o *LiteTrainODFare1Params) SetOriginStationID(originStationID string) { + o.OriginStationID = originStationID +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainODFare1Params) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + // path param DestinationStationID + if err := r.SetPathParam("DestinationStationID", o.DestinationStationID); err != nil { + return err + } + + // path param OriginStationID + if err := r.SetPathParam("OriginStationID", o.OriginStationID); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_o_d_fare1_responses.go b/rail/v3/client/a_f_r/lite_train_o_d_fare1_responses.go new file mode 100644 index 00000000..c46015e1 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_o_d_fare1_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainODFare1Reader is a Reader for the LiteTrainODFare1 structure. +type LiteTrainODFare1Reader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainODFare1Reader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainODFare1OK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainODFare1NotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainODFare1OK creates a LiteTrainODFare1OK with default headers values +func NewLiteTrainODFare1OK() *LiteTrainODFare1OK { + return &LiteTrainODFare1OK{} +} + +/* LiteTrainODFare1OK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainODFare1OK struct { + Payload *models.PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare +} + +func (o *LiteTrainODFare1OK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/ODFare/{OriginStationID}/to/{DestinationStationID}][%d] liteTrainODFare1OK %+v", 200, o.Payload) +} +func (o *LiteTrainODFare1OK) GetPayload() *models.PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare { + return o.Payload +} + +func (o *LiteTrainODFare1OK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainODFare1NotModified creates a LiteTrainODFare1NotModified with default headers values +func NewLiteTrainODFare1NotModified() *LiteTrainODFare1NotModified { + return &LiteTrainODFare1NotModified{} +} + +/* LiteTrainODFare1NotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainODFare1NotModified struct { +} + +func (o *LiteTrainODFare1NotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/ODFare/{OriginStationID}/to/{DestinationStationID}][%d] liteTrainODFare1NotModified ", 304) +} + +func (o *LiteTrainODFare1NotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_o_d_fare_parameters.go b/rail/v3/client/a_f_r/lite_train_o_d_fare_parameters.go new file mode 100644 index 00000000..c566d4b5 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_o_d_fare_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainODFareParams creates a new LiteTrainODFareParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainODFareParams() *LiteTrainODFareParams { + return &LiteTrainODFareParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainODFareParamsWithTimeout creates a new LiteTrainODFareParams object +// with the ability to set a timeout on a request. +func NewLiteTrainODFareParamsWithTimeout(timeout time.Duration) *LiteTrainODFareParams { + return &LiteTrainODFareParams{ + timeout: timeout, + } +} + +// NewLiteTrainODFareParamsWithContext creates a new LiteTrainODFareParams object +// with the ability to set a context for a request. +func NewLiteTrainODFareParamsWithContext(ctx context.Context) *LiteTrainODFareParams { + return &LiteTrainODFareParams{ + Context: ctx, + } +} + +// NewLiteTrainODFareParamsWithHTTPClient creates a new LiteTrainODFareParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainODFareParamsWithHTTPClient(client *http.Client) *LiteTrainODFareParams { + return &LiteTrainODFareParams{ + HTTPClient: client, + } +} + +/* LiteTrainODFareParams contains all the parameters to send to the API endpoint + for the lite train o d fare operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainODFareParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train o d fare params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainODFareParams) WithDefaults() *LiteTrainODFareParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train o d fare params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainODFareParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainODFareParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train o d fare params +func (o *LiteTrainODFareParams) WithTimeout(timeout time.Duration) *LiteTrainODFareParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train o d fare params +func (o *LiteTrainODFareParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train o d fare params +func (o *LiteTrainODFareParams) WithContext(ctx context.Context) *LiteTrainODFareParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train o d fare params +func (o *LiteTrainODFareParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train o d fare params +func (o *LiteTrainODFareParams) WithHTTPClient(client *http.Client) *LiteTrainODFareParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train o d fare params +func (o *LiteTrainODFareParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarCount(dollarCount *bool) *LiteTrainODFareParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarFilter(dollarFilter *string) *LiteTrainODFareParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarFormat(dollarFormat string) *LiteTrainODFareParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainODFareParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarSelect(dollarSelect *string) *LiteTrainODFareParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarSkip(dollarSkip *string) *LiteTrainODFareParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train o d fare params +func (o *LiteTrainODFareParams) WithDollarTop(dollarTop *int64) *LiteTrainODFareParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train o d fare params +func (o *LiteTrainODFareParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainODFareParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_o_d_fare_responses.go b/rail/v3/client/a_f_r/lite_train_o_d_fare_responses.go new file mode 100644 index 00000000..c95710c2 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_o_d_fare_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainODFareReader is a Reader for the LiteTrainODFare structure. +type LiteTrainODFareReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainODFareReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainODFareOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainODFareNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainODFareOK creates a LiteTrainODFareOK with default headers values +func NewLiteTrainODFareOK() *LiteTrainODFareOK { + return &LiteTrainODFareOK{} +} + +/* LiteTrainODFareOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainODFareOK struct { + Payload *models.PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare +} + +func (o *LiteTrainODFareOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/ODFare][%d] liteTrainODFareOK %+v", 200, o.Payload) +} +func (o *LiteTrainODFareOK) GetPayload() *models.PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare { + return o.Payload +} + +func (o *LiteTrainODFareOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainODFareNotModified creates a LiteTrainODFareNotModified with default headers values +func NewLiteTrainODFareNotModified() *LiteTrainODFareNotModified { + return &LiteTrainODFareNotModified{} +} + +/* LiteTrainODFareNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainODFareNotModified struct { +} + +func (o *LiteTrainODFareNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/ODFare][%d] liteTrainODFareNotModified ", 304) +} + +func (o *LiteTrainODFareNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_operator_parameters.go b/rail/v3/client/a_f_r/lite_train_operator_parameters.go new file mode 100644 index 00000000..fdb9d014 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_operator_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainOperatorParams creates a new LiteTrainOperatorParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainOperatorParams() *LiteTrainOperatorParams { + return &LiteTrainOperatorParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainOperatorParamsWithTimeout creates a new LiteTrainOperatorParams object +// with the ability to set a timeout on a request. +func NewLiteTrainOperatorParamsWithTimeout(timeout time.Duration) *LiteTrainOperatorParams { + return &LiteTrainOperatorParams{ + timeout: timeout, + } +} + +// NewLiteTrainOperatorParamsWithContext creates a new LiteTrainOperatorParams object +// with the ability to set a context for a request. +func NewLiteTrainOperatorParamsWithContext(ctx context.Context) *LiteTrainOperatorParams { + return &LiteTrainOperatorParams{ + Context: ctx, + } +} + +// NewLiteTrainOperatorParamsWithHTTPClient creates a new LiteTrainOperatorParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainOperatorParamsWithHTTPClient(client *http.Client) *LiteTrainOperatorParams { + return &LiteTrainOperatorParams{ + HTTPClient: client, + } +} + +/* LiteTrainOperatorParams contains all the parameters to send to the API endpoint + for the lite train operator operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainOperatorParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train operator params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainOperatorParams) WithDefaults() *LiteTrainOperatorParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train operator params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainOperatorParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainOperatorParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train operator params +func (o *LiteTrainOperatorParams) WithTimeout(timeout time.Duration) *LiteTrainOperatorParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train operator params +func (o *LiteTrainOperatorParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train operator params +func (o *LiteTrainOperatorParams) WithContext(ctx context.Context) *LiteTrainOperatorParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train operator params +func (o *LiteTrainOperatorParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train operator params +func (o *LiteTrainOperatorParams) WithHTTPClient(client *http.Client) *LiteTrainOperatorParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train operator params +func (o *LiteTrainOperatorParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarCount(dollarCount *bool) *LiteTrainOperatorParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarFilter(dollarFilter *string) *LiteTrainOperatorParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarFormat(dollarFormat string) *LiteTrainOperatorParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainOperatorParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarSelect(dollarSelect *string) *LiteTrainOperatorParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarSkip(dollarSkip *string) *LiteTrainOperatorParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train operator params +func (o *LiteTrainOperatorParams) WithDollarTop(dollarTop *int64) *LiteTrainOperatorParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train operator params +func (o *LiteTrainOperatorParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainOperatorParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_operator_responses.go b/rail/v3/client/a_f_r/lite_train_operator_responses.go new file mode 100644 index 00000000..2155369f --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_operator_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainOperatorReader is a Reader for the LiteTrainOperator structure. +type LiteTrainOperatorReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainOperatorReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainOperatorOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainOperatorNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainOperatorOK creates a LiteTrainOperatorOK with default headers values +func NewLiteTrainOperatorOK() *LiteTrainOperatorOK { + return &LiteTrainOperatorOK{} +} + +/* LiteTrainOperatorOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainOperatorOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator +} + +func (o *LiteTrainOperatorOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Operator][%d] liteTrainOperatorOK %+v", 200, o.Payload) +} +func (o *LiteTrainOperatorOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator { + return o.Payload +} + +func (o *LiteTrainOperatorOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainOperatorNotModified creates a LiteTrainOperatorNotModified with default headers values +func NewLiteTrainOperatorNotModified() *LiteTrainOperatorNotModified { + return &LiteTrainOperatorNotModified{} +} + +/* LiteTrainOperatorNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainOperatorNotModified struct { +} + +func (o *LiteTrainOperatorNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Operator][%d] liteTrainOperatorNotModified ", 304) +} + +func (o *LiteTrainOperatorNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_route_parameters.go b/rail/v3/client/a_f_r/lite_train_route_parameters.go new file mode 100644 index 00000000..5c309da7 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_route_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainRouteParams creates a new LiteTrainRouteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainRouteParams() *LiteTrainRouteParams { + return &LiteTrainRouteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainRouteParamsWithTimeout creates a new LiteTrainRouteParams object +// with the ability to set a timeout on a request. +func NewLiteTrainRouteParamsWithTimeout(timeout time.Duration) *LiteTrainRouteParams { + return &LiteTrainRouteParams{ + timeout: timeout, + } +} + +// NewLiteTrainRouteParamsWithContext creates a new LiteTrainRouteParams object +// with the ability to set a context for a request. +func NewLiteTrainRouteParamsWithContext(ctx context.Context) *LiteTrainRouteParams { + return &LiteTrainRouteParams{ + Context: ctx, + } +} + +// NewLiteTrainRouteParamsWithHTTPClient creates a new LiteTrainRouteParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainRouteParamsWithHTTPClient(client *http.Client) *LiteTrainRouteParams { + return &LiteTrainRouteParams{ + HTTPClient: client, + } +} + +/* LiteTrainRouteParams contains all the parameters to send to the API endpoint + for the lite train route operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainRouteParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train route params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainRouteParams) WithDefaults() *LiteTrainRouteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train route params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainRouteParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainRouteParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train route params +func (o *LiteTrainRouteParams) WithTimeout(timeout time.Duration) *LiteTrainRouteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train route params +func (o *LiteTrainRouteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train route params +func (o *LiteTrainRouteParams) WithContext(ctx context.Context) *LiteTrainRouteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train route params +func (o *LiteTrainRouteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train route params +func (o *LiteTrainRouteParams) WithHTTPClient(client *http.Client) *LiteTrainRouteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train route params +func (o *LiteTrainRouteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train route params +func (o *LiteTrainRouteParams) WithDollarCount(dollarCount *bool) *LiteTrainRouteParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train route params +func (o *LiteTrainRouteParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train route params +func (o *LiteTrainRouteParams) WithDollarFilter(dollarFilter *string) *LiteTrainRouteParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train route params +func (o *LiteTrainRouteParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train route params +func (o *LiteTrainRouteParams) WithDollarFormat(dollarFormat string) *LiteTrainRouteParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train route params +func (o *LiteTrainRouteParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train route params +func (o *LiteTrainRouteParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainRouteParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train route params +func (o *LiteTrainRouteParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train route params +func (o *LiteTrainRouteParams) WithDollarSelect(dollarSelect *string) *LiteTrainRouteParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train route params +func (o *LiteTrainRouteParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train route params +func (o *LiteTrainRouteParams) WithDollarSkip(dollarSkip *string) *LiteTrainRouteParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train route params +func (o *LiteTrainRouteParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train route params +func (o *LiteTrainRouteParams) WithDollarTop(dollarTop *int64) *LiteTrainRouteParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train route params +func (o *LiteTrainRouteParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_route_responses.go b/rail/v3/client/a_f_r/lite_train_route_responses.go new file mode 100644 index 00000000..a8c74950 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_route_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainRouteReader is a Reader for the LiteTrainRoute structure. +type LiteTrainRouteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainRouteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainRouteNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainRouteOK creates a LiteTrainRouteOK with default headers values +func NewLiteTrainRouteOK() *LiteTrainRouteOK { + return &LiteTrainRouteOK{} +} + +/* LiteTrainRouteOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainRouteOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute +} + +func (o *LiteTrainRouteOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Route][%d] liteTrainRouteOK %+v", 200, o.Payload) +} +func (o *LiteTrainRouteOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute { + return o.Payload +} + +func (o *LiteTrainRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainRouteNotModified creates a LiteTrainRouteNotModified with default headers values +func NewLiteTrainRouteNotModified() *LiteTrainRouteNotModified { + return &LiteTrainRouteNotModified{} +} + +/* LiteTrainRouteNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainRouteNotModified struct { +} + +func (o *LiteTrainRouteNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Route][%d] liteTrainRouteNotModified ", 304) +} + +func (o *LiteTrainRouteNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_station_of_line_parameters.go b/rail/v3/client/a_f_r/lite_train_station_of_line_parameters.go new file mode 100644 index 00000000..daf30223 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_station_of_line_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainStationOfLineParams creates a new LiteTrainStationOfLineParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainStationOfLineParams() *LiteTrainStationOfLineParams { + return &LiteTrainStationOfLineParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainStationOfLineParamsWithTimeout creates a new LiteTrainStationOfLineParams object +// with the ability to set a timeout on a request. +func NewLiteTrainStationOfLineParamsWithTimeout(timeout time.Duration) *LiteTrainStationOfLineParams { + return &LiteTrainStationOfLineParams{ + timeout: timeout, + } +} + +// NewLiteTrainStationOfLineParamsWithContext creates a new LiteTrainStationOfLineParams object +// with the ability to set a context for a request. +func NewLiteTrainStationOfLineParamsWithContext(ctx context.Context) *LiteTrainStationOfLineParams { + return &LiteTrainStationOfLineParams{ + Context: ctx, + } +} + +// NewLiteTrainStationOfLineParamsWithHTTPClient creates a new LiteTrainStationOfLineParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainStationOfLineParamsWithHTTPClient(client *http.Client) *LiteTrainStationOfLineParams { + return &LiteTrainStationOfLineParams{ + HTTPClient: client, + } +} + +/* LiteTrainStationOfLineParams contains all the parameters to send to the API endpoint + for the lite train station of line operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainStationOfLineParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train station of line params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainStationOfLineParams) WithDefaults() *LiteTrainStationOfLineParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train station of line params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainStationOfLineParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainStationOfLineParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithTimeout(timeout time.Duration) *LiteTrainStationOfLineParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithContext(ctx context.Context) *LiteTrainStationOfLineParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithHTTPClient(client *http.Client) *LiteTrainStationOfLineParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarCount(dollarCount *bool) *LiteTrainStationOfLineParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarFilter(dollarFilter *string) *LiteTrainStationOfLineParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarFormat(dollarFormat string) *LiteTrainStationOfLineParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainStationOfLineParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarSelect(dollarSelect *string) *LiteTrainStationOfLineParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarSkip(dollarSkip *string) *LiteTrainStationOfLineParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train station of line params +func (o *LiteTrainStationOfLineParams) WithDollarTop(dollarTop *int64) *LiteTrainStationOfLineParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train station of line params +func (o *LiteTrainStationOfLineParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainStationOfLineParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_station_of_line_responses.go b/rail/v3/client/a_f_r/lite_train_station_of_line_responses.go new file mode 100644 index 00000000..295829e7 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_station_of_line_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainStationOfLineReader is a Reader for the LiteTrainStationOfLine structure. +type LiteTrainStationOfLineReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainStationOfLineReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainStationOfLineOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainStationOfLineNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainStationOfLineOK creates a LiteTrainStationOfLineOK with default headers values +func NewLiteTrainStationOfLineOK() *LiteTrainStationOfLineOK { + return &LiteTrainStationOfLineOK{} +} + +/* LiteTrainStationOfLineOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainStationOfLineOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine +} + +func (o *LiteTrainStationOfLineOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/StationOfLine][%d] liteTrainStationOfLineOK %+v", 200, o.Payload) +} +func (o *LiteTrainStationOfLineOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine { + return o.Payload +} + +func (o *LiteTrainStationOfLineOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainStationOfLineNotModified creates a LiteTrainStationOfLineNotModified with default headers values +func NewLiteTrainStationOfLineNotModified() *LiteTrainStationOfLineNotModified { + return &LiteTrainStationOfLineNotModified{} +} + +/* LiteTrainStationOfLineNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainStationOfLineNotModified struct { +} + +func (o *LiteTrainStationOfLineNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/StationOfLine][%d] liteTrainStationOfLineNotModified ", 304) +} + +func (o *LiteTrainStationOfLineNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_station_of_route_parameters.go b/rail/v3/client/a_f_r/lite_train_station_of_route_parameters.go new file mode 100644 index 00000000..3bec7ea3 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_station_of_route_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainStationOfRouteParams creates a new LiteTrainStationOfRouteParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainStationOfRouteParams() *LiteTrainStationOfRouteParams { + return &LiteTrainStationOfRouteParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainStationOfRouteParamsWithTimeout creates a new LiteTrainStationOfRouteParams object +// with the ability to set a timeout on a request. +func NewLiteTrainStationOfRouteParamsWithTimeout(timeout time.Duration) *LiteTrainStationOfRouteParams { + return &LiteTrainStationOfRouteParams{ + timeout: timeout, + } +} + +// NewLiteTrainStationOfRouteParamsWithContext creates a new LiteTrainStationOfRouteParams object +// with the ability to set a context for a request. +func NewLiteTrainStationOfRouteParamsWithContext(ctx context.Context) *LiteTrainStationOfRouteParams { + return &LiteTrainStationOfRouteParams{ + Context: ctx, + } +} + +// NewLiteTrainStationOfRouteParamsWithHTTPClient creates a new LiteTrainStationOfRouteParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainStationOfRouteParamsWithHTTPClient(client *http.Client) *LiteTrainStationOfRouteParams { + return &LiteTrainStationOfRouteParams{ + HTTPClient: client, + } +} + +/* LiteTrainStationOfRouteParams contains all the parameters to send to the API endpoint + for the lite train station of route operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainStationOfRouteParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train station of route params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainStationOfRouteParams) WithDefaults() *LiteTrainStationOfRouteParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train station of route params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainStationOfRouteParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainStationOfRouteParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithTimeout(timeout time.Duration) *LiteTrainStationOfRouteParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithContext(ctx context.Context) *LiteTrainStationOfRouteParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithHTTPClient(client *http.Client) *LiteTrainStationOfRouteParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarCount(dollarCount *bool) *LiteTrainStationOfRouteParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarFilter(dollarFilter *string) *LiteTrainStationOfRouteParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarFormat(dollarFormat string) *LiteTrainStationOfRouteParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainStationOfRouteParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarSelect(dollarSelect *string) *LiteTrainStationOfRouteParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarSkip(dollarSkip *string) *LiteTrainStationOfRouteParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) WithDollarTop(dollarTop *int64) *LiteTrainStationOfRouteParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train station of route params +func (o *LiteTrainStationOfRouteParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainStationOfRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_station_of_route_responses.go b/rail/v3/client/a_f_r/lite_train_station_of_route_responses.go new file mode 100644 index 00000000..2b465568 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_station_of_route_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainStationOfRouteReader is a Reader for the LiteTrainStationOfRoute structure. +type LiteTrainStationOfRouteReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainStationOfRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainStationOfRouteOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainStationOfRouteNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainStationOfRouteOK creates a LiteTrainStationOfRouteOK with default headers values +func NewLiteTrainStationOfRouteOK() *LiteTrainStationOfRouteOK { + return &LiteTrainStationOfRouteOK{} +} + +/* LiteTrainStationOfRouteOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainStationOfRouteOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute +} + +func (o *LiteTrainStationOfRouteOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/StationOfRoute][%d] liteTrainStationOfRouteOK %+v", 200, o.Payload) +} +func (o *LiteTrainStationOfRouteOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute { + return o.Payload +} + +func (o *LiteTrainStationOfRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainStationOfRouteNotModified creates a LiteTrainStationOfRouteNotModified with default headers values +func NewLiteTrainStationOfRouteNotModified() *LiteTrainStationOfRouteNotModified { + return &LiteTrainStationOfRouteNotModified{} +} + +/* LiteTrainStationOfRouteNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainStationOfRouteNotModified struct { +} + +func (o *LiteTrainStationOfRouteNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/StationOfRoute][%d] liteTrainStationOfRouteNotModified ", 304) +} + +func (o *LiteTrainStationOfRouteNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_station_parameters.go b/rail/v3/client/a_f_r/lite_train_station_parameters.go new file mode 100644 index 00000000..aa8f8977 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_station_parameters.go @@ -0,0 +1,406 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainStationParams creates a new LiteTrainStationParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainStationParams() *LiteTrainStationParams { + return &LiteTrainStationParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainStationParamsWithTimeout creates a new LiteTrainStationParams object +// with the ability to set a timeout on a request. +func NewLiteTrainStationParamsWithTimeout(timeout time.Duration) *LiteTrainStationParams { + return &LiteTrainStationParams{ + timeout: timeout, + } +} + +// NewLiteTrainStationParamsWithContext creates a new LiteTrainStationParams object +// with the ability to set a context for a request. +func NewLiteTrainStationParamsWithContext(ctx context.Context) *LiteTrainStationParams { + return &LiteTrainStationParams{ + Context: ctx, + } +} + +// NewLiteTrainStationParamsWithHTTPClient creates a new LiteTrainStationParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainStationParamsWithHTTPClient(client *http.Client) *LiteTrainStationParams { + return &LiteTrainStationParams{ + HTTPClient: client, + } +} + +/* LiteTrainStationParams contains all the parameters to send to the API endpoint + for the lite train station operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainStationParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarSpatialFilter. + + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) + */ + DollarSpatialFilter *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train station params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainStationParams) WithDefaults() *LiteTrainStationParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train station params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainStationParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainStationParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train station params +func (o *LiteTrainStationParams) WithTimeout(timeout time.Duration) *LiteTrainStationParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train station params +func (o *LiteTrainStationParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train station params +func (o *LiteTrainStationParams) WithContext(ctx context.Context) *LiteTrainStationParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train station params +func (o *LiteTrainStationParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train station params +func (o *LiteTrainStationParams) WithHTTPClient(client *http.Client) *LiteTrainStationParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train station params +func (o *LiteTrainStationParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train station params +func (o *LiteTrainStationParams) WithDollarCount(dollarCount *bool) *LiteTrainStationParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train station params +func (o *LiteTrainStationParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train station params +func (o *LiteTrainStationParams) WithDollarFilter(dollarFilter *string) *LiteTrainStationParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train station params +func (o *LiteTrainStationParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train station params +func (o *LiteTrainStationParams) WithDollarFormat(dollarFormat string) *LiteTrainStationParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train station params +func (o *LiteTrainStationParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train station params +func (o *LiteTrainStationParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainStationParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train station params +func (o *LiteTrainStationParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train station params +func (o *LiteTrainStationParams) WithDollarSelect(dollarSelect *string) *LiteTrainStationParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train station params +func (o *LiteTrainStationParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train station params +func (o *LiteTrainStationParams) WithDollarSkip(dollarSkip *string) *LiteTrainStationParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train station params +func (o *LiteTrainStationParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarSpatialFilter adds the dollarSpatialFilter to the lite train station params +func (o *LiteTrainStationParams) WithDollarSpatialFilter(dollarSpatialFilter *string) *LiteTrainStationParams { + o.SetDollarSpatialFilter(dollarSpatialFilter) + return o +} + +// SetDollarSpatialFilter adds the dollarSpatialFilter to the lite train station params +func (o *LiteTrainStationParams) SetDollarSpatialFilter(dollarSpatialFilter *string) { + o.DollarSpatialFilter = dollarSpatialFilter +} + +// WithDollarTop adds the dollarTop to the lite train station params +func (o *LiteTrainStationParams) WithDollarTop(dollarTop *int64) *LiteTrainStationParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train station params +func (o *LiteTrainStationParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainStationParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarSpatialFilter != nil { + + // query param $spatialFilter + var qrDollarSpatialFilter string + + if o.DollarSpatialFilter != nil { + qrDollarSpatialFilter = *o.DollarSpatialFilter + } + qDollarSpatialFilter := qrDollarSpatialFilter + if qDollarSpatialFilter != "" { + + if err := r.SetQueryParam("$spatialFilter", qDollarSpatialFilter); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_station_responses.go b/rail/v3/client/a_f_r/lite_train_station_responses.go new file mode 100644 index 00000000..b347fea3 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_station_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainStationReader is a Reader for the LiteTrainStation structure. +type LiteTrainStationReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainStationReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainStationOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainStationNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainStationOK creates a LiteTrainStationOK with default headers values +func NewLiteTrainStationOK() *LiteTrainStationOK { + return &LiteTrainStationOK{} +} + +/* LiteTrainStationOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainStationOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation +} + +func (o *LiteTrainStationOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Station][%d] liteTrainStationOK %+v", 200, o.Payload) +} +func (o *LiteTrainStationOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation { + return o.Payload +} + +func (o *LiteTrainStationOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainStationNotModified creates a LiteTrainStationNotModified with default headers values +func NewLiteTrainStationNotModified() *LiteTrainStationNotModified { + return &LiteTrainStationNotModified{} +} + +/* LiteTrainStationNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainStationNotModified struct { +} + +func (o *LiteTrainStationNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/Station][%d] liteTrainStationNotModified ", 304) +} + +func (o *LiteTrainStationNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_train_type_parameters.go b/rail/v3/client/a_f_r/lite_train_train_type_parameters.go new file mode 100644 index 00000000..6a067815 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_train_type_parameters.go @@ -0,0 +1,372 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// NewLiteTrainTrainTypeParams creates a new LiteTrainTrainTypeParams object, +// with the default timeout for this client. +// +// Default values are not hydrated, since defaults are normally applied by the API server side. +// +// To enforce default values in parameter, use SetDefaults or WithDefaults. +func NewLiteTrainTrainTypeParams() *LiteTrainTrainTypeParams { + return &LiteTrainTrainTypeParams{ + timeout: cr.DefaultTimeout, + } +} + +// NewLiteTrainTrainTypeParamsWithTimeout creates a new LiteTrainTrainTypeParams object +// with the ability to set a timeout on a request. +func NewLiteTrainTrainTypeParamsWithTimeout(timeout time.Duration) *LiteTrainTrainTypeParams { + return &LiteTrainTrainTypeParams{ + timeout: timeout, + } +} + +// NewLiteTrainTrainTypeParamsWithContext creates a new LiteTrainTrainTypeParams object +// with the ability to set a context for a request. +func NewLiteTrainTrainTypeParamsWithContext(ctx context.Context) *LiteTrainTrainTypeParams { + return &LiteTrainTrainTypeParams{ + Context: ctx, + } +} + +// NewLiteTrainTrainTypeParamsWithHTTPClient creates a new LiteTrainTrainTypeParams object +// with the ability to set a custom HTTPClient for a request. +func NewLiteTrainTrainTypeParamsWithHTTPClient(client *http.Client) *LiteTrainTrainTypeParams { + return &LiteTrainTrainTypeParams{ + HTTPClient: client, + } +} + +/* LiteTrainTrainTypeParams contains all the parameters to send to the API endpoint + for the lite train train type operation. + + Typically these are written to a http.Request. +*/ +type LiteTrainTrainTypeParams struct { + + /* DollarCount. + + 查詢數量 + */ + DollarCount *bool + + /* DollarFilter. + + 過濾 + */ + DollarFilter *string + + /* DollarFormat. + + 指定來源格式 + */ + DollarFormat string + + /* DollarOrderby. + + 排序 + */ + DollarOrderby *string + + /* DollarSelect. + + 挑選 + */ + DollarSelect *string + + /* DollarSkip. + + 跳過前幾筆 + */ + DollarSkip *string + + /* DollarTop. + + 取前幾筆 + + Default: 30 + */ + DollarTop *int64 + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithDefaults hydrates default values in the lite train train type params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainTrainTypeParams) WithDefaults() *LiteTrainTrainTypeParams { + o.SetDefaults() + return o +} + +// SetDefaults hydrates default values in the lite train train type params (not the query body). +// +// All values with no default are reset to their zero value. +func (o *LiteTrainTrainTypeParams) SetDefaults() { + var ( + dollarTopDefault = int64(30) + ) + + val := LiteTrainTrainTypeParams{ + DollarTop: &dollarTopDefault, + } + + val.timeout = o.timeout + val.Context = o.Context + val.HTTPClient = o.HTTPClient + *o = val +} + +// WithTimeout adds the timeout to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithTimeout(timeout time.Duration) *LiteTrainTrainTypeParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithContext(ctx context.Context) *LiteTrainTrainTypeParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithHTTPClient(client *http.Client) *LiteTrainTrainTypeParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithDollarCount adds the dollarCount to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarCount(dollarCount *bool) *LiteTrainTrainTypeParams { + o.SetDollarCount(dollarCount) + return o +} + +// SetDollarCount adds the dollarCount to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarCount(dollarCount *bool) { + o.DollarCount = dollarCount +} + +// WithDollarFilter adds the dollarFilter to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarFilter(dollarFilter *string) *LiteTrainTrainTypeParams { + o.SetDollarFilter(dollarFilter) + return o +} + +// SetDollarFilter adds the dollarFilter to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarFilter(dollarFilter *string) { + o.DollarFilter = dollarFilter +} + +// WithDollarFormat adds the dollarFormat to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarFormat(dollarFormat string) *LiteTrainTrainTypeParams { + o.SetDollarFormat(dollarFormat) + return o +} + +// SetDollarFormat adds the dollarFormat to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarFormat(dollarFormat string) { + o.DollarFormat = dollarFormat +} + +// WithDollarOrderby adds the dollarOrderby to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarOrderby(dollarOrderby *string) *LiteTrainTrainTypeParams { + o.SetDollarOrderby(dollarOrderby) + return o +} + +// SetDollarOrderby adds the dollarOrderby to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarOrderby(dollarOrderby *string) { + o.DollarOrderby = dollarOrderby +} + +// WithDollarSelect adds the dollarSelect to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarSelect(dollarSelect *string) *LiteTrainTrainTypeParams { + o.SetDollarSelect(dollarSelect) + return o +} + +// SetDollarSelect adds the dollarSelect to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarSelect(dollarSelect *string) { + o.DollarSelect = dollarSelect +} + +// WithDollarSkip adds the dollarSkip to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarSkip(dollarSkip *string) *LiteTrainTrainTypeParams { + o.SetDollarSkip(dollarSkip) + return o +} + +// SetDollarSkip adds the dollarSkip to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarSkip(dollarSkip *string) { + o.DollarSkip = dollarSkip +} + +// WithDollarTop adds the dollarTop to the lite train train type params +func (o *LiteTrainTrainTypeParams) WithDollarTop(dollarTop *int64) *LiteTrainTrainTypeParams { + o.SetDollarTop(dollarTop) + return o +} + +// SetDollarTop adds the dollarTop to the lite train train type params +func (o *LiteTrainTrainTypeParams) SetDollarTop(dollarTop *int64) { + o.DollarTop = dollarTop +} + +// WriteToRequest writes these params to a swagger request +func (o *LiteTrainTrainTypeParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if o.DollarCount != nil { + + // query param $count + var qrDollarCount bool + + if o.DollarCount != nil { + qrDollarCount = *o.DollarCount + } + qDollarCount := swag.FormatBool(qrDollarCount) + if qDollarCount != "" { + + if err := r.SetQueryParam("$count", qDollarCount); err != nil { + return err + } + } + } + + if o.DollarFilter != nil { + + // query param $filter + var qrDollarFilter string + + if o.DollarFilter != nil { + qrDollarFilter = *o.DollarFilter + } + qDollarFilter := qrDollarFilter + if qDollarFilter != "" { + + if err := r.SetQueryParam("$filter", qDollarFilter); err != nil { + return err + } + } + } + + // query param $format + qrDollarFormat := o.DollarFormat + qDollarFormat := qrDollarFormat + if qDollarFormat != "" { + + if err := r.SetQueryParam("$format", qDollarFormat); err != nil { + return err + } + } + + if o.DollarOrderby != nil { + + // query param $orderby + var qrDollarOrderby string + + if o.DollarOrderby != nil { + qrDollarOrderby = *o.DollarOrderby + } + qDollarOrderby := qrDollarOrderby + if qDollarOrderby != "" { + + if err := r.SetQueryParam("$orderby", qDollarOrderby); err != nil { + return err + } + } + } + + if o.DollarSelect != nil { + + // query param $select + var qrDollarSelect string + + if o.DollarSelect != nil { + qrDollarSelect = *o.DollarSelect + } + qDollarSelect := qrDollarSelect + if qDollarSelect != "" { + + if err := r.SetQueryParam("$select", qDollarSelect); err != nil { + return err + } + } + } + + if o.DollarSkip != nil { + + // query param $skip + var qrDollarSkip string + + if o.DollarSkip != nil { + qrDollarSkip = *o.DollarSkip + } + qDollarSkip := qrDollarSkip + if qDollarSkip != "" { + + if err := r.SetQueryParam("$skip", qDollarSkip); err != nil { + return err + } + } + } + + if o.DollarTop != nil { + + // query param $top + var qrDollarTop int64 + + if o.DollarTop != nil { + qrDollarTop = *o.DollarTop + } + qDollarTop := swag.FormatInt64(qrDollarTop) + if qDollarTop != "" { + + if err := r.SetQueryParam("$top", qDollarTop); err != nil { + return err + } + } + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/rail/v3/client/a_f_r/lite_train_train_type_responses.go b/rail/v3/client/a_f_r/lite_train_train_type_responses.go new file mode 100644 index 00000000..3b68f6e3 --- /dev/null +++ b/rail/v3/client/a_f_r/lite_train_train_type_responses.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package a_f_r + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + + "github.com/minchao/go-ptx/rail/v3/models" +) + +// LiteTrainTrainTypeReader is a Reader for the LiteTrainTrainType structure. +type LiteTrainTrainTypeReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *LiteTrainTrainTypeReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewLiteTrainTrainTypeOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + case 304: + result := NewLiteTrainTrainTypeNotModified() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result + default: + return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code()) + } +} + +// NewLiteTrainTrainTypeOK creates a LiteTrainTrainTypeOK with default headers values +func NewLiteTrainTrainTypeOK() *LiteTrainTrainTypeOK { + return &LiteTrainTrainTypeOK{} +} + +/* LiteTrainTrainTypeOK describes a response with status code 200, with default header values. + +Success +*/ +type LiteTrainTrainTypeOK struct { + Payload *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType +} + +func (o *LiteTrainTrainTypeOK) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/TrainType][%d] liteTrainTrainTypeOK %+v", 200, o.Payload) +} +func (o *LiteTrainTrainTypeOK) GetPayload() *models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType { + return o.Payload +} + +func (o *LiteTrainTrainTypeOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewLiteTrainTrainTypeNotModified creates a LiteTrainTrainTypeNotModified with default headers values +func NewLiteTrainTrainTypeNotModified() *LiteTrainTrainTypeNotModified { + return &LiteTrainTrainTypeNotModified{} +} + +/* LiteTrainTrainTypeNotModified describes a response with status code 304, with default header values. + +服務端會在Response加上Last-Modified header,表示最近的更新時間。客戶端能利用此時間,於Request加上If-Modified-Since header,若沒有更新,服務端會回應304 StatusCode且空值Content +*/ +type LiteTrainTrainTypeNotModified struct { +} + +func (o *LiteTrainTrainTypeNotModified) Error() string { + return fmt.Sprintf("[GET /v3/Rail/AFR/TrainType][%d] liteTrainTrainTypeNotModified ", 304) +} + +func (o *LiteTrainTrainTypeNotModified) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + return nil +} diff --git a/rail/v3/client/m_o_t_c_transport_api_v3_client.go b/rail/v3/client/m_o_t_c_transport_api_v3_client.go index c6961722..688158da 100644 --- a/rail/v3/client/m_o_t_c_transport_api_v3_client.go +++ b/rail/v3/client/m_o_t_c_transport_api_v3_client.go @@ -10,6 +10,7 @@ import ( httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" + "github.com/minchao/go-ptx/rail/v3/client/a_f_r" "github.com/minchao/go-ptx/rail/v3/client/t_r_a" ) @@ -55,6 +56,7 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *MOTCTransp cli := new(MOTCTransportAPIV3) cli.Transport = transport + cli.Afr = a_f_r.New(transport, formats) cli.Tra = t_r_a.New(transport, formats) return cli } @@ -100,6 +102,8 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // MOTCTransportAPIV3 is a client for m o t c transport API v3 type MOTCTransportAPIV3 struct { + Afr a_f_r.ClientService + Tra t_r_a.ClientService Transport runtime.ClientTransport @@ -108,5 +112,6 @@ type MOTCTransportAPIV3 struct { // SetTransport changes the transport on the client and all its subresources func (c *MOTCTransportAPIV3) SetTransport(transport runtime.ClientTransport) { c.Transport = transport + c.Afr.SetTransport(transport) c.Tra.SetTransport(transport) } diff --git a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_parameters.go b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_parameters.go index 4e8c79b3..4432a671 100644 --- a/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_parameters.go +++ b/rail/v3/client/t_r_a/daily_station_time_table_api_controller_get2_parameters.go @@ -107,8 +107,10 @@ type DailyStationTimeTableAPIControllerGet2Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -252,13 +254,13 @@ func (o *DailyStationTimeTableAPIControllerGet2Params) SetDollarTop(dollarTop *i } // WithTrainDate adds the trainDate to the daily station time table Api controller get 2 params -func (o *DailyStationTimeTableAPIControllerGet2Params) WithTrainDate(trainDate string) *DailyStationTimeTableAPIControllerGet2Params { +func (o *DailyStationTimeTableAPIControllerGet2Params) WithTrainDate(trainDate strfmt.DateTime) *DailyStationTimeTableAPIControllerGet2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the daily station time table Api controller get 2 params -func (o *DailyStationTimeTableAPIControllerGet2Params) SetTrainDate(trainDate string) { +func (o *DailyStationTimeTableAPIControllerGet2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -383,7 +385,7 @@ func (o *DailyStationTimeTableAPIControllerGet2Params) WriteToRequest(r runtime. } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_parameters.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_parameters.go index b7aaacd9..f54d4fea 100644 --- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_parameters.go +++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get2_parameters.go @@ -107,8 +107,10 @@ type DailyTrainTimeTableAPIControllerGet2Params struct { /* TrainDate. 欲查詢車次的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -252,13 +254,13 @@ func (o *DailyTrainTimeTableAPIControllerGet2Params) SetDollarTop(dollarTop *int } // WithTrainDate adds the trainDate to the daily train time table Api controller get 2 params -func (o *DailyTrainTimeTableAPIControllerGet2Params) WithTrainDate(trainDate string) *DailyTrainTimeTableAPIControllerGet2Params { +func (o *DailyTrainTimeTableAPIControllerGet2Params) WithTrainDate(trainDate strfmt.DateTime) *DailyTrainTimeTableAPIControllerGet2Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the daily train time table Api controller get 2 params -func (o *DailyTrainTimeTableAPIControllerGet2Params) SetTrainDate(trainDate string) { +func (o *DailyTrainTimeTableAPIControllerGet2Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -383,7 +385,7 @@ func (o *DailyTrainTimeTableAPIControllerGet2Params) WriteToRequest(r runtime.Cl } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_parameters.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_parameters.go index b0dc76bc..95a59269 100644 --- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_parameters.go +++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get3_parameters.go @@ -119,8 +119,10 @@ type DailyTrainTimeTableAPIControllerGet3Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -286,13 +288,13 @@ func (o *DailyTrainTimeTableAPIControllerGet3Params) SetOriginStationID(originSt } // WithTrainDate adds the trainDate to the daily train time table Api controller get 3 params -func (o *DailyTrainTimeTableAPIControllerGet3Params) WithTrainDate(trainDate string) *DailyTrainTimeTableAPIControllerGet3Params { +func (o *DailyTrainTimeTableAPIControllerGet3Params) WithTrainDate(trainDate strfmt.DateTime) *DailyTrainTimeTableAPIControllerGet3Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the daily train time table Api controller get 3 params -func (o *DailyTrainTimeTableAPIControllerGet3Params) SetTrainDate(trainDate string) { +func (o *DailyTrainTimeTableAPIControllerGet3Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -427,7 +429,7 @@ func (o *DailyTrainTimeTableAPIControllerGet3Params) WriteToRequest(r runtime.Cl } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_parameters.go b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_parameters.go index e98e9cf8..43cd3641 100644 --- a/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_parameters.go +++ b/rail/v3/client/t_r_a/daily_train_time_table_api_controller_get4_parameters.go @@ -119,8 +119,10 @@ type DailyTrainTimeTableAPIControllerGet4Params struct { /* TrainDate. 欲查詢的日期(格式: yyyy-MM-dd) + + Format: date-time */ - TrainDate string + TrainDate strfmt.DateTime timeout time.Duration Context context.Context @@ -286,13 +288,13 @@ func (o *DailyTrainTimeTableAPIControllerGet4Params) SetOriginStationID(originSt } // WithTrainDate adds the trainDate to the daily train time table Api controller get 4 params -func (o *DailyTrainTimeTableAPIControllerGet4Params) WithTrainDate(trainDate string) *DailyTrainTimeTableAPIControllerGet4Params { +func (o *DailyTrainTimeTableAPIControllerGet4Params) WithTrainDate(trainDate strfmt.DateTime) *DailyTrainTimeTableAPIControllerGet4Params { o.SetTrainDate(trainDate) return o } // SetTrainDate adds the trainDate to the daily train time table Api controller get 4 params -func (o *DailyTrainTimeTableAPIControllerGet4Params) SetTrainDate(trainDate string) { +func (o *DailyTrainTimeTableAPIControllerGet4Params) SetTrainDate(trainDate strfmt.DateTime) { o.TrainDate = trainDate } @@ -427,7 +429,7 @@ func (o *DailyTrainTimeTableAPIControllerGet4Params) WriteToRequest(r runtime.Cl } // path param TrainDate - if err := r.SetPathParam("TrainDate", o.TrainDate); err != nil { + if err := r.SetPathParam("TrainDate", o.TrainDate.String()); err != nil { return err } diff --git a/rail/v3/client/t_r_a/station_api_controller_get_parameters.go b/rail/v3/client/t_r_a/station_api_controller_get_parameters.go index 89076c75..150dc7a0 100644 --- a/rail/v3/client/t_r_a/station_api_controller_get_parameters.go +++ b/rail/v3/client/t_r_a/station_api_controller_get_parameters.go @@ -98,7 +98,7 @@ type StationAPIControllerGetParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go new file mode 100644 index 00000000..bc88a2eb --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine LiteTrainLineList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Line] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + Lines []*PTXServiceDTORailSpecificationV3LiteTrainLine "json:\"Lines\" xml:\"List`1\"" + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train line +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLines(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) validateLines(formats strfmt.Registry) error { + + if err := validate.Required("Lines", "body", m.Lines); err != nil { + return err + } + + for i := 0; i < len(m.Lines); i++ { + if swag.IsZero(m.Lines[i]) { // not required + continue + } + + if m.Lines[i] != nil { + if err := m.Lines[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train line based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLines(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) contextValidateLines(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Lines); i++ { + + if m.Lines[i] != nil { + if err := m.Lines[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainLine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go new file mode 100644 index 00000000..78639830 --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork LiteTrainNetworkList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Network] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + Networks []*PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork "json:\"Networks\" xml:\"List`1\"" + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train network network +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworks(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateNetworks(formats strfmt.Registry) error { + + if err := validate.Required("Networks", "body", m.Networks); err != nil { + return err + } + + for i := 0; i < len(m.Networks); i++ { + if swag.IsZero(m.Networks[i]) { // not required + continue + } + + if m.Networks[i] != nil { + if err := m.Networks[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train network network based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNetworks(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) contextValidateNetworks(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Networks); i++ { + + if m.Networks[i] != nil { + if err := m.Networks[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Networks" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go new file mode 100644 index 00000000..15d231dd --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator LiteTrainOperatorList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Operator] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + Operators []*PTXServiceDTORailSpecificationV3LiteTrainOperator "json:\"Operators\" xml:\"List`1\"" + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train operator +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperators(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) validateOperators(formats strfmt.Registry) error { + + if err := validate.Required("Operators", "body", m.Operators); err != nil { + return err + } + + for i := 0; i < len(m.Operators); i++ { + if swag.IsZero(m.Operators[i]) { // not required + continue + } + + if m.Operators[i] != nil { + if err := m.Operators[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Operators" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train operator based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOperators(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) contextValidateOperators(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Operators); i++ { + + if m.Operators[i] != nil { + if err := m.Operators[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Operators" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainOperator + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go new file mode 100644 index 00000000..3c43c043 --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute LiteTrainRouteList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Route] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + Routes []*PTXServiceDTORailSpecificationV3LiteTrainRoute "json:\"Routes\" xml:\"List`1\"" + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train route +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRoutes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) validateRoutes(formats strfmt.Registry) error { + + if err := validate.Required("Routes", "body", m.Routes); err != nil { + return err + } + + for i := 0; i < len(m.Routes); i++ { + if swag.IsZero(m.Routes[i]) { // not required + continue + } + + if m.Routes[i] != nil { + if err := m.Routes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Routes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train route based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRoutes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) contextValidateRoutes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Routes); i++ { + + if m.Routes[i] != nil { + if err := m.Routes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Routes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainRoute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go new file mode 100644 index 00000000..32167f5d --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation LiteTrainStationList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Station] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Array + // + // 資料(陣列) + // Required: true + Stations []*PTXServiceDTORailSpecificationV3LiteTrainStation "json:\"Stations\" xml:\"List`1\"" + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train station +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStations(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) validateStations(formats strfmt.Registry) error { + + if err := validate.Required("Stations", "body", m.Stations); err != nil { + return err + } + + for i := 0; i < len(m.Stations); i++ { + if swag.IsZero(m.Stations[i]) { // not required + continue + } + + if m.Stations[i] != nil { + if err := m.Stations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train station based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStations(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) contextValidateStations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Stations); i++ { + + if m.Stations[i] != nil { + if err := m.Stations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go new file mode 100644 index 00000000..9941b41c --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine LiteTrainStationOfLineList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.StationOfLine] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Array + // + // 資料(陣列) + // Required: true + StationOfLines []*PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine "json:\"StationOfLines\" xml:\"List`1\"" + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train station of line station of line +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationOfLines(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateStationOfLines(formats strfmt.Registry) error { + + if err := validate.Required("StationOfLines", "body", m.StationOfLines); err != nil { + return err + } + + for i := 0; i < len(m.StationOfLines); i++ { + if swag.IsZero(m.StationOfLines[i]) { // not required + continue + } + + if m.StationOfLines[i] != nil { + if err := m.StationOfLines[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StationOfLines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train station of line station of line based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationOfLines(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) contextValidateStationOfLines(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.StationOfLines); i++ { + + if m.StationOfLines[i] != nil { + if err := m.StationOfLines[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StationOfLines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go new file mode 100644 index 00000000..0e0cbef0 --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute LiteTrainStationOfRouteList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.StationOfRoute] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Array + // + // 資料(陣列) + // Required: true + StationOfRoutes []*PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute "json:\"StationOfRoutes\" xml:\"List`1\"" + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train station of route station of route +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationOfRoutes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateStationOfRoutes(formats strfmt.Registry) error { + + if err := validate.Required("StationOfRoutes", "body", m.StationOfRoutes); err != nil { + return err + } + + for i := 0; i < len(m.StationOfRoutes); i++ { + if swag.IsZero(m.StationOfRoutes[i]) { // not required + continue + } + + if m.StationOfRoutes[i] != nil { + if err := m.StationOfRoutes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StationOfRoutes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train station of route station of route based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationOfRoutes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) contextValidateStationOfRoutes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.StationOfRoutes); i++ { + + if m.StationOfRoutes[i] != nil { + if err := m.StationOfRoutes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StationOfRoutes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go new file mode 100644 index 00000000..7aeb6433 --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType LiteTrainTrainTypeList +// +// swagger:model PTX.API.Rail.Model.LiteTrainBaseWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.TrainType] +type PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Array + // + // 資料(陣列) + // Required: true + TrainTypes []*PTXServiceDTORailSpecificationV3LiteTrainTrainType "json:\"TrainTypes\" xml:\"List`1\"" + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train train type +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainTypes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) validateTrainTypes(formats strfmt.Registry) error { + + if err := validate.Required("TrainTypes", "body", m.TrainTypes); err != nil { + return err + } + + for i := 0; i < len(m.TrainTypes); i++ { + if swag.IsZero(m.TrainTypes[i]) { // not required + continue + } + + if m.TrainTypes[i] != nil { + if err := m.TrainTypes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TrainTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train base wrapper p t x service d t o rail specification v3 lite train train type based on the context it is used +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTrainTypes(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) contextValidateTrainTypes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TrainTypes); i++ { + + if m.TrainTypes[i] != nil { + if err := m.TrainTypes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TrainTypes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainBaseWrapperPTXServiceDTORailSpecificationV3LiteTrainTrainType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go new file mode 100644 index 00000000..265dc04a --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go @@ -0,0 +1,282 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable LiteTrainGeneralTrainTimetableList +// +// swagger:model PTX.API.Rail.Model.LiteTrainGeneralTrainWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable] +type PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // DateTime + // + // 有效起始日期 + // Required: true + // Format: date-time + EffectiveDate *strfmt.DateTime `json:"EffectiveDate"` + + // 有效終止日期 + // Format: date-time + ExpireDate strfmt.DateTime `json:"ExpireDate,omitempty"` + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // String + // + // 來源版號 + SrcVersion string `json:"SrcVersion,omitempty" xml:"String,omitempty"` + + // String + // + // 定期性站別時刻表名稱 + TimetableName string `json:"TimetableName,omitempty" xml:"String,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + TrainTimetables []*PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable "json:\"TrainTimetables\" xml:\"List`1\"" + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` + + // String + // + // 時刻表適用情形說明 + ValidityDesciption string `json:"ValidityDesciption,omitempty" xml:"String,omitempty"` +} + +// Validate validates this p t x API rail model lite train general train wrapper p t x service d t o rail specification v3 lite train general train timetable +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEffectiveDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExpireDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainTimetables(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateEffectiveDate(formats strfmt.Registry) error { + + if err := validate.Required("EffectiveDate", "body", m.EffectiveDate); err != nil { + return err + } + + if err := validate.FormatOf("EffectiveDate", "body", "date-time", m.EffectiveDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateExpireDate(formats strfmt.Registry) error { + if swag.IsZero(m.ExpireDate) { // not required + return nil + } + + if err := validate.FormatOf("ExpireDate", "body", "date-time", m.ExpireDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateTrainTimetables(formats strfmt.Registry) error { + + if err := validate.Required("TrainTimetables", "body", m.TrainTimetables); err != nil { + return err + } + + for i := 0; i < len(m.TrainTimetables); i++ { + if swag.IsZero(m.TrainTimetables[i]) { // not required + continue + } + + if m.TrainTimetables[i] != nil { + if err := m.TrainTimetables[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TrainTimetables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train general train wrapper p t x service d t o rail specification v3 lite train general train timetable based on the context it is used +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTrainTimetables(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) contextValidateTrainTimetables(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.TrainTimetables); i++ { + + if m.TrainTimetables[i] != nil { + if err := m.TrainTimetables[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("TrainTimetables" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainGeneralTrainWrapperPTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go new file mode 100644 index 00000000..b6dcc259 --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go @@ -0,0 +1,238 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare LiteTrainODFareList +// +// swagger:model PTX.API.Rail.Model.LiteTrainODFareWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare] +type PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // String + // + // 有效起始日期 + EffectiveDate string `json:"EffectiveDate,omitempty" xml:"String,omitempty"` + + // String + // + // 有效終止日期 + ExpireDate string `json:"ExpireDate,omitempty" xml:"String,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + ODFares []*PTXServiceDTORailSpecificationV3LiteTrainODFareODFare "json:\"ODFares\" xml:\"List`1\"" + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // String + // + // 資料版本 + SrcVersion string `json:"SrcVersion,omitempty" xml:"String,omitempty"` + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train o d fare wrapper p t x service d t o rail specification v3 lite train o d fare o d fare +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateODFares(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateODFares(formats strfmt.Registry) error { + + if err := validate.Required("ODFares", "body", m.ODFares); err != nil { + return err + } + + for i := 0; i < len(m.ODFares); i++ { + if swag.IsZero(m.ODFares[i]) { // not required + continue + } + + if m.ODFares[i] != nil { + if err := m.ODFares[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ODFares" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train o d fare wrapper p t x service d t o rail specification v3 lite train o d fare o d fare based on the context it is used +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateODFares(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) contextValidateODFares(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.ODFares); i++ { + + if m.ODFares[i] != nil { + if err := m.ODFares[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("ODFares" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainODFareWrapperPTXServiceDTORailSpecificationV3LiteTrainODFareODFare + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_lite_train_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go b/rail/v3/models/p_t_x_api_rail_model_lite_train_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go new file mode 100644 index 00000000..478412a7 --- /dev/null +++ b/rail/v3/models/p_t_x_api_rail_model_lite_train_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews LiteTrainNewsList +// +// swagger:model PTX.API.Rail.Model.LiteTrainRealTimeWrapper[PTX.Service.DTO.Rail.Specification.V3.LiteTrain.LiteTrainNewsList.News] +type PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews struct { + + // String + // + // 業管機關簡碼 + // Required: true + AuthorityCode *string `json:"AuthorityCode" xml:"String"` + + // 資料總筆數 + Count int64 `json:"Count,omitempty"` + + // Array + // + // 資料(陣列) + // Required: true + Newses []*PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews "json:\"Newses\" xml:\"List`1\"" + + // Int32 + // + // 來源端平台資料更新週期(秒)['-1: 不定期更新'] + // Required: true + SrcUpdateInterval *int32 `json:"SrcUpdateInterval"` + + // DateTime + // + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` + + // Int32 + // + // 本平台資料更新週期(秒) + // Required: true + UpdateInterval *int32 `json:"UpdateInterval"` + + // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x API rail model lite train real time wrapper p t x service d t o rail specification v3 lite train lite train news list news +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateAuthorityCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNewses(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateInterval(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateAuthorityCode(formats strfmt.Registry) error { + + if err := validate.Required("AuthorityCode", "body", m.AuthorityCode); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateNewses(formats strfmt.Registry) error { + + if err := validate.Required("Newses", "body", m.Newses); err != nil { + return err + } + + for i := 0; i < len(m.Newses); i++ { + if swag.IsZero(m.Newses[i]) { // not required + continue + } + + if m.Newses[i] != nil { + if err := m.Newses[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Newses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateSrcUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateInterval", "body", m.SrcUpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateSrcUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("SrcUpdateTime", "body", m.SrcUpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateUpdateInterval(formats strfmt.Registry) error { + + if err := validate.Required("UpdateInterval", "body", m.UpdateInterval); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x API rail model lite train real time wrapper p t x service d t o rail specification v3 lite train lite train news list news based on the context it is used +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateNewses(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) contextValidateNewses(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Newses); i++ { + + if m.Newses[i] != nil { + if err := m.Newses[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Newses" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) UnmarshalBinary(b []byte) error { + var res PTXAPIRailModelLiteTrainRealTimeWrapperPTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line.go index fafcf33c..00438540 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALine struct // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALine struct // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a line @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALine) v return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALine) v return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_network_line_network.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_network_line_network.go index 67b9f879..a51a18a6 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_network_line_network.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_network_line_network.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineNetwork // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineNetwork // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a line network line network @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineNet return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineNet return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_transfer.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_transfer.go index cfd71837..25dca1a5 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_transfer.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_line_transfer.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineTransfe // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineTransfe // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a line transfer @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineTra return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRALineTra return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_network_network.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_network_network.go index 98908e9c..26f74240 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_network_network.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_network_network.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRANetworkNetw // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRANetworkNetw // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a network network @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRANetwork return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRANetwork return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_operator.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_operator.go index 22e8052e..508f5392 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_operator.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_operator.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAOperator st // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAOperator st // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a operator @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAOperato return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAOperato return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go index fce70e2f..22f3042a 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAShape struc // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAShape struc // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a shape @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAShape) return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAShape) return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station.go index ba770c5b..c3a02c63 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation str // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation str // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a station @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_exit_station_exit.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_exit_station_exit.go index 5247ed29..1b80d467 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_exit_station_exit.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_exit_station_exit.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationExit // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationExit // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a station exit station exit @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_facility_station_facility.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_facility_station_facility.go index c0a5be7f..5caf84ee 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_facility_station_facility.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_facility_station_facility.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationFaci // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationFaci // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a station facility station facility @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_of_line_station_of_line.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_of_line_station_of_line.go index 03ab5fd4..23f31354 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_of_line_station_of_line.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_of_line_station_of_line.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationOfLi // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationOfLi // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a station of line station of line @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_transfer_station_transfer.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_transfer_station_transfer.go index bd6dbe74..abc62237 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_transfer_station_transfer.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_station_transfer_station_transfer.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationTran // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStationTran // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a station transfer station transfer @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRAStation return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_train_type.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_train_type.go index 1f7bda66..3fd3944c 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_train_type.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_base_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_train_type.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRATrainType s // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRATrainType s // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a base wrapper p t x service d t o rail specification v3 t r a train type @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRATrainTy return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRABaseWrapperPTXServiceDTORailSpecificationV3TRATrainTy return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go index 0ccc0833..e130de3d 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go @@ -33,12 +33,12 @@ type PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3TRAG // // 有效起始日期 // Required: true - EffectiveDate *string `json:"EffectiveDate"` + // Format: date-time + EffectiveDate *strfmt.DateTime `json:"EffectiveDate"` - // DateTime - // // 有效終止日期 - ExpireDate string `json:"ExpireDate,omitempty"` + // Format: date-time + ExpireDate strfmt.DateTime `json:"ExpireDate,omitempty"` // Int32 // @@ -50,7 +50,8 @@ type PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3TRAG // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -74,11 +75,10 @@ type PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3TRAG // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // @@ -98,6 +98,10 @@ func (m *PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3 res = append(res, err) } + if err := m.validateExpireDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateSrcUpdateInterval(formats); err != nil { res = append(res, err) } @@ -139,6 +143,22 @@ func (m *PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3 return err } + if err := validate.FormatOf("EffectiveDate", "body", "date-time", m.EffectiveDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3TRAGeneralStationTimetableGeneralStationTimetable) validateExpireDate(formats strfmt.Registry) error { + if swag.IsZero(m.ExpireDate) { // not required + return nil + } + + if err := validate.FormatOf("ExpireDate", "body", "date-time", m.ExpireDate.String(), formats); err != nil { + return err + } + return nil } @@ -157,6 +177,10 @@ func (m *PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3 return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -200,6 +224,10 @@ func (m *PTXAPIRailModelTRAGeneralStationWrapperPTXServiceDTORailSpecificationV3 return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_train_timetable.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_train_timetable.go index ec12df7a..2af05f9f 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_train_timetable.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_general_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_train_timetable.go @@ -33,12 +33,12 @@ type PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TRAGen // // 有效起始日期 // Required: true - EffectiveDate *string `json:"EffectiveDate"` + // Format: date-time + EffectiveDate *strfmt.DateTime `json:"EffectiveDate"` - // DateTime - // // 有效終止日期 - ExpireDate string `json:"ExpireDate,omitempty"` + // Format: date-time + ExpireDate strfmt.DateTime `json:"ExpireDate,omitempty"` // Int32 // @@ -50,7 +50,8 @@ type PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TRAGen // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -74,11 +75,10 @@ type PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TRAGen // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // @@ -98,6 +98,10 @@ func (m *PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TR res = append(res, err) } + if err := m.validateExpireDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateSrcUpdateInterval(formats); err != nil { res = append(res, err) } @@ -139,6 +143,22 @@ func (m *PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TR return err } + if err := validate.FormatOf("EffectiveDate", "body", "date-time", m.EffectiveDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TRAGeneralTrainTimetable) validateExpireDate(formats strfmt.Registry) error { + if swag.IsZero(m.ExpireDate) { // not required + return nil + } + + if err := validate.FormatOf("ExpireDate", "body", "date-time", m.ExpireDate.String(), formats); err != nil { + return err + } + return nil } @@ -157,6 +177,10 @@ func (m *PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TR return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -200,6 +224,10 @@ func (m *PTXAPIRailModelTRAGeneralTrainWrapperPTXServiceDTORailSpecificationV3TR return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go index d84614f5..892fcfca 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_o_d_fare_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go @@ -55,7 +55,8 @@ type PTXAPIRailModelTRAODFareWrapperPTXServiceDTORailSpecificationV3TRAODFareODF // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -68,11 +69,10 @@ type PTXAPIRailModelTRAODFareWrapperPTXServiceDTORailSpecificationV3TRAODFareODF // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a o d fare wrapper p t x service d t o rail specification v3 t r a o d fare o d fare @@ -158,6 +158,10 @@ func (m *PTXAPIRailModelTRAODFareWrapperPTXServiceDTORailSpecificationV3TRAODFar return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -176,6 +180,10 @@ func (m *PTXAPIRailModelTRAODFareWrapperPTXServiceDTORailSpecificationV3TRAODFar return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go index 9fb946ae..9b957e04 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRAAler // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRAAler // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a real time wrapper p t x service d t o rail specification v3 t r a t r a alert list alert @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go index 68adb005..d2a2da65 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go @@ -45,7 +45,8 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRANews // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Int32 // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRANews // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a real time wrapper p t x service d t o rail specification v3 t r a t r a news list news @@ -143,6 +143,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go index ca6d8971..ff55ba90 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRAStat // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRAStat // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a real time wrapper p t x service d t o rail specification v3 t r a t r a station live board list station live board @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go index fcc439e4..397483e1 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_real_time_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRATrai // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -53,11 +54,10 @@ type PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRATrai // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model t r a real time wrapper p t x service d t o rail specification v3 t r a t r a train live board list train live board @@ -118,6 +118,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -161,6 +165,10 @@ func (m *PTXAPIRailModelTRARealTimeWrapperPTXServiceDTORailSpecificationV3TRATRA return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_t_r_a_specific_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_specific_train_timetable.go b/rail/v3/models/p_t_x_api_rail_model_t_r_a_specific_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_specific_train_timetable.go index b05dd735..813a18bc 100644 --- a/rail/v3/models/p_t_x_api_rail_model_t_r_a_specific_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_specific_train_timetable.go +++ b/rail/v3/models/p_t_x_api_rail_model_t_r_a_specific_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_specific_train_timetable.go @@ -33,12 +33,12 @@ type PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpecifi // // 有效起始日期 // Required: true - EffectiveDate *string `json:"EffectiveDate"` + // Format: date-time + EffectiveDate *strfmt.DateTime `json:"EffectiveDate"` - // DateTime - // // 有效終止日期 - ExpireDate string `json:"ExpireDate,omitempty"` + // Format: date-time + ExpireDate strfmt.DateTime `json:"ExpireDate,omitempty"` // Int32 // @@ -50,7 +50,8 @@ type PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpecifi // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -74,11 +75,10 @@ type PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpecifi // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // @@ -98,6 +98,10 @@ func (m *PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpe res = append(res, err) } + if err := m.validateExpireDate(formats); err != nil { + res = append(res, err) + } + if err := m.validateSrcUpdateInterval(formats); err != nil { res = append(res, err) } @@ -139,6 +143,22 @@ func (m *PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpe return err } + if err := validate.FormatOf("EffectiveDate", "body", "date-time", m.EffectiveDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpecificTrainTimetable) validateExpireDate(formats strfmt.Registry) error { + if swag.IsZero(m.ExpireDate) { // not required + return nil + } + + if err := validate.FormatOf("ExpireDate", "body", "date-time", m.ExpireDate.String(), formats); err != nil { + return err + } + return nil } @@ -157,6 +177,10 @@ func (m *PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpe return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -200,6 +224,10 @@ func (m *PTXAPIRailModelTRASpecificWrapperPTXServiceDTORailSpecificationV3TRASpe return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_tra_daily_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go b/rail/v3/models/p_t_x_api_rail_model_tra_daily_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go index 990d6308..83f56c5e 100644 --- a/rail/v3/models/p_t_x_api_rail_model_tra_daily_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go +++ b/rail/v3/models/p_t_x_api_rail_model_tra_daily_station_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTraDailyStationWrapperPTXServiceDTORailSpecificationV3TRADai // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // Array // @@ -59,11 +60,10 @@ type PTXAPIRailModelTraDailyStationWrapperPTXServiceDTORailSpecificationV3TRADai // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model tra daily station wrapper p t x service d t o rail specification v3 t r a daily station time table station timetable @@ -128,6 +128,10 @@ func (m *PTXAPIRailModelTraDailyStationWrapperPTXServiceDTORailSpecificationV3TR return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -180,6 +184,10 @@ func (m *PTXAPIRailModelTraDailyStationWrapperPTXServiceDTORailSpecificationV3TR return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_api_rail_model_tra_daily_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_timetable.go b/rail/v3/models/p_t_x_api_rail_model_tra_daily_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_timetable.go index 105332ee..4e8c19f9 100644 --- a/rail/v3/models/p_t_x_api_rail_model_tra_daily_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_timetable.go +++ b/rail/v3/models/p_t_x_api_rail_model_tra_daily_train_wrapper_p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_timetable.go @@ -39,7 +39,8 @@ type PTXAPIRailModelTraDailyTrainWrapperPTXServiceDTORailSpecificationV3TRADaily // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // @@ -58,11 +59,10 @@ type PTXAPIRailModelTraDailyTrainWrapperPTXServiceDTORailSpecificationV3TRADaily // Required: true UpdateInterval *int32 `json:"UpdateInterval"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x API rail model tra daily train wrapper p t x service d t o rail specification v3 t r a daily train time table train timetable @@ -127,6 +127,10 @@ func (m *PTXAPIRailModelTraDailyTrainWrapperPTXServiceDTORailSpecificationV3TRAD return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -178,6 +182,10 @@ func (m *PTXAPIRailModelTraDailyTrainWrapperPTXServiceDTORailSpecificationV3TRAD return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_service_day.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_service_day.go new file mode 100644 index 00000000..0ac353fc --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_service_day.go @@ -0,0 +1,270 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay ServiceDay +// +// 小火車服務日型態 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.ServiceDay +type PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay struct { + + // Int32 + // + // 假日後一日是否營運 : [0:'否',1:'是'] + // Required: true + DayAfterHoliday *int64 `json:"DayAfterHoliday"` + + // Int32 + // + // 假日前一日是否營運 : [0:'否',1:'是'] + // Required: true + DayBeforeHoliday *int64 `json:"DayBeforeHoliday"` + + // Int32 + // + // 星期五是否營運 : [0:'否',1:'是'] + // Required: true + Friday *int64 `json:"Friday"` + + // Int32 + // + // 星期一是否營運 : [0:'否',1:'是'] + // Required: true + Monday *int64 `json:"Monday"` + + // Int32 + // + // 國定假日是否營運 : [0:'否',1:'是'] + // Required: true + NationalHolidays *int64 `json:"NationalHolidays"` + + // Int32 + // + // 星期六是否營運 : [0:'否',1:'是'] + // Required: true + Saturday *int64 `json:"Saturday"` + + // String + // + // 服務日標籤 + ServiceTag string `json:"ServiceTag,omitempty" xml:"String,omitempty"` + + // Int32 + // + // 星期日是否營運 : [0:'否',1:'是'] + // Required: true + Sunday *int64 `json:"Sunday"` + + // Int32 + // + // 星期四是否營運 : [0:'否',1:'是'] + // Required: true + Thursday *int64 `json:"Thursday"` + + // Int32 + // + // 星期二是否營運 : [0:'否',1:'是'] + // Required: true + Tuesday *int64 `json:"Tuesday"` + + // Int32 + // + // 颱風停止上班上課期間營運營運 : [0:'否',1:'是'] + // Required: true + TyphoonDay *int64 `json:"TyphoonDay"` + + // Int32 + // + // 星期三是否營運 : [0:'否',1:'是'] + // Required: true + Wednesday *int64 `json:"Wednesday"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train common service day +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDayAfterHoliday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDayBeforeHoliday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFriday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateMonday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNationalHolidays(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSaturday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSunday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateThursday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTuesday(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTyphoonDay(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWednesday(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateDayAfterHoliday(formats strfmt.Registry) error { + + if err := validate.Required("DayAfterHoliday", "body", m.DayAfterHoliday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateDayBeforeHoliday(formats strfmt.Registry) error { + + if err := validate.Required("DayBeforeHoliday", "body", m.DayBeforeHoliday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateFriday(formats strfmt.Registry) error { + + if err := validate.Required("Friday", "body", m.Friday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateMonday(formats strfmt.Registry) error { + + if err := validate.Required("Monday", "body", m.Monday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateNationalHolidays(formats strfmt.Registry) error { + + if err := validate.Required("NationalHolidays", "body", m.NationalHolidays); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateSaturday(formats strfmt.Registry) error { + + if err := validate.Required("Saturday", "body", m.Saturday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateSunday(formats strfmt.Registry) error { + + if err := validate.Required("Sunday", "body", m.Sunday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateThursday(formats strfmt.Registry) error { + + if err := validate.Required("Thursday", "body", m.Thursday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateTuesday(formats strfmt.Registry) error { + + if err := validate.Required("Tuesday", "body", m.Tuesday); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateTyphoonDay(formats strfmt.Registry) error { + + if err := validate.Required("TyphoonDay", "body", m.TyphoonDay); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) validateWednesday(formats strfmt.Registry) error { + + if err := validate.Required("Wednesday", "body", m.Wednesday); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p t x service d t o rail specification v3 lite train common service day based on context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_stop_time.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_stop_time.go new file mode 100644 index 00000000..9324702f --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_stop_time.go @@ -0,0 +1,163 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime StopTime +// +// 小火車停靠時間資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.StopTime +type PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime struct { + + // String + // + // 到站時間(格式: HH:mm) + // Required: true + ArrivalTime *string `json:"ArrivalTime" xml:"String"` + + // String + // + // 離站時間(格式: HH:mm) + // Required: true + DepartureTime *string `json:"DepartureTime" xml:"String"` + + // String + // + // 車站代碼 + // Required: true + StationID *string `json:"StationID" xml:"String"` + + // NameType + // + // 車站名稱 + // Required: true + StationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"StationName" xml:"NameType"` + + // Int32 + // + // 停靠站序(由1開始) + // Required: true + StopSequence *int32 `json:"StopSequence"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train common stop time +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateArrivalTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDepartureTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStopSequence(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) validateArrivalTime(formats strfmt.Registry) error { + + if err := validate.Required("ArrivalTime", "body", m.ArrivalTime); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) validateDepartureTime(formats strfmt.Registry) error { + + if err := validate.Required("DepartureTime", "body", m.DepartureTime); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) validateStationID(formats strfmt.Registry) error { + + if err := validate.Required("StationID", "body", m.StationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) validateStationName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) validateStopSequence(formats strfmt.Registry) error { + + if err := validate.Required("StopSequence", "body", m.StopSequence); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train common stop time based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) contextValidateStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_train_info.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_train_info.go new file mode 100644 index 00000000..d14a71eb --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_common_train_info.go @@ -0,0 +1,380 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo TrainInfo +// +// 小火車車次定期資料型別(時刻表用) +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Common.TrainInfo +type PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo struct { + + // Int32 + // + // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] + // Required: true + BikeFlag *int64 `json:"BikeFlag"` + + // Int32 + // + // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] + // Required: true + BreastFeedFlag *int64 `json:"BreastFeedFlag"` + + // Int32 + // + // 是否提供小客車 : [0:'否',1:'是'] + // Required: true + CarFlag *int64 `json:"CarFlag"` + + // Int32 + // + // 是否為每日行駛 : [0:'否',1:'是'] + // Required: true + DailyFlag *int64 `json:"DailyFlag"` + + // Int32 + // + // 是否提供訂便當服務 : [0:'否',1:'是'] + // Required: true + DiningFlag *int64 `json:"DiningFlag"` + + // Int32 + // + // 行駛方向 : [0:'順行',1:'逆行'] + // Required: true + Direction *int64 `json:"Direction"` + + // String + // + // 列車終點車站代號 + EndingStationID string `json:"EndingStationID,omitempty" xml:"String,omitempty"` + + // NameType + // + // 列車終點車站名稱 + EndingStationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"EndingStationName,omitempty" xml:"NameType,omitempty"` + + // Int32 + // + // 是否為加班車 : [0:'否',1:'是'] + // Required: true + ExtraTrainFlag *int64 `json:"ExtraTrainFlag"` + + // String + // + // 附註說明 + Note string `json:"Note,omitempty" xml:"String,omitempty"` + + // String + // + // 跨夜車站代碼 + OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` + + // Int32 + // + // 是否提供行李服務 : [0:'否',1:'是'] + // Required: true + PackageServiceFlag *int64 `json:"PackageServiceFlag"` + + // String + // + // 營運路線代碼 + RouteID string `json:"RouteID,omitempty" xml:"String,omitempty"` + + // String + // + // 列車起點車站代號 + StartingStationID string `json:"StartingStationID,omitempty" xml:"String,omitempty"` + + // NameType + // + // 列車起點車站名稱 + StartingStationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"StartingStationName,omitempty" xml:"NameType,omitempty"` + + // String + // + // 車次代碼 + // Required: true + TrainNo *string `json:"TrainNo" xml:"String"` + + // String + // + // 車種簡碼 = ['1: 太魯閣', '2: 普悠瑪', '3: 自強', '4: 莒光', '5: 復興', '6: 區間', '7: 普快', '10: 區間快'] + TrainTypeCode string `json:"TrainTypeCode,omitempty" xml:"String,omitempty"` + + // String + // + // 車種代嗎 + TrainTypeID string `json:"TrainTypeID,omitempty" xml:"String,omitempty"` + + // NameType + // + // 車種名稱 + TrainTypeName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"TrainTypeName,omitempty" xml:"NameType,omitempty"` + + // String + // + // 車次之目的地方向描述 + TripHeadSign string `json:"TripHeadSign,omitempty" xml:"String,omitempty"` + + // Int32 + // + // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] + TripLine int64 `json:"TripLine,omitempty"` + + // Int32 + // + // 是否設身障旅客專用座位車 : [0:'否',1:'是'] + // Required: true + WheelChairFlag *int64 `json:"WheelChairFlag"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train common train info +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateBikeFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateBreastFeedFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateCarFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDailyFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDiningFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDirection(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndingStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateExtraTrainFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePackageServiceFlag(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartingStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainNo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainTypeName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateWheelChairFlag(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateBikeFlag(formats strfmt.Registry) error { + + if err := validate.Required("BikeFlag", "body", m.BikeFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateBreastFeedFlag(formats strfmt.Registry) error { + + if err := validate.Required("BreastFeedFlag", "body", m.BreastFeedFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateCarFlag(formats strfmt.Registry) error { + + if err := validate.Required("CarFlag", "body", m.CarFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateDailyFlag(formats strfmt.Registry) error { + + if err := validate.Required("DailyFlag", "body", m.DailyFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateDiningFlag(formats strfmt.Registry) error { + + if err := validate.Required("DiningFlag", "body", m.DiningFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateDirection(formats strfmt.Registry) error { + + if err := validate.Required("Direction", "body", m.Direction); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateEndingStationName(formats strfmt.Registry) error { + if swag.IsZero(m.EndingStationName) { // not required + return nil + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateExtraTrainFlag(formats strfmt.Registry) error { + + if err := validate.Required("ExtraTrainFlag", "body", m.ExtraTrainFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validatePackageServiceFlag(formats strfmt.Registry) error { + + if err := validate.Required("PackageServiceFlag", "body", m.PackageServiceFlag); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateStartingStationName(formats strfmt.Registry) error { + if swag.IsZero(m.StartingStationName) { // not required + return nil + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateTrainNo(formats strfmt.Registry) error { + + if err := validate.Required("TrainNo", "body", m.TrainNo); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateTrainTypeName(formats strfmt.Registry) error { + if swag.IsZero(m.TrainTypeName) { // not required + return nil + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) validateWheelChairFlag(formats strfmt.Registry) error { + + if err := validate.Required("WheelChairFlag", "body", m.WheelChairFlag); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train common train info based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEndingStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStartingStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrainTypeName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) contextValidateEndingStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) contextValidateStartingStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) contextValidateTrainTypeName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go new file mode 100644 index 00000000..bffbefcd --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_general_train_timetable.go @@ -0,0 +1,171 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable GeneralTrainTimetable +// +// 小火車定期時刻表資料型別 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.GeneralTrainTimetable +type PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable struct { + + // ServiceDay + // + // 營運日型態 + // Required: true + ServiceDay struct { + PTXServiceDTORailSpecificationV3LiteTrainCommonServiceDay + } `json:"ServiceDay" xml:"ServiceDay"` + + // Array + // + // 停靠時間資料 + // Required: true + StopTimes []*PTXServiceDTORailSpecificationV3LiteTrainCommonStopTime "json:\"StopTimes\" xml:\"List`1\"" + + // TrainInfo + // + // 定期車次資料 + // Required: true + TrainInfo struct { + PTXServiceDTORailSpecificationV3LiteTrainCommonTrainInfo + } `json:"TrainInfo" xml:"TrainInfo"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train general train timetable +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateServiceDay(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStopTimes(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainInfo(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateServiceDay(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateStopTimes(formats strfmt.Registry) error { + + if err := validate.Required("StopTimes", "body", m.StopTimes); err != nil { + return err + } + + for i := 0; i < len(m.StopTimes); i++ { + if swag.IsZero(m.StopTimes[i]) { // not required + continue + } + + if m.StopTimes[i] != nil { + if err := m.StopTimes[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StopTimes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) validateTrainInfo(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train general train timetable based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateServiceDay(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStopTimes(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateTrainInfo(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) contextValidateServiceDay(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) contextValidateStopTimes(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.StopTimes); i++ { + + if m.StopTimes[i] != nil { + if err := m.StopTimes[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("StopTimes" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) contextValidateTrainInfo(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainGeneralTrainTimetable + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go new file mode 100644 index 00000000..6e88b48f --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_line.go @@ -0,0 +1,185 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainLine Line +// +// 路線基本資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Line +type PTXServiceDTORailSpecificationV3LiteTrainLine struct { + + // Boolean + // + // 是否位於支線 + // Required: true + IsBranch *bool `json:"IsBranch"` + + // String + // + // 路線顏色 + LineColor string `json:"LineColor,omitempty" xml:"String,omitempty"` + + // String + // + // 路線群組 + LineGroup string `json:"LineGroup,omitempty" xml:"String,omitempty"` + + // String + // + // 路線代碼 + // Required: true + LineID *string `json:"LineID" xml:"String"` + + // NameType + // + // 路線名稱 + // Required: true + LineName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"LineName" xml:"NameType"` + + // String + // + // 路線編號 + // Required: true + LineNo *string `json:"LineNo" xml:"String"` + + // NameType + // + // 路線區間名稱 + // Required: true + LineSectionName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"LineSectionName" xml:"NameType"` + + // String + // + // 路線群組 + LineURL string `json:"LineURL,omitempty" xml:"String,omitempty"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train line +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateIsBranch(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineNo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineSectionName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) validateIsBranch(formats strfmt.Registry) error { + + if err := validate.Required("IsBranch", "body", m.IsBranch); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) validateLineID(formats strfmt.Registry) error { + + if err := validate.Required("LineID", "body", m.LineID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) validateLineName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) validateLineNo(formats strfmt.Registry) error { + + if err := validate.Required("LineNo", "body", m.LineNo); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) validateLineSectionName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train line based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLineName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateLineSectionName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) contextValidateLineName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) contextValidateLineSectionName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainLine) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainLine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go new file mode 100644 index 00000000..0196cb48 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_lite_train_news_list_news.go @@ -0,0 +1,252 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews News +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.LiteTrainNewsList.News +type PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews struct { + + // String + // + // 附件網址連結 + AttachmentURL string `json:"AttachmentURL,omitempty" xml:"String,omitempty"` + + // String + // + // 發布單位 + Department string `json:"Department,omitempty" xml:"String,omitempty"` + + // String + // + // 內容描述 + // Required: true + Description *string `json:"Description" xml:"String"` + + // 消息結束日期時間 + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` + + // Int32 + // + // 語系 : [1:'Zh_tw',2:'En_us',3:'Zh_cn',4:'Ja',5:'Ko',99:'Other'] + // Required: true + Language *int64 `json:"Language"` + + // Int32 + // + // 消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'新服務上架',8:'API修正',9:'來源異常',99:'其他'] + // Required: true + NewsCategory *int64 `json:"NewsCategory"` + + // String + // + // 消息代碼 + // Required: true + NewsID *string `json:"NewsID" xml:"String"` + + // String + // + // 消息網址連結 + NewsURL string `json:"NewsURL,omitempty" xml:"String,omitempty"` + + // DateTime + // + // 消息發佈日期時間 + // Required: true + // Format: date-time + PublishTime *strfmt.DateTime `json:"PublishTime"` + + // 消息起始日期時間 + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` + + // String + // + // 消息標題 + // Required: true + Title *string `json:"Title" xml:"String"` + + // DateTime + // + // 本筆資料之更新日期時間 + // Required: true + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train lite train news list news +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDescription(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLanguage(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNewsCategory(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNewsID(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTitle(formats); err != nil { + res = append(res, err) + } + + if err := m.validateUpdateTime(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateDescription(formats strfmt.Registry) error { + + if err := validate.Required("Description", "body", m.Description); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateLanguage(formats strfmt.Registry) error { + + if err := validate.Required("Language", "body", m.Language); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateNewsCategory(formats strfmt.Registry) error { + + if err := validate.Required("NewsCategory", "body", m.NewsCategory); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateNewsID(formats strfmt.Registry) error { + + if err := validate.Required("NewsID", "body", m.NewsID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validatePublishTime(formats strfmt.Registry) error { + + if err := validate.Required("PublishTime", "body", m.PublishTime); err != nil { + return err + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateTitle(formats strfmt.Registry) error { + + if err := validate.Required("Title", "body", m.Title); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) validateUpdateTime(formats strfmt.Registry) error { + + if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { + return err + } + + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p t x service d t o rail specification v3 lite train lite train news list news based on context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainLiteTrainNewsListNews + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_line.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_line.go new file mode 100644 index 00000000..0eae00b3 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_line.go @@ -0,0 +1,94 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainNetworkLine Line +// +// 路線基本資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Line +type PTXServiceDTORailSpecificationV3LiteTrainNetworkLine struct { + + // String + // + // 路線代碼 + // Required: true + LineID *string `json:"LineID" xml:"String"` + + // String + // + // 路線編號 + // Required: true + LineNo *string `json:"LineNo" xml:"String"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train network line +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkLine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLineID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineNo(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkLine) validateLineID(formats strfmt.Registry) error { + + if err := validate.Required("LineID", "body", m.LineID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkLine) validateLineNo(formats strfmt.Registry) error { + + if err := validate.Required("LineNo", "body", m.LineNo); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p t x service d t o rail specification v3 lite train network line based on context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkLine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkLine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkLine) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainNetworkLine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_map_name_type.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_map_name_type.go new file mode 100644 index 00000000..49796d21 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_map_name_type.go @@ -0,0 +1,62 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType MapNameType +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.MapNameType +type PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType struct { + + // String + // + // 小火車路網圖網址(英文版) + En string `json:"En,omitempty" xml:"String,omitempty"` + + // String + // + // 路網圖名稱 + MapName string `json:"MapName,omitempty" xml:"String,omitempty"` + + // String + // + // 小火車路網圖網址(中文版) + ZhTw string `json:"Zh_tw,omitempty" xml:"String,omitempty"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train network map name type +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType) Validate(formats strfmt.Registry) error { + return nil +} + +// ContextValidate validates this p t x service d t o rail specification v3 lite train network map name type based on context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go new file mode 100644 index 00000000..01ccdd6a --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_network_network.go @@ -0,0 +1,235 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork Network +// +// 小火車路網資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Network.Network +type PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork struct { + + // Array + // + // 小火車路線資訊 + // Required: true + Lines []*PTXServiceDTORailSpecificationV3LiteTrainNetworkLine "json:\"Lines\" xml:\"List`1\"" + + // String + // + // 小火車路網代碼 + // Required: true + NetworkID *string `json:"NetworkID" xml:"String"` + + // MapNameType + // + // 小火車路網圖網址URL + // Required: true + NetworkMapURL struct { + PTXServiceDTORailSpecificationV3LiteTrainNetworkMapNameType + } `json:"NetworkMapURL" xml:"MapNameType"` + + // NameType + // + // 小火車路網名稱 + // Required: true + NetworkName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"NetworkName" xml:"NameType"` + + // String + // + // 營運業者代碼 + // Required: true + OperatorCode *string `json:"OperatorCode" xml:"String"` + + // NameType + // + // 營運業者名稱 + // Required: true + OperatorName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"OperatorName" xml:"NameType"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train network network +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLines(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkMapURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateNetworkName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperatorCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperatorName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateLines(formats strfmt.Registry) error { + + if err := validate.Required("Lines", "body", m.Lines); err != nil { + return err + } + + for i := 0; i < len(m.Lines); i++ { + if swag.IsZero(m.Lines[i]) { // not required + continue + } + + if m.Lines[i] != nil { + if err := m.Lines[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateNetworkID(formats strfmt.Registry) error { + + if err := validate.Required("NetworkID", "body", m.NetworkID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateNetworkMapURL(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateNetworkName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateOperatorCode(formats strfmt.Registry) error { + + if err := validate.Required("OperatorCode", "body", m.OperatorCode); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) validateOperatorName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train network network based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateLines(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNetworkMapURL(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateNetworkName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOperatorName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) contextValidateLines(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Lines); i++ { + + if m.Lines[i] != nil { + if err := m.Lines[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Lines" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) contextValidateNetworkMapURL(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) contextValidateNetworkName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) contextValidateOperatorName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainNetworkNetwork + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_fare.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_fare.go new file mode 100644 index 00000000..6f7033ac --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_fare.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainODFareFare Fare +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.Fare +type PTXServiceDTORailSpecificationV3LiteTrainODFareFare struct { + + // Int32 + // + // 艙等 = ['1: 標準座車廂', '2: 商務座車廂', '3: 自由座車廂'] + // Required: true + CabinClass *int32 `json:"CabinClass"` + + // Int32 + // + // 費率等級 = ['1: 成人', '2: 學生', '3: 孩童', '4: 敬老', '5: 愛心', '6: 愛心孩童', '7: 愛心優待/愛心陪伴', '8: 團體', '9: 軍警'] + // Required: true + FareClass *int32 `json:"FareClass"` + + // Int32 + // + // 計費價格(新台幣) + // Required: true + Price *int32 `json:"Price"` + + // Int32 + // + // 票種類型 = ['1: 一般票', '2: 來回票', '3: 電子票證', '4: 回數票', '5: 定期票(30天期)', '6: 定期票(60天期)', '7: 早鳥票'] + // Required: true + TicketType *int32 `json:"TicketType"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train o d fare fare +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCabinClass(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFareClass(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePrice(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTicketType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) validateCabinClass(formats strfmt.Registry) error { + + if err := validate.Required("CabinClass", "body", m.CabinClass); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) validateFareClass(formats strfmt.Registry) error { + + if err := validate.Required("FareClass", "body", m.FareClass); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) validatePrice(formats strfmt.Registry) error { + + if err := validate.Required("Price", "body", m.Price); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) validateTicketType(formats strfmt.Registry) error { + + if err := validate.Required("TicketType", "body", m.TicketType); err != nil { + return err + } + + return nil +} + +// ContextValidate validates this p t x service d t o rail specification v3 lite train o d fare fare based on context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareFare) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainODFareFare + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go new file mode 100644 index 00000000..f2f73b02 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_o_d_fare_o_d_fare.go @@ -0,0 +1,234 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainODFareODFare ODFare +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.ODFare.ODFare +type PTXServiceDTORailSpecificationV3LiteTrainODFareODFare struct { + + // String + // + // 迄點車站代碼 + // Required: true + DestinationStationID *string `json:"DestinationStationID" xml:"String"` + + // NameType + // + // 迄點車站名稱 + // Required: true + DestinationStationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"DestinationStationName" xml:"NameType"` + + // Int32 + // + // 方向 : [0:'順行',1:'逆行'] + Direction int64 `json:"Direction,omitempty"` + + // Array + // + // 票價 + // Required: true + Fares []*PTXServiceDTORailSpecificationV3LiteTrainODFareFare "json:\"Fares\" xml:\"List`1\"" + + // String + // + // 起點車站代碼 + // Required: true + OriginStationID *string `json:"OriginStationID" xml:"String"` + + // NameType + // + // 起點車站名稱 + // Required: true + OriginStationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"OriginStationName" xml:"NameType"` + + // Int32 + // + // 車種簡碼 = ['1: 太魯閣', '2: 普悠瑪', '3: 自強', '4: 莒光', '5: 復興', '6: 區間', '7: 普快', '10: 區間快'] + // Required: true + TrainType *int32 `json:"TrainType"` + + // 起迄站間乘車距離 + TravelDistance float32 `json:"TravelDistance,omitempty"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train o d fare o d fare +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDestinationStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateDestinationStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateFares(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOriginStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOriginStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainType(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateDestinationStationID(formats strfmt.Registry) error { + + if err := validate.Required("DestinationStationID", "body", m.DestinationStationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateDestinationStationName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateFares(formats strfmt.Registry) error { + + if err := validate.Required("Fares", "body", m.Fares); err != nil { + return err + } + + for i := 0; i < len(m.Fares); i++ { + if swag.IsZero(m.Fares[i]) { // not required + continue + } + + if m.Fares[i] != nil { + if err := m.Fares[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Fares" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateOriginStationID(formats strfmt.Registry) error { + + if err := validate.Required("OriginStationID", "body", m.OriginStationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateOriginStationName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) validateTrainType(formats strfmt.Registry) error { + + if err := validate.Required("TrainType", "body", m.TrainType); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train o d fare o d fare based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateDestinationStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateFares(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateOriginStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) contextValidateDestinationStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) contextValidateFares(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Fares); i++ { + + if m.Fares[i] != nil { + if err := m.Fares[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Fares" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) contextValidateOriginStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainODFareODFare) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainODFareODFare + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go new file mode 100644 index 00000000..35f3015f --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_operator.go @@ -0,0 +1,141 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainOperator Operator +// +// 小火車者營運業者基本資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Operator +type PTXServiceDTORailSpecificationV3LiteTrainOperator struct { + + // String + // + // 營運業者票價查詢網站連結 + FareURL string `json:"FareURL,omitempty" xml:"String,omitempty"` + + // String + // + // 營運業者簡碼 + // Required: true + OperatorCode *string `json:"OperatorCode" xml:"String"` + + // String + // + // 營運業者電子信箱 + OperatorEmail string `json:"OperatorEmail,omitempty" xml:"String,omitempty"` + + // String + // + // 營運業者Logo網址 + OperatorLogoURL string `json:"OperatorLogoURL,omitempty" xml:"String,omitempty"` + + // NameType + // + // 營運業者名稱 + // Required: true + OperatorName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"OperatorName" xml:"NameType"` + + // String + // + // 營運業者連絡電話 + OperatorPhone string `json:"OperatorPhone,omitempty" xml:"String,omitempty"` + + // String + // + // 營運業者網址連結 + OperatorURL string `json:"OperatorURL,omitempty" xml:"String,omitempty"` + + // String + // + // 營運業者訂票電話 + ReservationPhone string `json:"ReservationPhone,omitempty" xml:"String,omitempty"` + + // String + // + // 營運業者訂票網站 + ReservationURL string `json:"ReservationURL,omitempty" xml:"String,omitempty"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train operator +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateOperatorCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperatorName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) validateOperatorCode(formats strfmt.Registry) error { + + if err := validate.Required("OperatorCode", "body", m.OperatorCode); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) validateOperatorName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train operator based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateOperatorName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) contextValidateOperatorName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainOperator) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainOperator + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go new file mode 100644 index 00000000..12e18861 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_route.go @@ -0,0 +1,280 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainRoute Route +// +// 營運路線基本資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Route +type PTXServiceDTORailSpecificationV3LiteTrainRoute struct { + + // String + // + // 營運路線迄站代號 + // Required: true + EndStationID *string `json:"EndStationID" xml:"String"` + + // NameType + // + // 營運路線迄站名稱 + // Required: true + EndStationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"EndStationName" xml:"NameType"` + + // String + // + // 營運路線所屬之路線代碼 + // Required: true + LineID *string `json:"LineID" xml:"String"` + + // String + // + // 營運路線所屬之路線編號 + LineNo string `json:"LineNo,omitempty" xml:"String,omitempty"` + + // String + // + // 營運業者代碼 + // Required: true + OperatorCode *string `json:"OperatorCode" xml:"String"` + + // 路線旅行長度 + RouteDistance float32 `json:"RouteDistance,omitempty"` + + // String + // + // 營運路線代碼 + // Required: true + RouteID *string `json:"RouteID" xml:"String"` + + // NameType + // + // 營運路線名稱 + // Required: true + RouteName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"RouteName" xml:"NameType"` + + // Int32 + // + // 營運路線種類 + // Required: true + RouteType *int32 `json:"RouteType"` + + // String + // + // 營運路線來源網址 + // Required: true + RouteURL *string `json:"RouteURL" xml:"String"` + + // String + // + // 營運路線起站代號 + // Required: true + StartStationID *string `json:"StartStationID" xml:"String"` + + // NameType + // + // 營運路線起站名稱 + // Required: true + StartStationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"StartStationName" xml:"NameType"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train route +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateEndStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateOperatorCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteType(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteURL(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartStationName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateEndStationID(formats strfmt.Registry) error { + + if err := validate.Required("EndStationID", "body", m.EndStationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateEndStationName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateLineID(formats strfmt.Registry) error { + + if err := validate.Required("LineID", "body", m.LineID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateOperatorCode(formats strfmt.Registry) error { + + if err := validate.Required("OperatorCode", "body", m.OperatorCode); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateRouteID(formats strfmt.Registry) error { + + if err := validate.Required("RouteID", "body", m.RouteID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateRouteName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateRouteType(formats strfmt.Registry) error { + + if err := validate.Required("RouteType", "body", m.RouteType); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateRouteURL(formats strfmt.Registry) error { + + if err := validate.Required("RouteURL", "body", m.RouteURL); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateStartStationID(formats strfmt.Registry) error { + + if err := validate.Required("StartStationID", "body", m.StartStationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) validateStartStationName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train route based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateEndStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateRouteName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStartStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) contextValidateEndStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) contextValidateRouteName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) contextValidateStartStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainRoute) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainRoute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go new file mode 100644 index 00000000..f2cd1571 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station.go @@ -0,0 +1,176 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainStation Station +// +// 小火車車站資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.Station +type PTXServiceDTORailSpecificationV3LiteTrainStation struct { + + // String + // + // 訂票車站代碼 + ReservationCode string `json:"ReservationCode,omitempty" xml:"String,omitempty"` + + // String + // + // 車站地址 + StationAddress string `json:"StationAddress,omitempty" xml:"String,omitempty"` + + // String + // + // 車站級別 = ['0: 特等', '1: 一等', '2: 二等', '3: 三等', '4: 簡易', '5: 招呼', '6: 號誌', '7:其他'] + StationClass string `json:"StationClass,omitempty" xml:"String,omitempty"` + + // String + // + // 小火車車站代碼 + // Required: true + StationID *string `json:"StationID" xml:"String"` + + // NameType + // + // 車站名稱 + // Required: true + StationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"StationName" xml:"NameType"` + + // String + // + // 車站聯絡電話 + StationPhone string `json:"StationPhone,omitempty" xml:"String,omitempty"` + + // PointType + // + // 車站座標(WGS84) + // Required: true + StationPosition struct { + PTXServiceDTOSharedSpecificationV3BasePointType + } `json:"StationPosition" xml:"PointType"` + + // String + // + // 小火車車站唯一識別代碼 + // Required: true + StationUID *string `json:"StationUID" xml:"String"` + + // String + // + // 車站資訊說明網址 + StationURL string `json:"StationURL,omitempty" xml:"String,omitempty"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train station +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationPosition(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationUID(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) validateStationID(formats strfmt.Registry) error { + + if err := validate.Required("StationID", "body", m.StationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) validateStationName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) validateStationPosition(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) validateStationUID(formats strfmt.Registry) error { + + if err := validate.Required("StationUID", "body", m.StationUID); err != nil { + return err + } + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train station based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStationPosition(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) contextValidateStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) contextValidateStationPosition(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStation) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainStation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_line_station.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_line_station.go new file mode 100644 index 00000000..061f3910 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_line_station.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation LineStation +// +// 路線車站資訊 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.LineStation +type PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation struct { + + // Single + // + // 已累積之里程距離(公里) + // Required: true + CumulativeDistance *float32 `json:"CumulativeDistance"` + + // Int32 + // + // 站序 + // Required: true + Sequence *int32 `json:"Sequence"` + + // String + // + // 車站代碼 + // Required: true + StationID *string `json:"StationID" xml:"String"` + + // NameType + // + // 車站名稱 + // Required: true + StationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"StationName" xml:"NameType"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train station of line line station +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCumulativeDistance(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSequence(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) validateCumulativeDistance(formats strfmt.Registry) error { + + if err := validate.Required("CumulativeDistance", "body", m.CumulativeDistance); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) validateSequence(formats strfmt.Registry) error { + + if err := validate.Required("Sequence", "body", m.Sequence); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) validateStationID(formats strfmt.Registry) error { + + if err := validate.Required("StationID", "body", m.StationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) validateStationName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train station of line line station based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) contextValidateStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go new file mode 100644 index 00000000..5143393b --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_line_station_of_line.go @@ -0,0 +1,157 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine StationOfLine +// +// 路線車站基本資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfLine.StationOfLine +type PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine struct { + + // String + // + // 路線代碼 + // Required: true + LineID *string `json:"LineID" xml:"String"` + + // String + // + // 路線編號 + // Required: true + LineNo *string `json:"LineNo" xml:"String"` + + // Array + // + // 路線車站資訊 + // Required: true + Stations []*PTXServiceDTORailSpecificationV3LiteTrainStationOfLineLineStation "json:\"Stations\" xml:\"List`1\"" +} + +// Validate validates this p t x service d t o rail specification v3 lite train station of line station of line +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateLineID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineNo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateLineID(formats strfmt.Registry) error { + + if err := validate.Required("LineID", "body", m.LineID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateLineNo(formats strfmt.Registry) error { + + if err := validate.Required("LineNo", "body", m.LineNo); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) validateStations(formats strfmt.Registry) error { + + if err := validate.Required("Stations", "body", m.Stations); err != nil { + return err + } + + for i := 0; i < len(m.Stations); i++ { + if swag.IsZero(m.Stations[i]) { // not required + continue + } + + if m.Stations[i] != nil { + if err := m.Stations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train station of line station of line based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStations(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) contextValidateStations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Stations); i++ { + + if m.Stations[i] != nil { + if err := m.Stations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainStationOfLineStationOfLine + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_route_station.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_route_station.go new file mode 100644 index 00000000..be746f35 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_route_station.go @@ -0,0 +1,144 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation RouteStation +// +// 路線車站資訊 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.RouteStation +type PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation struct { + + // Single + // + // 已累積之里程距離(公里) + // Required: true + CumulativeDistance *float32 `json:"CumulativeDistance"` + + // Int32 + // + // 站序 + // Required: true + Sequence *int32 `json:"Sequence"` + + // String + // + // 車站代碼 + // Required: true + StationID *string `json:"StationID" xml:"String"` + + // NameType + // + // 車站名稱 + // Required: true + StationName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"StationName" xml:"NameType"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train station of route route station +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateCumulativeDistance(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSequence(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStationName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) validateCumulativeDistance(formats strfmt.Registry) error { + + if err := validate.Required("CumulativeDistance", "body", m.CumulativeDistance); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) validateSequence(formats strfmt.Registry) error { + + if err := validate.Required("Sequence", "body", m.Sequence); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) validateStationID(formats strfmt.Registry) error { + + if err := validate.Required("StationID", "body", m.StationID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) validateStationName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train station of route route station based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateStationName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) contextValidateStationName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go new file mode 100644 index 00000000..2bb94433 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_station_of_route_station_of_route.go @@ -0,0 +1,221 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute StationOfRoute +// +// 營運路線車站基本資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.StationOfRoute.StationOfRoute +type PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute struct { + + // Int32 + // + // 營運路線方向描述(0:去程,1:返程) + // Required: true + Direction *int32 `json:"Direction"` + + // String + // + // 營運路線所屬之路線代碼 + // Required: true + LineID *string `json:"LineID" xml:"String"` + + // String + // + // 營運路線所屬之路線編號 + // Required: true + LineNo *string `json:"LineNo" xml:"String"` + + // String + // + // 營運路線代碼 + // Required: true + RouteID *string `json:"RouteID" xml:"String"` + + // NameType + // + // 營運路線名稱 + // Required: true + RouteName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"RouteName" xml:"NameType"` + + // Array + // + // 營運路線車站資訊 + // Required: true + Stations []*PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteRouteStation "json:\"Stations\" xml:\"List`1\"" +} + +// Validate validates this p t x service d t o rail specification v3 lite train station of route station of route +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateDirection(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateLineNo(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateRouteName(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStations(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateDirection(formats strfmt.Registry) error { + + if err := validate.Required("Direction", "body", m.Direction); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateLineID(formats strfmt.Registry) error { + + if err := validate.Required("LineID", "body", m.LineID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateLineNo(formats strfmt.Registry) error { + + if err := validate.Required("LineNo", "body", m.LineNo); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateRouteID(formats strfmt.Registry) error { + + if err := validate.Required("RouteID", "body", m.RouteID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateRouteName(formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) validateStations(formats strfmt.Registry) error { + + if err := validate.Required("Stations", "body", m.Stations); err != nil { + return err + } + + for i := 0; i < len(m.Stations); i++ { + if swag.IsZero(m.Stations[i]) { // not required + continue + } + + if m.Stations[i] != nil { + if err := m.Stations[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train station of route station of route based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateRouteName(ctx, formats); err != nil { + res = append(res, err) + } + + if err := m.contextValidateStations(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) contextValidateRouteName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) contextValidateStations(ctx context.Context, formats strfmt.Registry) error { + + for i := 0; i < len(m.Stations); i++ { + + if m.Stations[i] != nil { + if err := m.Stations[i].ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("Stations" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainStationOfRouteStationOfRoute + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go new file mode 100644 index 00000000..9a7fcbb2 --- /dev/null +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_lite_train_train_type.go @@ -0,0 +1,125 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package models + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + + "github.com/go-openapi/errors" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" + "github.com/go-openapi/validate" +) + +// PTXServiceDTORailSpecificationV3LiteTrainTrainType TrainType +// +// 小火車列車車種資料 +// +// swagger:model PTX.Service.DTO.Rail.Specification.V3.LiteTrain.TrainType +type PTXServiceDTORailSpecificationV3LiteTrainTrainType struct { + + // String + // + // 車種簡碼 = ['1: 中興號', '2: 區間', '3: 主題式列車', '5: 阿里山號', '6: 祝客', '7: 祝客(祝山線)', '8: 檜木車廂'] + // Required: true + TrainTypeCode *string `json:"TrainTypeCode" xml:"String"` + + // String + // + // 列車車種代碼 + // Required: true + TrainTypeID *string `json:"TrainTypeID" xml:"String"` + + // NameType + // + // 列車車種名稱 + // Required: true + TrainTypeName struct { + PTXServiceDTOSharedSpecificationV3BaseNameType + } `json:"TrainTypeName" xml:"NameType"` +} + +// Validate validates this p t x service d t o rail specification v3 lite train train type +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateTrainTypeCode(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainTypeID(formats); err != nil { + res = append(res, err) + } + + if err := m.validateTrainTypeName(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) validateTrainTypeCode(formats strfmt.Registry) error { + + if err := validate.Required("TrainTypeCode", "body", m.TrainTypeCode); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) validateTrainTypeID(formats strfmt.Registry) error { + + if err := validate.Required("TrainTypeID", "body", m.TrainTypeID); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) validateTrainTypeName(formats strfmt.Registry) error { + + return nil +} + +// ContextValidate validate this p t x service d t o rail specification v3 lite train train type based on the context it is used +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) ContextValidate(ctx context.Context, formats strfmt.Registry) error { + var res []error + + if err := m.contextValidateTrainTypeName(ctx, formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) contextValidateTrainTypeName(ctx context.Context, formats strfmt.Registry) error { + + return nil +} + +// MarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) MarshalBinary() ([]byte, error) { + if m == nil { + return nil, nil + } + return swag.WriteJSON(m) +} + +// UnmarshalBinary interface implementation +func (m *PTXServiceDTORailSpecificationV3LiteTrainTrainType) UnmarshalBinary(b []byte) error { + var res PTXServiceDTORailSpecificationV3LiteTrainTrainType + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *m = res + return nil +} diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_service_day.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_service_day.go index 96a4e0cc..d56b69df 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_service_day.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_service_day.go @@ -21,76 +21,76 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V3.TRA.Common.ServiceDay type PTXServiceDTORailSpecificationV3TRACommonServiceDay struct { - // integer + // Int32 // // 假日後一日是否營運 : [0:'否',1:'是'] // Required: true - DayAfterHoliday *string `json:"DayAfterHoliday"` + DayAfterHoliday *int64 `json:"DayAfterHoliday"` - // integer + // Int32 // // 假日前一日是否營運 : [0:'否',1:'是'] // Required: true - DayBeforeHoliday *string `json:"DayBeforeHoliday"` + DayBeforeHoliday *int64 `json:"DayBeforeHoliday"` - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *string `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *string `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 國定假日是否營運 : [0:'否',1:'是'] // Required: true - NationalHolidays *string `json:"NationalHolidays"` + NationalHolidays *int64 `json:"NationalHolidays"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *string `json:"Saturday"` + Saturday *int64 `json:"Saturday"` // String // // 服務日標籤 ServiceTag string `json:"ServiceTag,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *string `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *string `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *string `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 颱風停止上班上課期間營運營運 : [0:'否',1:'是'] // Required: true - TyphoonDay *string `json:"TyphoonDay"` + TyphoonDay *int64 `json:"TyphoonDay"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *string `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o rail specification v3 t r a common service day diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_special_day.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_special_day.go index f4a90a13..bb5ef30b 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_special_day.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_special_day.go @@ -8,8 +8,10 @@ package models import ( "context" + "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" + "github.com/go-openapi/validate" ) // PTXServiceDTORailSpecificationV3TRACommonSpecialDay SpecialDay @@ -29,24 +31,59 @@ type PTXServiceDTORailSpecificationV3TRACommonSpecialDay struct { // 特殊營運描述 Description string `json:"Description,omitempty" xml:"String,omitempty"` - // DateTime - // // 結束日期 - EndDate string `json:"EndDate,omitempty"` + // Format: date-time + EndDate strfmt.DateTime `json:"EndDate,omitempty"` - // integer + // Int32 // // 營運服務狀態代碼 : [0:'停止營運',1:'正常營運',2:'加班營運'] - ServiceStatus string `json:"ServiceStatus,omitempty"` + ServiceStatus int64 `json:"ServiceStatus,omitempty"` - // DateTime - // // 開始日期 - StartDate string `json:"StartDate,omitempty"` + // Format: date-time + StartDate strfmt.DateTime `json:"StartDate,omitempty"` } // Validate validates this p t x service d t o rail specification v3 t r a common special day func (m *PTXServiceDTORailSpecificationV3TRACommonSpecialDay) Validate(formats strfmt.Registry) error { + var res []error + + if err := m.validateEndDate(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartDate(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (m *PTXServiceDTORailSpecificationV3TRACommonSpecialDay) validateEndDate(formats strfmt.Registry) error { + if swag.IsZero(m.EndDate) { // not required + return nil + } + + if err := validate.FormatOf("EndDate", "body", "date-time", m.EndDate.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3TRACommonSpecialDay) validateStartDate(formats strfmt.Registry) error { + if swag.IsZero(m.StartDate) { // not required + return nil + } + + if err := validate.FormatOf("StartDate", "body", "date-time", m.StartDate.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_train_info.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_train_info.go index 0dce043c..d06e0870 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_train_info.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_common_train_info.go @@ -21,41 +21,41 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V3.TRA.Common.TrainInfo type PTXServiceDTORailSpecificationV3TRACommonTrainInfo struct { - // integer + // Int32 // // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] // Required: true - BikeFlag *string `json:"BikeFlag"` + BikeFlag *int64 `json:"BikeFlag"` - // integer + // Int32 // // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] // Required: true - BreastFeedFlag *string `json:"BreastFeedFlag"` + BreastFeedFlag *int64 `json:"BreastFeedFlag"` - // integer + // Int32 // // 是否提供小客車 : [0:'否',1:'是'] // Required: true - CarFlag *string `json:"CarFlag"` + CarFlag *int64 `json:"CarFlag"` - // integer + // Int32 // // 是否為每日行駛 : [0:'否',1:'是'] // Required: true - DailyFlag *string `json:"DailyFlag"` + DailyFlag *int64 `json:"DailyFlag"` - // integer + // Int32 // // 是否提供訂便當服務 : [0:'否',1:'是'] // Required: true - DiningFlag *string `json:"DiningFlag"` + DiningFlag *int64 `json:"DiningFlag"` - // integer + // Int32 // // 行駛方向 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -69,11 +69,11 @@ type PTXServiceDTORailSpecificationV3TRACommonTrainInfo struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"EndingStationName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 是否為加班車 : [0:'否',1:'是'] // Required: true - ExtraTrainFlag *string `json:"ExtraTrainFlag"` + ExtraTrainFlag *int64 `json:"ExtraTrainFlag"` // String // @@ -85,11 +85,11 @@ type PTXServiceDTORailSpecificationV3TRACommonTrainInfo struct { // 跨夜車站代碼 OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 是否提供行李服務 : [0:'否',1:'是'] // Required: true - PackageServiceFlag *string `json:"PackageServiceFlag"` + PackageServiceFlag *int64 `json:"PackageServiceFlag"` // String // @@ -136,16 +136,16 @@ type PTXServiceDTORailSpecificationV3TRACommonTrainInfo struct { // 車次之目的地方向描述 TripHeadSign string `json:"TripHeadSign,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` - // integer + // Int32 // // 是否設身障旅客專用座位車 : [0:'否',1:'是'] // Required: true - WheelChairFlag *string `json:"WheelChairFlag"` + WheelChairFlag *int64 `json:"WheelChairFlag"` } // Validate validates this p t x service d t o rail specification v3 t r a common train info diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go index 5ea4fb70..3ceb56ae 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_station_time_table_station_timetable.go @@ -20,10 +20,10 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V3.TRA.DailyStationTimeTable.StationTimetable type PTXServiceDTORailSpecificationV3TRADailyStationTimeTableStationTimetable struct { - // integer + // Int32 // // 行駛方向 : [0:'順行',1:'逆行'] - Direction string `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` // String // diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_info.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_info.go index bdfc1f04..46ffee55 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_info.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_daily_train_time_table_train_info.go @@ -20,45 +20,45 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V3.TRA.DailyTrainTimeTable.TrainInfo type PTXServiceDTORailSpecificationV3TRADailyTrainTimeTableTrainInfo struct { - // integer + // Int32 // // 是否人車同行班次(置於攜車袋之自行車各級列車均可乘車) : [0:'否',1:'是'] // Required: true - BikeFlag *string `json:"BikeFlag"` + BikeFlag *int64 `json:"BikeFlag"` - // integer + // Int32 // // 是否設有哺(集)乳室車廂 : [0:'否',1:'是'] // Required: true - BreastFeedFlag *string `json:"BreastFeedFlag"` + BreastFeedFlag *int64 `json:"BreastFeedFlag"` - // integer + // Int32 // // 是否提供小汽車上火車服務 : [0:'否',1:'是'] - CarFlag string `json:"CarFlag,omitempty"` + CarFlag int64 `json:"CarFlag,omitempty"` - // integer + // Int32 // // 是否每日行駛 : [0:'否',1:'是'] // Required: true - DailyFlag *string `json:"DailyFlag"` + DailyFlag *int64 `json:"DailyFlag"` - // integer + // Int32 // // 是否提供訂便當服務 : [0:'否',1:'是'] // Required: true - DiningFlag *string `json:"DiningFlag"` + DiningFlag *int64 `json:"DiningFlag"` // DiningFlagSection[] // // 提供訂便當服務之車站區間 DiningFlagSections []*PTXServiceDTORailSpecificationV3TRADailyTrainTimeTableDiningFlagSection `json:"DiningFlagSections" xml:"DiningFlagSection[]"` - // integer + // Int32 // // 行駛方向 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // @@ -73,11 +73,11 @@ type PTXServiceDTORailSpecificationV3TRADailyTrainTimeTableTrainInfo struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"EndingStationName" xml:"NameType"` - // integer + // Int32 // // 是否為加班車 : [0:'否',1:'是'] // Required: true - ExtraTrainFlag *string `json:"ExtraTrainFlag"` + ExtraTrainFlag *int64 `json:"ExtraTrainFlag"` // String // @@ -89,11 +89,11 @@ type PTXServiceDTORailSpecificationV3TRADailyTrainTimeTableTrainInfo struct { // 跨夜車站代碼 OverNightStationID string `json:"OverNightStationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 是否提供行李服務 : [0:'否',1:'是'] // Required: true - PackageServiceFlag *string `json:"PackageServiceFlag"` + PackageServiceFlag *int64 `json:"PackageServiceFlag"` // String // @@ -143,16 +143,16 @@ type PTXServiceDTORailSpecificationV3TRADailyTrainTimeTableTrainInfo struct { // 車次之目的地方向描述 TripHeadSign string `json:"TripHeadSign,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` - // integer + // Int32 // // 是否設身障旅客專用座位車 : [0:'否',1:'是'] // Required: true - WheelChairFlag *string `json:"WheelChairFlag"` + WheelChairFlag *int64 `json:"WheelChairFlag"` } // Validate validates this p t x service d t o rail specification v3 t r a daily train time table train info diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go index b579518e..ec0f3e39 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_general_station_timetable_general_station_timetable.go @@ -22,11 +22,11 @@ import ( // swagger:model PTX.Service.DTO.Rail.Specification.V3.TRA.GeneralStationTimetable.GeneralStationTimetable type PTXServiceDTORailSpecificationV3TRAGeneralStationTimetableGeneralStationTimetable struct { - // integer + // Int32 // // 行駛方向 : [0:'順行',1:'逆行'] // Required: true - Direction *string `json:"Direction"` + Direction *int64 `json:"Direction"` // String // diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go index f9dfc4db..b2082d3b 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_o_d_fare_o_d_fare.go @@ -34,10 +34,10 @@ type PTXServiceDTORailSpecificationV3TRAODFareODFare struct { PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"DestinationStationName" xml:"NameType"` - // integer + // Int32 // // 方向 : [0:'順行',1:'逆行'] - Direction string `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` // Array // diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go index d9cec9a9..9d1553d9 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_shape.go @@ -51,7 +51,8 @@ type PTXServiceDTORailSpecificationV3TRAShape struct { // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v3 t r a shape @@ -122,6 +123,10 @@ func (m *PTXServiceDTORailSpecificationV3TRAShape) validateUpdateTime(formats st return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go index 4ef69496..0335e18e 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_alert_list_alert.go @@ -36,30 +36,28 @@ type PTXServiceDTORailSpecificationV3TRATRAAlertListAlert struct { // Required: true Description *string `json:"Description" xml:"String"` - // integer + // Int32 // // 影響方向 : [0:'南下',1:'北上',2:'雙向'] - Direction string `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` // String // // 影響說明 Effect string `json:"Effect,omitempty" xml:"String,omitempty"` - // DateTime - // // 訊息結束日期時間 - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` - // integer + // Int32 // // 影響等級程度 : [1:'重度',2:'中度',3:'輕度'] - Level string `json:"Level,omitempty"` + Level int64 `json:"Level,omitempty"` - // DateTime - // // 消息發佈日期時間 - PublishTime string `json:"PublishTime,omitempty"` + // Format: date-time + PublishTime strfmt.DateTime `json:"PublishTime,omitempty"` // String // @@ -74,16 +72,15 @@ type PTXServiceDTORailSpecificationV3TRATRAAlertListAlert struct { PTXServiceDTORailSpecificationV3TRATRAAlertListAlertScope } `json:"Scope" xml:"AlertScope"` - // DateTime - // // 訊息起始日期時間 - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` - // integer + // Int32 // // 營運狀況 : [0:'全線營運停止',1:'全線營運正常',2:'有異常狀況'] // Required: true - Status *string `json:"Status"` + Status *int64 `json:"Status"` // String // @@ -95,7 +92,8 @@ type PTXServiceDTORailSpecificationV3TRATRAAlertListAlert struct { // // 消息更新日期時間 // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v3 t r a t r a alert list alert @@ -110,10 +108,22 @@ func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) Validate(formats res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateScope(formats); err != nil { res = append(res, err) } + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStatus(formats); err != nil { res = append(res, err) } @@ -150,11 +160,47 @@ func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validateDescripti return nil } +func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validatePublishTime(formats strfmt.Registry) error { + if swag.IsZero(m.PublishTime) { // not required + return nil + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validateScope(formats strfmt.Registry) error { return nil } +func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validateStatus(formats strfmt.Registry) error { if err := validate.Required("Status", "body", m.Status); err != nil { @@ -179,6 +225,10 @@ func (m *PTXServiceDTORailSpecificationV3TRATRAAlertListAlert) validateUpdateTim return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go index 3be62ccc..96c5a4b6 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_news_list_news.go @@ -35,22 +35,21 @@ type PTXServiceDTORailSpecificationV3TRATRANewsListNews struct { // Required: true Description *string `json:"Description" xml:"String"` - // DateTime - // // 消息結束日期時間 - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` - // integer + // Int32 // // 語系 : [1:'Zh_tw',2:'En_us',3:'Zh_cn',4:'Ja',5:'Ko',99:'Other'] // Required: true - Language *string `json:"Language"` + Language *int64 `json:"Language"` - // integer + // Int32 // // 消息類別 : [1:'最新消息',2:'新聞稿',3:'營運資訊',4:'轉乘資訊',5:'活動訊息',6:'系統公告',7:'新服務上架',8:'API修正',9:'來源異常',99:'其他'] // Required: true - NewsCategory *string `json:"NewsCategory"` + NewsCategory *int64 `json:"NewsCategory"` // String // @@ -67,12 +66,12 @@ type PTXServiceDTORailSpecificationV3TRATRANewsListNews struct { // // 消息發佈日期時間 // Required: true - PublishTime *string `json:"PublishTime"` + // Format: date-time + PublishTime *strfmt.DateTime `json:"PublishTime"` - // DateTime - // // 消息起始日期時間 - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // @@ -84,7 +83,8 @@ type PTXServiceDTORailSpecificationV3TRATRANewsListNews struct { // // 本筆資料之更新日期時間 // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v3 t r a t r a news list news @@ -95,6 +95,10 @@ func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) Validate(formats st res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateLanguage(formats); err != nil { res = append(res, err) } @@ -111,6 +115,10 @@ func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) Validate(formats st res = append(res, err) } + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateTitle(formats); err != nil { res = append(res, err) } @@ -134,6 +142,18 @@ func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) validateDescription return nil } +func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) validateLanguage(formats strfmt.Registry) error { if err := validate.Required("Language", "body", m.Language); err != nil { @@ -167,6 +187,22 @@ func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) validatePublishTime return err } + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + return nil } @@ -185,6 +221,10 @@ func (m *PTXServiceDTORailSpecificationV3TRATRANewsListNews) validateUpdateTime( return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go index c00d6383..872b05c7 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_station_live_board_list_station_live_board.go @@ -25,10 +25,10 @@ type PTXServiceDTORailSpecificationV3TRATRAStationLiveBoardListStationLiveBoard // Required: true DelayTime *int32 `json:"DelayTime"` - // integer + // Int32 // // 行駛方向 : [0:'順行',1:'逆行'] - Direction string `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` // String // @@ -48,10 +48,10 @@ type PTXServiceDTORailSpecificationV3TRATRAStationLiveBoardListStationLiveBoard // 停靠月台(00代表當時尚未確定停靠的月台,待確定好停靠的月台後,就會更新Platfrom。) Platform string `json:"Platform,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 列車狀態 : [0:'準點',1:'誤點',2:'取消'] - RunningStatus string `json:"RunningStatus,omitempty"` + RunningStatus int64 `json:"RunningStatus,omitempty"` // String // @@ -101,16 +101,17 @@ type PTXServiceDTORailSpecificationV3TRATRAStationLiveBoardListStationLiveBoard PTXServiceDTOSharedSpecificationV3BaseNameType } `json:"TrainTypeName" xml:"NameType"` - // integer + // Int32 // // 山海線類型 : [0:'不經山海線',1:'山線',2:'海線',3:'成追線'] - TripLine string `json:"TripLine,omitempty"` + TripLine int64 `json:"TripLine,omitempty"` // DateTime // // 本筆資料之更新日期時間 // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v3 t r a t r a station live board list station live board @@ -199,6 +200,10 @@ func (m *PTXServiceDTORailSpecificationV3TRATRAStationLiveBoardListStationLiveBo return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go index 8640f0c0..5072245d 100644 --- a/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go +++ b/rail/v3/models/p_t_x_service_d_t_o_rail_specification_v3_t_r_a_t_r_a_train_live_board_list_train_live_board.go @@ -43,10 +43,10 @@ type PTXServiceDTORailSpecificationV3TRATRATrainLiveBoardListTrainLiveBoard stru // 車次代碼 TrainNo string `json:"TrainNo,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 列車目前所在之車站狀態 : [0:'進站中',1:'在站上',2:'已離站'] - TrainStationStatus string `json:"TrainStationStatus,omitempty"` + TrainStationStatus int64 `json:"TrainStationStatus,omitempty"` // String // @@ -70,7 +70,8 @@ type PTXServiceDTORailSpecificationV3TRATRATrainLiveBoardListTrainLiveBoard stru // // 本筆位置資料之更新日期時間 // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o rail specification v3 t r a t r a train live board list train live board @@ -124,6 +125,10 @@ func (m *PTXServiceDTORailSpecificationV3TRATRATrainLiveBoardListTrainLiveBoard) return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/spec/main.go b/spec/main.go index 51cccdf1..ce4435de 100644 --- a/spec/main.go +++ b/spec/main.go @@ -21,15 +21,6 @@ func main() { { Filename: "oas.bus.v2.json", URL: "https://ptx.transportdata.tw/MOTC/v2/Bus/api-docs/oas", - Pipeline: []Step{ - fixBusV2BusA1DataDirectionProperty, - fixBusV2BusRouteBusRouteTypeProperty, - fixBusV2BusVehicleInfoVehicleTypeProperty, - fixBusV2DirectionProperty, - fixBusV2SectionFareBufferZoneDirectionProperty, - fixBusV2BusN1EstimateTimeDirectionProperty, - fixBusV2BusShapeDirectionProperty, - }, }, { Filename: "oas.bus.v3.json", @@ -97,80 +88,3 @@ func writeFile(filename string, data []byte) { _ = enc.Encode(v) _ = ioutil.WriteFile(filename, bf.Bytes(), 0644) } - -func fixBusV2BusA1DataDirectionProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string"`), - []byte(`"description": "去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer"`), - -1, - ) -} - -func fixBusV2BusRouteBusRouteTypeProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車']", - "type": "string"`), - []byte(`"description": "公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車']", - "type": "integer"`), - -1, - ) -} - -func fixBusV2BusVehicleInfoVehicleTypeProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "車輛種類 : [0:'一般',1:'無障礙公車',2:'復康巴士',3:'小型巴士']", - "type": "string"`), - []byte(`"description": "車輛種類 : [0:'一般',1:'無障礙公車',2:'復康巴士',3:'小型巴士']", - "type": "integer"`), - -1, - ) -} - -func fixBusV2DirectionProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string"`), - []byte(`"description": "影響方向 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer"`), - -1, - ) -} - -func fixBusV2SectionFareBufferZoneDirectionProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string"`), - []byte(`"description": "方向性描述 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer"`), - -1, - ) -} - -func fixBusV2BusN1EstimateTimeDirectionProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "去返程(該方向指的是此車牌車輛目前所在路線的去返程方向,非指站站牌所在路線的去返程方向,使用時請加值業者多加注意) : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string"`), - []byte(`"description": "去返程(該方向指的是此車牌車輛目前所在路線的去返程方向,非指站站牌所在路線的去返程方向,使用時請加值業者多加注意) : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer"`), - -1, - ) -} - -func fixBusV2BusShapeDirectionProperty(data []byte) []byte { - return bytes.Replace( - data, - []byte(`"description": "去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "string"`), - []byte(`"description": "去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知']", - "type": "integer"`), - -1, - ) -} diff --git a/tourism/v2/client/tourism/tourism_api_activity0_parameters.go b/tourism/v2/client/tourism/tourism_api_activity0_parameters.go index 2929575f..174997a0 100644 --- a/tourism/v2/client/tourism/tourism_api_activity0_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_activity0_parameters.go @@ -92,7 +92,7 @@ type TourismAPIActivity0Params struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_api_activity_parameters.go b/tourism/v2/client/tourism/tourism_api_activity_parameters.go index 3e892cb1..ad60817e 100644 --- a/tourism/v2/client/tourism/tourism_api_activity_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_activity_parameters.go @@ -92,7 +92,7 @@ type TourismAPIActivityParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_api_hotel0_parameters.go b/tourism/v2/client/tourism/tourism_api_hotel0_parameters.go index 3ccd3ef9..e4b396b9 100644 --- a/tourism/v2/client/tourism/tourism_api_hotel0_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_hotel0_parameters.go @@ -92,7 +92,7 @@ type TourismAPIHotel0Params struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_api_hotel_parameters.go b/tourism/v2/client/tourism/tourism_api_hotel_parameters.go index cc11d499..0b024bc1 100644 --- a/tourism/v2/client/tourism/tourism_api_hotel_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_hotel_parameters.go @@ -92,7 +92,7 @@ type TourismAPIHotelParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_api_restaurant0_parameters.go b/tourism/v2/client/tourism/tourism_api_restaurant0_parameters.go index 097926c1..e69e0c47 100644 --- a/tourism/v2/client/tourism/tourism_api_restaurant0_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_restaurant0_parameters.go @@ -92,7 +92,7 @@ type TourismAPIRestaurant0Params struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_api_restaurant_parameters.go b/tourism/v2/client/tourism/tourism_api_restaurant_parameters.go index 1e42f1d8..12ca116c 100644 --- a/tourism/v2/client/tourism/tourism_api_restaurant_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_restaurant_parameters.go @@ -92,7 +92,7 @@ type TourismAPIRestaurantParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_api_scenic_spot0_parameters.go b/tourism/v2/client/tourism/tourism_api_scenic_spot0_parameters.go index e22c75c3..006c6311 100644 --- a/tourism/v2/client/tourism/tourism_api_scenic_spot0_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_scenic_spot0_parameters.go @@ -92,7 +92,7 @@ type TourismAPIScenicSpot0Params struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string @@ -104,7 +104,10 @@ type TourismAPIScenicSpot0Params struct { */ DollarTop *int64 - // City. + /* City. + + 縣市名稱 + */ City string timeout time.Duration diff --git a/tourism/v2/client/tourism/tourism_api_scenic_spot_parameters.go b/tourism/v2/client/tourism/tourism_api_scenic_spot_parameters.go index 744c8210..ab8af203 100644 --- a/tourism/v2/client/tourism/tourism_api_scenic_spot_parameters.go +++ b/tourism/v2/client/tourism/tourism_api_scenic_spot_parameters.go @@ -92,7 +92,7 @@ type TourismAPIScenicSpotParams struct { /* DollarSpatialFilter. - 空間過濾 + 空間過濾,語法為nearby({Lat},{Lon},{DistanceInMeters}),例如nearby(25.047675, 121.517055, 100) */ DollarSpatialFilter *string diff --git a/tourism/v2/client/tourism/tourism_client.go b/tourism/v2/client/tourism/tourism_client.go index 6a92c26c..8b5c65f7 100644 --- a/tourism/v2/client/tourism/tourism_client.go +++ b/tourism/v2/client/tourism/tourism_client.go @@ -1002,9 +1002,9 @@ func (a *Client) TourismAPIScenicSpot(params *TourismAPIScenicSpotParams, opts . } /* - TourismAPIScenicSpot0 取得所有觀光景點資料s + TourismAPIScenicSpot0 取得指定s 縣市 觀光景點資料 - 取得所有觀光景點資料 + 取得指定[縣市]觀光景點資料 */ func (a *Client) TourismAPIScenicSpot0(params *TourismAPIScenicSpot0Params, opts ...ClientOption) (*TourismAPIScenicSpot0OK, error) { // TODO: Validate the params before sending diff --git a/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go b/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go index b757afa0..e5163b66 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_name_type.go @@ -22,12 +22,12 @@ type PTXServiceDTOSharedSpecificationV2BaseNameType struct { // String // // 英文名稱 - En string `json:"En,omitempty"` + En string `json:"En,omitempty" xml:"String,omitempty"` // String // // 中文繁體名稱 - ZhTw string `json:"Zh_tw,omitempty"` + ZhTw string `json:"Zh_tw,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o shared specification v2 base name type diff --git a/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go b/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go index 02645203..0312b38d 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_shared_specification_v2_base_point_type.go @@ -22,7 +22,7 @@ type PTXServiceDTOSharedSpecificationV2BasePointType struct { // String // // 地理空間編碼 - GeoHash string `json:"GeoHash,omitempty"` + GeoHash string `json:"GeoHash,omitempty" xml:"String,omitempty"` // 位置緯度(WGS84) PositionLat float64 `json:"PositionLat,omitempty"` diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_activity_tourism_info.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_activity_tourism_info.go index cb0832c9..05a42917 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_activity_tourism_info.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_activity_tourism_info.go @@ -24,140 +24,140 @@ type PTXServiceDTOTourismSpecificationV2ActivityTourismInfo struct { // String // // 主要活動地點地址 - Address string `json:"Address,omitempty"` + Address string `json:"Address,omitempty" xml:"String,omitempty"` // String // // 費用標示 - Charge string `json:"Charge,omitempty"` + Charge string `json:"Charge,omitempty" xml:"String,omitempty"` // String // // 所屬縣市 - City string `json:"City,omitempty"` + City string `json:"City,omitempty" xml:"String,omitempty"` // String // // 活動分類1 - Class1 string `json:"Class1,omitempty"` + Class1 string `json:"Class1,omitempty" xml:"String,omitempty"` // String // // 活動分類2 - Class2 string `json:"Class2,omitempty"` + Class2 string `json:"Class2,omitempty" xml:"String,omitempty"` // String // // 週期性活動執行時間 - Cycle string `json:"Cycle,omitempty"` + Cycle string `json:"Cycle,omitempty" xml:"String,omitempty"` // String // // 活動簡述 - Description string `json:"Description,omitempty"` + Description string `json:"Description,omitempty" xml:"String,omitempty"` - // DateTime - // // 活動結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` // String // // 活動訊息代碼 // Required: true - ID *string `json:"ID"` + ID *string `json:"ID" xml:"String"` // String // // 主要活動地點名稱 - Location string `json:"Location,omitempty"` + Location string `json:"Location,omitempty" xml:"String,omitempty"` // String // // 活動地圖/簡圖連結網址 - MapURL string `json:"MapUrl,omitempty"` + MapURL string `json:"MapUrl,omitempty" xml:"String,omitempty"` // String // // 活動名稱 - Name string `json:"Name,omitempty"` + Name string `json:"Name,omitempty" xml:"String,omitempty"` // String // // 非週期性活動執行時間 - NonCycle string `json:"NonCycle,omitempty"` + NonCycle string `json:"NonCycle,omitempty" xml:"String,omitempty"` // String // // 活動主辦單位 - Organizer string `json:"Organizer,omitempty"` + Organizer string `json:"Organizer,omitempty" xml:"String,omitempty"` // String // // 停車資訊 - ParkingInfo string `json:"ParkingInfo,omitempty"` + ParkingInfo string `json:"ParkingInfo,omitempty" xml:"String,omitempty"` // String // // 活動參與對象 - Particpation string `json:"Particpation,omitempty"` + Particpation string `json:"Particpation,omitempty" xml:"String,omitempty"` // String // // 活動聯絡電話 - Phone string `json:"Phone,omitempty"` + Phone string `json:"Phone,omitempty" xml:"String,omitempty"` // TourismPicture // // 活動照片 Picture struct { PTXServiceDTOTourismSpecificationV2TourismPicture - } `json:"Picture,omitempty"` + } `json:"Picture,omitempty" xml:"TourismPicture,omitempty"` // PointType // // 活動位置 Position struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"Position,omitempty"` + } `json:"Position,omitempty" xml:"PointType,omitempty"` // String // // 備註(其他活動相關事項) - Remarks string `json:"Remarks,omitempty"` + Remarks string `json:"Remarks,omitempty" xml:"String,omitempty"` - // DateTime - // // 觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` - // DateTime - // // 活動開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // // 交通資訊 - TravelInfo string `json:"TravelInfo,omitempty"` + TravelInfo string `json:"TravelInfo,omitempty" xml:"String,omitempty"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // // 活動網址 - WebsiteURL string `json:"WebsiteUrl,omitempty"` + WebsiteURL string `json:"WebsiteUrl,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 activity tourism info func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateID(formats); err != nil { res = append(res, err) } @@ -174,6 +174,10 @@ func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) Validate(format res = append(res, err) } + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -184,6 +188,18 @@ func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) Validate(format return nil } +func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) validateID(formats strfmt.Registry) error { if err := validate.Required("ID", "body", m.ID); err != nil { @@ -215,6 +231,22 @@ func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) validateSrcUpda return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + return nil } @@ -224,6 +256,10 @@ func (m *PTXServiceDTOTourismSpecificationV2ActivityTourismInfo) validateUpdateT return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a1_data.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a1_data.go index b50941b6..750f9801 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a1_data.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a1_data.go @@ -30,105 +30,104 @@ type PTXServiceDTOTourismSpecificationV2BusA1Data struct { // 車輛位置經度 BusPosition struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"BusPosition,omitempty"` + } `json:"BusPosition,omitempty" xml:"PointType,omitempty"` - // integer + // Int32 // // 行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知'] // Required: true - BusStatus *int32 `json:"BusStatus"` + BusStatus *int64 `json:"BusStatus"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] - Direction int32 `json:"Direction,omitempty"` + Direction int64 `json:"Direction,omitempty"` - // integer + // Int32 // // 勤務狀態 : [0:'正常',1:'開始',2:'結束'] // Required: true - DutyStatus *int32 `json:"DutyStatus"` + DutyStatus *int64 `json:"DutyStatus"` // DateTime // // 車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - GPSTime *string `json:"GPSTime"` + // Format: date-time + GPSTime *strfmt.DateTime `json:"GPSTime"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType int32 `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` // String // // 營運業者代碼 - OperatorID string `json:"OperatorID,omitempty"` + OperatorID string `json:"OperatorID,omitempty" xml:"String,omitempty"` // String // // 車牌號碼 // Required: true - PlateNumb *string `json:"PlateNumb"` + PlateNumb *string `json:"PlateNumb" xml:"String"` // String // // 地區既用中之路線代碼(為原資料內碼) - RouteID string `json:"RouteID,omitempty"` + RouteID string `json:"RouteID,omitempty" xml:"String,omitempty"` // String // // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - RouteUID string `json:"RouteUID,omitempty"` + RouteUID string `json:"RouteUID,omitempty" xml:"String,omitempty"` // 行駛速度(kph) // Required: true Speed *float64 `json:"Speed"` - // DateTime - // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcRecTime string `json:"SrcRecTime,omitempty"` + // Format: date-time + SrcRecTime strfmt.DateTime `json:"SrcRecTime,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // // 地區既用中之子路線代碼(為原資料內碼) - SubRouteID string `json:"SubRouteID,omitempty"` + SubRouteID string `json:"SubRouteID,omitempty" xml:"String,omitempty"` // NameType // // 子路線名稱 SubRouteName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"SubRouteName,omitempty"` + } `json:"SubRouteName,omitempty" xml:"NameType,omitempty"` // String // // 子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - SubRouteUID string `json:"SubRouteUID,omitempty"` + SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` // NameType // // 台灣好行路線名稱 TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName,omitempty"` + } `json:"TaiwanTripName,omitempty" xml:"NameType,omitempty"` - // DateTime - // // 車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - TransTime string `json:"TransTime,omitempty"` + // Format: date-time + TransTime strfmt.DateTime `json:"TransTime,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus a1 data @@ -163,6 +162,14 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) Validate(formats strfmt.R res = append(res, err) } + if err := m.validateSrcRecTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateSubRouteName(formats); err != nil { res = append(res, err) } @@ -171,6 +178,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) Validate(formats strfmt.R res = append(res, err) } + if err := m.validateTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -222,6 +233,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateGPSTime(formats s return err } + if err := validate.FormatOf("GPSTime", "body", "date-time", m.GPSTime.String(), formats); err != nil { + return err + } + return nil } @@ -243,6 +258,30 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateSpeed(formats str return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateSrcRecTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcRecTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcRecTime", "body", "date-time", m.SrcRecTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateSubRouteName(formats strfmt.Registry) error { if swag.IsZero(m.SubRouteName) { // not required return nil @@ -259,12 +298,28 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateTaiwanTripName(fo return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.TransTime) { // not required + return nil + } + + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusA1Data) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a2_data.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a2_data.go index d825a909..a134c40e 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a2_data.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_a2_data.go @@ -21,120 +21,119 @@ import ( // swagger:model PTX.Service.DTO.Tourism.Specification.V2.BusA2Data type PTXServiceDTOTourismSpecificationV2BusA2Data struct { - // integer + // Int32 // // 進站離站 : [0:'離站',1:'進站'] - A2EventType int32 `json:"A2EventType,omitempty"` + A2EventType int64 `json:"A2EventType,omitempty"` - // integer + // Int32 // // 行車狀況 : [0:'正常',1:'車禍',2:'故障',3:'塞車',4:'緊急求援',5:'加油',90:'不明',91:'去回不明',98:'偏移路線',99:'非營運狀態',100:'客滿',101:'包車出租',255:'未知'] - BusStatus int32 `json:"BusStatus,omitempty"` + BusStatus int64 `json:"BusStatus,omitempty"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *int32 `json:"Direction"` + Direction *int64 `json:"Direction"` - // integer + // Int32 // // 勤務狀態 : [0:'正常',1:'開始',2:'結束'] - DutyStatus int32 `json:"DutyStatus,omitempty"` + DutyStatus int64 `json:"DutyStatus,omitempty"` // DateTime // // 車機時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - GPSTime *string `json:"GPSTime"` + // Format: date-time + GPSTime *strfmt.DateTime `json:"GPSTime"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType int32 `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` // String // // 營運業者代碼 - OperatorID string `json:"OperatorID,omitempty"` + OperatorID string `json:"OperatorID,omitempty" xml:"String,omitempty"` // String // // 車牌號碼 // Required: true - PlateNumb *string `json:"PlateNumb"` + PlateNumb *string `json:"PlateNumb" xml:"String"` // String // // 地區既用中之路線代碼(為原資料內碼) - RouteID string `json:"RouteID,omitempty"` + RouteID string `json:"RouteID,omitempty" xml:"String,omitempty"` // String // // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - RouteUID string `json:"RouteUID,omitempty"` + RouteUID string `json:"RouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcRecTime string `json:"SrcRecTime,omitempty"` + // Format: date-time + SrcRecTime strfmt.DateTime `json:"SrcRecTime,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // String // // 地區既用中之站牌代號(為原資料內碼) - StopID string `json:"StopID,omitempty"` + StopID string `json:"StopID,omitempty" xml:"String,omitempty"` // NameType // // 站牌名 StopName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"StopName,omitempty"` + } `json:"StopName,omitempty" xml:"NameType,omitempty"` // String // // 站牌唯一識別代碼,規則為 {平台代碼} + {StopID},其中 {平台代碼} 可於Provider API中的ProviderCode欄位查詢 - StopUID string `json:"StopUID,omitempty"` + StopUID string `json:"StopUID,omitempty" xml:"String,omitempty"` // String // // 地區既用中之子路線代碼(為原資料內碼) - SubRouteID string `json:"SubRouteID,omitempty"` + SubRouteID string `json:"SubRouteID,omitempty" xml:"String,omitempty"` // NameType // // 子路線名稱 SubRouteName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"SubRouteName,omitempty"` + } `json:"SubRouteName,omitempty" xml:"NameType,omitempty"` // String // // 子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - SubRouteUID string `json:"SubRouteUID,omitempty"` + SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` // NameType // // 台灣好行路線名稱 TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName,omitempty"` + } `json:"TaiwanTripName,omitempty" xml:"NameType,omitempty"` - // DateTime - // // 車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - TransTime string `json:"TransTime,omitempty"` + // Format: date-time + TransTime strfmt.DateTime `json:"TransTime,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus a2 data @@ -153,6 +152,14 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) Validate(formats strfmt.R res = append(res, err) } + if err := m.validateSrcRecTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStopName(formats); err != nil { res = append(res, err) } @@ -165,6 +172,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) Validate(formats strfmt.R res = append(res, err) } + if err := m.validateTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -190,6 +201,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateGPSTime(formats s return err } + if err := validate.FormatOf("GPSTime", "body", "date-time", m.GPSTime.String(), formats); err != nil { + return err + } + return nil } @@ -202,6 +217,30 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validatePlateNumb(formats return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateSrcRecTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcRecTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcRecTime", "body", "date-time", m.SrcRecTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateStopName(formats strfmt.Registry) error { if swag.IsZero(m.StopName) { // not required return nil @@ -226,12 +265,28 @@ func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateTaiwanTripName(fo return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.TransTime) { // not required + return nil + } + + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusA2Data) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_frequency.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_frequency.go index d48fb882..fca424d2 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_frequency.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_frequency.go @@ -26,7 +26,7 @@ type PTXServiceDTOTourismSpecificationV2BusFrequency struct { // // 發車班距結束適用時間,格式為: HH:mm // Required: true - EndTime *string `json:"EndTime"` + EndTime *string `json:"EndTime" xml:"String"` // Int32 // @@ -45,18 +45,18 @@ type PTXServiceDTOTourismSpecificationV2BusFrequency struct { // 週內營運日 ServiceDay struct { PTXServiceDTOTourismSpecificationV2ServiceDay - } `json:"ServiceDay,omitempty"` + } `json:"ServiceDay,omitempty" xml:"ServiceDay,omitempty"` // Array // // 特殊營運日 - SpecialDays []*PTXServiceDTOTourismSpecificationV2SpecialDay `json:"SpecialDays"` + SpecialDays []*PTXServiceDTOTourismSpecificationV2SpecialDay "json:\"SpecialDays\" xml:\"List`1\"" // String // // 發車班距起始適用時間,格式為: HH:mm // Required: true - StartTime *string `json:"StartTime"` + StartTime *string `json:"StartTime" xml:"String"` } // Validate validates this p t x service d t o tourism specification v2 bus frequency diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_n1_estimate_time.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_n1_estimate_time.go index 762a6e62..83055455 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_n1_estimate_time.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_n1_estimate_time.go @@ -22,18 +22,18 @@ type PTXServiceDTOTourismSpecificationV2BusN1EstimateTime struct { // String // // 車輛目前所在站牌代碼 - CurrentStop string `json:"CurrentStop,omitempty"` + CurrentStop string `json:"CurrentStop,omitempty" xml:"String,omitempty"` // String // // 車輛目的站牌代碼 - DestinationStop string `json:"DestinationStop,omitempty"` + DestinationStop string `json:"DestinationStop,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *int32 `json:"Direction"` + Direction *int64 `json:"Direction"` // 到站時間預估(秒) EstimateTime int32 `json:"EstimateTime,omitempty"` @@ -41,40 +41,37 @@ type PTXServiceDTOTourismSpecificationV2BusN1EstimateTime struct { // 是否為末班車 IsLastBus bool `json:"IsLastBus,omitempty"` - // integer + // Int32 // // 資料型態種類 : [0:'未知',1:'定期',2:'非定期'] - MessageType int32 `json:"MessageType,omitempty"` + MessageType int64 `json:"MessageType,omitempty"` - // DateTime - // // 下一班公車到達時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - NextBusTime string `json:"NextBusTime,omitempty"` + // Format: date-time + NextBusTime strfmt.DateTime `json:"NextBusTime,omitempty"` // String // // 車牌號碼 - PlateNumb string `json:"PlateNumb,omitempty"` + PlateNumb string `json:"PlateNumb,omitempty" xml:"String,omitempty"` // String // // 地區既用中之路線代碼(為原資料內碼) - RouteID string `json:"RouteID,omitempty"` + RouteID string `json:"RouteID,omitempty" xml:"String,omitempty"` // String // // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - RouteUID string `json:"RouteUID,omitempty"` + RouteUID string `json:"RouteUID,omitempty" xml:"String,omitempty"` - // DateTime - // // 來源端平台接收時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcRecTime string `json:"SrcRecTime,omitempty"` + // Format: date-time + SrcRecTime strfmt.DateTime `json:"SrcRecTime,omitempty"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - SrcUpdateTime string `json:"SrcUpdateTime,omitempty"` + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` // 車輛距離本站站數 StopCountDown int32 `json:"StopCountDown,omitempty"` @@ -82,59 +79,59 @@ type PTXServiceDTOTourismSpecificationV2BusN1EstimateTime struct { // String // // 地區既用中之站牌代碼(為原資料內碼) - StopID string `json:"StopID,omitempty"` + StopID string `json:"StopID,omitempty" xml:"String,omitempty"` // NameType // // 站牌名 StopName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"StopName,omitempty"` + } `json:"StopName,omitempty" xml:"NameType,omitempty"` - // integer + // Int32 // // 車輛狀態備註 : [0:'正常',1:'尚未發車',2:'交管不停靠',3:'末班車已過',4:'今日未營運'] - StopStatus int32 `json:"StopStatus,omitempty"` + StopStatus int64 `json:"StopStatus,omitempty"` // String // // 站牌唯一識別代碼,規則為 {業管機關代碼} + {StopID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - StopUID string `json:"StopUID,omitempty"` + StopUID string `json:"StopUID,omitempty" xml:"String,omitempty"` // String // // 地區既用中之子路線代碼(為原資料內碼) - SubRouteID string `json:"SubRouteID,omitempty"` + SubRouteID string `json:"SubRouteID,omitempty" xml:"String,omitempty"` // NameType // // 子路線名稱 SubRouteName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"SubRouteName,omitempty"` + } `json:"SubRouteName,omitempty" xml:"NameType,omitempty"` // String // // 子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 - SubRouteUID string `json:"SubRouteUID,omitempty"` + SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` // NameType // // 台灣好行路線名稱 TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName,omitempty"` + } `json:"TaiwanTripName,omitempty" xml:"NameType,omitempty"` - // DateTime - // // 車機資料傳輸時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - TransTime string `json:"TransTime,omitempty"` + // Format: date-time + TransTime strfmt.DateTime `json:"TransTime,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus n1 estimate time @@ -145,6 +142,18 @@ func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) Validate(formats res = append(res, err) } + if err := m.validateNextBusTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcRecTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateStopName(formats); err != nil { res = append(res, err) } @@ -157,6 +166,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) Validate(formats res = append(res, err) } + if err := m.validateTransTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateUpdateTime(formats); err != nil { res = append(res, err) } @@ -176,6 +189,42 @@ func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateDirection return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateNextBusTime(formats strfmt.Registry) error { + if swag.IsZero(m.NextBusTime) { // not required + return nil + } + + if err := validate.FormatOf("NextBusTime", "body", "date-time", m.NextBusTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateSrcRecTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcRecTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcRecTime", "body", "date-time", m.SrcRecTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateStopName(formats strfmt.Registry) error { if swag.IsZero(m.StopName) { // not required return nil @@ -200,12 +249,28 @@ func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateTaiwanTri return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateTransTime(formats strfmt.Registry) error { + if swag.IsZero(m.TransTime) { // not required + return nil + } + + if err := validate.FormatOf("TransTime", "body", "date-time", m.TransTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusN1EstimateTime) validateUpdateTime(formats strfmt.Registry) error { if err := validate.Required("UpdateTime", "body", m.UpdateTime); err != nil { return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_route.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_route.go index 15289969..9f44ab52 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_route.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_route.go @@ -26,53 +26,53 @@ type PTXServiceDTOTourismSpecificationV2BusRoute struct { // // 業管單位代碼 // Required: true - AuthorityID *string `json:"AuthorityID"` + AuthorityID *string `json:"AuthorityID" xml:"String"` - // integer + // Int32 // // 公車路線類別 : [11:'市區公車',12:'公路客運',13:'國道客運',14:'接駁車'] // Required: true - BusRouteType *int32 `json:"BusRouteType"` + BusRouteType *int64 `json:"BusRouteType"` // String // // 路線權管所屬縣市(相當於市區公車API的City參數)[若為公路/國道客運路線則為空值] - City string `json:"City,omitempty"` + City string `json:"City,omitempty" xml:"String,omitempty"` // String // // 路線權管所屬縣市之代碼(國際ISO 3166-2 三碼城市代碼)[若為公路/國道客運路線則為空值] - CityCode string `json:"CityCode,omitempty"` + CityCode string `json:"CityCode,omitempty" xml:"String,omitempty"` // String // // 起站英文名稱 - DepartureStopNameEn string `json:"DepartureStopNameEn,omitempty"` + DepartureStopNameEn string `json:"DepartureStopNameEn,omitempty" xml:"String,omitempty"` // String // // 起站中文名稱 - DepartureStopNameZh string `json:"DepartureStopNameZh,omitempty"` + DepartureStopNameZh string `json:"DepartureStopNameZh,omitempty" xml:"String,omitempty"` // String // // 終點站英文名稱 - DestinationStopNameEn string `json:"DestinationStopNameEn,omitempty"` + DestinationStopNameEn string `json:"DestinationStopNameEn,omitempty" xml:"String,omitempty"` // String // // 終點站中文名稱 - DestinationStopNameZh string `json:"DestinationStopNameZh,omitempty"` + DestinationStopNameZh string `json:"DestinationStopNameZh,omitempty" xml:"String,omitempty"` // String // // 收費緩衝區英文敘述 - FareBufferZoneDescriptionEn string `json:"FareBufferZoneDescriptionEn,omitempty"` + FareBufferZoneDescriptionEn string `json:"FareBufferZoneDescriptionEn,omitempty" xml:"String,omitempty"` // String // // 收費緩衝區中文敘述 - FareBufferZoneDescriptionZh string `json:"FareBufferZoneDescriptionZh,omitempty"` + FareBufferZoneDescriptionZh string `json:"FareBufferZoneDescriptionZh,omitempty" xml:"String,omitempty"` // Boolean // @@ -83,52 +83,52 @@ type PTXServiceDTOTourismSpecificationV2BusRoute struct { // String // // 路線公車動態資訊網址 - LiveBusURL string `json:"LiveBusUrl,omitempty"` + LiveBusURL string `json:"LiveBusUrl,omitempty" xml:"String,omitempty"` // Array // // 營運業者代碼 // Required: true - OperatorIDs []string `json:"OperatorIDs"` + OperatorIDs []string "json:\"OperatorIDs\" xml:\"List`1\"" // Array // // 營運業者 // Required: true - Operators []*PTXServiceDTOTourismSpecificationV2RouteOperator `json:"Operators"` + Operators []*PTXServiceDTOTourismSpecificationV2RouteOperator "json:\"Operators\" xml:\"List`1\"" // String // // 資料提供平台代碼 // Required: true - ProviderID *string `json:"ProviderID"` + ProviderID *string `json:"ProviderID" xml:"String"` // String // // 地區既用中之路線代碼(為原資料內碼) // Required: true - RouteID *string `json:"RouteID"` + RouteID *string `json:"RouteID" xml:"String"` // String // // 路線簡圖網址 - RouteMapImageURL string `json:"RouteMapImageUrl,omitempty"` + RouteMapImageURL string `json:"RouteMapImageUrl,omitempty" xml:"String,omitempty"` // String // // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - RouteUID *string `json:"RouteUID"` + RouteUID *string `json:"RouteUID" xml:"String"` // String // // 路線資訊說明網址 - RouteURL string `json:"RouteUrl,omitempty"` + RouteURL string `json:"RouteUrl,omitempty" xml:"String,omitempty"` // Array // // 附屬路線資料(如果原始資料並無提供附屬路線ID,而本平台基於跨來源資料之一致性,會以SubRouteID=RouteID產製一份相對應的附屬路線資料(若有去返程,則會有兩筆)) - SubRoutes []*PTXServiceDTOTourismSpecificationV2BusSubRoute `json:"SubRoutes"` + SubRoutes []*PTXServiceDTOTourismSpecificationV2BusSubRoute "json:\"SubRoutes\" xml:\"List`1\"" // NameType // @@ -136,23 +136,24 @@ type PTXServiceDTOTourismSpecificationV2BusRoute struct { // Required: true TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName"` + } `json:"TaiwanTripName" xml:"NameType"` // String // // 票價英文敘述 - TicketPriceDescriptionEn string `json:"TicketPriceDescriptionEn,omitempty"` + TicketPriceDescriptionEn string `json:"TicketPriceDescriptionEn,omitempty" xml:"String,omitempty"` // String // // 票價中文敘述 - TicketPriceDescriptionZh string `json:"TicketPriceDescriptionZh,omitempty"` + TicketPriceDescriptionZh string `json:"TicketPriceDescriptionZh,omitempty" xml:"String,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus route @@ -332,6 +333,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusRoute) validateUpdateTime(formats return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_schedule.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_schedule.go index 9e2292e6..10e61a3c 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_schedule.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_schedule.go @@ -20,34 +20,34 @@ import ( // swagger:model PTX.Service.DTO.Tourism.Specification.V2.BusSchedule type PTXServiceDTOTourismSpecificationV2BusSchedule struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *int32 `json:"Direction"` + Direction *int64 `json:"Direction"` // Array // // 發車班距 - Frequencys []*PTXServiceDTOTourismSpecificationV2BusFrequency `json:"Frequencys"` + Frequencys []*PTXServiceDTOTourismSpecificationV2BusFrequency "json:\"Frequencys\" xml:\"List`1\"" // String // // 地區既用中之路線代碼(為原資料內碼) // Required: true - RouteID *string `json:"RouteID"` + RouteID *string `json:"RouteID" xml:"String"` // String // // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - RouteUID *string `json:"RouteUID"` + RouteUID *string `json:"RouteUID" xml:"String"` // String // // 地區既用中之子路線代碼(為原資料內碼) // Required: true - SubRouteID *string `json:"SubRouteID"` + SubRouteID *string `json:"SubRouteID" xml:"String"` // NameType // @@ -55,13 +55,13 @@ type PTXServiceDTOTourismSpecificationV2BusSchedule struct { // Required: true SubRouteName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"SubRouteName"` + } `json:"SubRouteName" xml:"NameType"` // String // // 子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - SubRouteUID *string `json:"SubRouteUID"` + SubRouteUID *string `json:"SubRouteUID" xml:"String"` // NameType // @@ -69,18 +69,19 @@ type PTXServiceDTOTourismSpecificationV2BusSchedule struct { // Required: true TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName"` + } `json:"TaiwanTripName" xml:"NameType"` // Array // // 預定班表 - Timetables []*PTXServiceDTOTourismSpecificationV2BusTimetable `json:"Timetables"` + Timetables []*PTXServiceDTOTourismSpecificationV2BusTimetable "json:\"Timetables\" xml:\"List`1\"" // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus schedule @@ -242,6 +243,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusSchedule) validateUpdateTime(form return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_of_route.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_of_route.go index c35f9821..14741fdf 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_of_route.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_of_route.go @@ -22,11 +22,11 @@ import ( // swagger:model PTX.Service.DTO.Tourism.Specification.V2.BusStopOfRoute type PTXServiceDTOTourismSpecificationV2BusStopOfRoute struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *int32 `json:"Direction"` + Direction *int64 `json:"Direction"` // Boolean // @@ -38,25 +38,25 @@ type PTXServiceDTOTourismSpecificationV2BusStopOfRoute struct { // // 地區既用中之路線代碼(為原資料內碼) // Required: true - RouteID *string `json:"RouteID"` + RouteID *string `json:"RouteID" xml:"String"` // String // // 路線唯一識別代碼,規則為 {業管機關代碼} + {RouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - RouteUID *string `json:"RouteUID"` + RouteUID *string `json:"RouteUID" xml:"String"` // Array // // 所有經過站牌 // Required: true - Stops []*PTXServiceDTOTourismSpecificationV2Stop `json:"Stops"` + Stops []*PTXServiceDTOTourismSpecificationV2Stop "json:\"Stops\" xml:\"List`1\"" // String // // 地區既用中之子路線代碼(為原資料內碼) // Required: true - SubRouteID *string `json:"SubRouteID"` + SubRouteID *string `json:"SubRouteID" xml:"String"` // NameType // @@ -64,13 +64,13 @@ type PTXServiceDTOTourismSpecificationV2BusStopOfRoute struct { // Required: true SubRouteName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"SubRouteName"` + } `json:"SubRouteName" xml:"NameType"` // String // // 子路線唯一識別代碼,規則為 {業管機關代碼} + {SubRouteID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - SubRouteUID *string `json:"SubRouteUID"` + SubRouteUID *string `json:"SubRouteUID" xml:"String"` // NameType // @@ -78,13 +78,14 @@ type PTXServiceDTOTourismSpecificationV2BusStopOfRoute struct { // Required: true TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName"` + } `json:"TaiwanTripName" xml:"NameType"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus stop of route @@ -232,6 +233,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusStopOfRoute) validateUpdateTime(f return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_time.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_time.go index 79dfe01c..7656bb34 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_time.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_stop_time.go @@ -25,19 +25,19 @@ type PTXServiceDTOTourismSpecificationV2BusStopTime struct { // // 到站時間,格式為:HH:mm // Required: true - ArrivalTime *string `json:"ArrivalTime"` + ArrivalTime *string `json:"ArrivalTime" xml:"String"` // String // // 離站時間,格式為:HH:mm // Required: true - DepartureTime *string `json:"DepartureTime"` + DepartureTime *string `json:"DepartureTime" xml:"String"` // String // // 地區既用中之站牌代碼(為原資料內碼) // Required: true - StopID *string `json:"StopID"` + StopID *string `json:"StopID" xml:"String"` // NameType // @@ -45,7 +45,7 @@ type PTXServiceDTOTourismSpecificationV2BusStopTime struct { // Required: true StopName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"StopName"` + } `json:"StopName" xml:"NameType"` // Int32 // @@ -57,7 +57,7 @@ type PTXServiceDTOTourismSpecificationV2BusStopTime struct { // // 站牌唯一識別代碼,規則為 {業管機關代碼} + {StopID},其中 {業管機關代碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - StopUID *string `json:"StopUID"` + StopUID *string `json:"StopUID" xml:"String"` } // Validate validates this p t x service d t o tourism specification v2 bus stop time diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_sub_route.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_sub_route.go index df66b3ec..002e609b 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_sub_route.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_sub_route.go @@ -21,53 +21,53 @@ import ( // swagger:model PTX.Service.DTO.Tourism.Specification.V2.BusSubRoute type PTXServiceDTOTourismSpecificationV2BusSubRoute struct { - // integer + // Int32 // // 去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *int32 `json:"Direction"` + Direction *int64 `json:"Direction"` // String // // 平日第一班發車時間 - FirstBusTime string `json:"FirstBusTime,omitempty"` + FirstBusTime string `json:"FirstBusTime,omitempty" xml:"String,omitempty"` // String // // 車頭描述 - Headsign string `json:"Headsign,omitempty"` + Headsign string `json:"Headsign,omitempty" xml:"String,omitempty"` // String // // 車頭英文描述 - HeadsignEn string `json:"HeadsignEn,omitempty"` + HeadsignEn string `json:"HeadsignEn,omitempty" xml:"String,omitempty"` // String // // 假日去程第一班發車時間 - HolidayFirstBusTime string `json:"HolidayFirstBusTime,omitempty"` + HolidayFirstBusTime string `json:"HolidayFirstBusTime,omitempty" xml:"String,omitempty"` // String // // 假日返程第一班發車時間 - HolidayLastBusTime string `json:"HolidayLastBusTime,omitempty"` + HolidayLastBusTime string `json:"HolidayLastBusTime,omitempty" xml:"String,omitempty"` // String // // 平日返程第一班發車時間 - LastBusTime string `json:"LastBusTime,omitempty"` + LastBusTime string `json:"LastBusTime,omitempty" xml:"String,omitempty"` // Array // // 營運業者代碼 // Required: true - OperatorIDs []string `json:"OperatorIDs"` + OperatorIDs []string "json:\"OperatorIDs\" xml:\"List`1\"" // String // // 地區既用中之附屬路線代碼(為原資料內碼) // Required: true - SubRouteID *string `json:"SubRouteID"` + SubRouteID *string `json:"SubRouteID" xml:"String"` // NameType // @@ -75,13 +75,13 @@ type PTXServiceDTOTourismSpecificationV2BusSubRoute struct { // Required: true SubRouteName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"SubRouteName"` + } `json:"SubRouteName" xml:"NameType"` // String // // 附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - SubRouteUID *string `json:"SubRouteUID"` + SubRouteUID *string `json:"SubRouteUID" xml:"String"` } // Validate validates this p t x service d t o tourism specification v2 bus sub route diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_news.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_news.go index 818adf7b..d0faf3ed 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_news.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_news.go @@ -25,51 +25,53 @@ type PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews struct { // // 內容描述 // Required: true - Description *string `json:"Description"` + Description *string `json:"Description" xml:"String"` - // DateTime - // // 結束時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - EndTime string `json:"EndTime,omitempty"` + // Format: date-time + EndTime strfmt.DateTime `json:"EndTime,omitempty"` // String // // 語系 // Required: true - Language *string `json:"Language"` + Language *string `json:"Language" xml:"String"` // String // // 消息類別 - NewsCategory string `json:"NewsCategory,omitempty"` + NewsCategory string `json:"NewsCategory,omitempty" xml:"String,omitempty"` // String // // 最新消息原單位發布代碼 // Required: true - NewsID *string `json:"NewsID"` + NewsID *string `json:"NewsID" xml:"String"` - // DateTime - // // 消息公告日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - PublishTime string `json:"PublishTime,omitempty"` + // Format: date-time + PublishTime strfmt.DateTime `json:"PublishTime,omitempty"` + + // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) + // Format: date-time + SrcUpdateTime strfmt.DateTime `json:"SrcUpdateTime,omitempty"` - // DateTime - // // 開始時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) - StartTime string `json:"StartTime,omitempty"` + // Format: date-time + StartTime strfmt.DateTime `json:"StartTime,omitempty"` // String // // 消息標題 // Required: true - Title *string `json:"Title"` + Title *string `json:"Title" xml:"String"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus taiwan trip news @@ -80,6 +82,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) Validate(formats res = append(res, err) } + if err := m.validateEndTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateLanguage(formats); err != nil { res = append(res, err) } @@ -88,6 +94,18 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) Validate(formats res = append(res, err) } + if err := m.validatePublishTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateSrcUpdateTime(formats); err != nil { + res = append(res, err) + } + + if err := m.validateStartTime(formats); err != nil { + res = append(res, err) + } + if err := m.validateTitle(formats); err != nil { res = append(res, err) } @@ -111,6 +129,18 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateDescripti return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateEndTime(formats strfmt.Registry) error { + if swag.IsZero(m.EndTime) { // not required + return nil + } + + if err := validate.FormatOf("EndTime", "body", "date-time", m.EndTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateLanguage(formats strfmt.Registry) error { if err := validate.Required("Language", "body", m.Language); err != nil { @@ -129,6 +159,42 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateNewsID(fo return nil } +func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validatePublishTime(formats strfmt.Registry) error { + if swag.IsZero(m.PublishTime) { // not required + return nil + } + + if err := validate.FormatOf("PublishTime", "body", "date-time", m.PublishTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateSrcUpdateTime(formats strfmt.Registry) error { + if swag.IsZero(m.SrcUpdateTime) { // not required + return nil + } + + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + + return nil +} + +func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateStartTime(formats strfmt.Registry) error { + if swag.IsZero(m.StartTime) { // not required + return nil + } + + if err := validate.FormatOf("StartTime", "body", "date-time", m.StartTime.String(), formats); err != nil { + return err + } + + return nil +} + func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateTitle(formats strfmt.Registry) error { if err := validate.Required("Title", "body", m.Title); err != nil { @@ -144,6 +210,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripNews) validateUpdateTim return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time.go index 3dc6d0f3..93c3440c 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time.go @@ -24,35 +24,36 @@ type PTXServiceDTOTourismSpecificationV2BusTaiwanTripS2STravelTime struct { // // 路線代碼 // Required: true - RouteID *string `json:"RouteID"` + RouteID *string `json:"RouteID" xml:"String"` // String // // 路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - RouteUID *string `json:"RouteUID"` + RouteUID *string `json:"RouteUID" xml:"String"` // String // // 附屬路線代碼 - SubRouteID string `json:"SubRouteID,omitempty"` + SubRouteID string `json:"SubRouteID,omitempty" xml:"String,omitempty"` // String // // 附屬路線唯一識別代碼,規則為 {業管機關簡碼} + {SubRouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 - SubRouteUID string `json:"SubRouteUID,omitempty"` + SubRouteUID string `json:"SubRouteUID,omitempty" xml:"String,omitempty"` // Array // // 站間運行時間資訊 // Required: true - TravelTimes []*PTXServiceDTOTourismSpecificationV2BusTaiwanTripS2STravelTimeTravelTime `json:"TravelTimes"` + TravelTimes []*PTXServiceDTOTourismSpecificationV2BusTaiwanTripS2STravelTimeTravelTime "json:\"TravelTimes\" xml:\"List`1\"" // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus taiwan trip s2 s travel time @@ -130,6 +131,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripS2STravelTime) validate return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time_travel_time.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time_travel_time.go index 5333d93c..96fad4c7 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time_travel_time.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_s2_s_travel_time_travel_time.go @@ -29,7 +29,7 @@ type PTXServiceDTOTourismSpecificationV2BusTaiwanTripS2STravelTimeTravelTime str // // 起站站牌代碼 // Required: true - FromStopID *string `json:"FromStopID"` + FromStopID *string `json:"FromStopID" xml:"String"` // Int32 // @@ -53,7 +53,7 @@ type PTXServiceDTOTourismSpecificationV2BusTaiwanTripS2STravelTimeTravelTime str // // 迄站站牌代碼 // Required: true - ToStopID *string `json:"ToStopID"` + ToStopID *string `json:"ToStopID" xml:"String"` } // Validate validates this p t x service d t o tourism specification v2 bus taiwan trip s2 s travel time travel time diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_shape.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_shape.go index f398ea04..d86add45 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_shape.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_taiwan_trip_shape.go @@ -21,48 +21,48 @@ import ( // swagger:model PTX.Service.DTO.Tourism.Specification.V2.BusTaiwanTripShape type PTXServiceDTOTourismSpecificationV2BusTaiwanTripShape struct { - // integer + // Int32 // // 去返程,若無值則表示來源尚無區分去返程 : [0:'去程',1:'返程',2:'迴圈',255:'未知'] // Required: true - Direction *int32 `json:"Direction"` + Direction *int64 `json:"Direction"` // String // // well-known text,為路線軌跡資料 // Required: true - Geometry *string `json:"Geometry"` + Geometry *string `json:"Geometry" xml:"String"` // String // // 地區既用中之路線代碼(為原資料內碼) // Required: true - RouteID *string `json:"RouteID"` + RouteID *string `json:"RouteID" xml:"String"` // String // // 路線唯一識別代碼,規則為 {業管機關簡碼} + {RouteID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - RouteUID *string `json:"RouteUID"` + RouteUID *string `json:"RouteUID" xml:"String"` - // DateTime - // // 來源端平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // NameType // // 台灣好行路線名稱 TaiwanTripName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"TaiwanTripName,omitempty"` + } `json:"TaiwanTripName,omitempty" xml:"NameType,omitempty"` // DateTime // // 資料更新日期時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` } // Validate validates this p t x service d t o tourism specification v2 bus taiwan trip shape @@ -145,6 +145,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripShape) validateSrcUpdat return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -162,6 +166,10 @@ func (m *PTXServiceDTOTourismSpecificationV2BusTaiwanTripShape) validateUpdateTi return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_timetable.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_timetable.go index e1853f2a..45f20219 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_timetable.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_bus_timetable.go @@ -27,23 +27,23 @@ type PTXServiceDTOTourismSpecificationV2BusTimetable struct { // 週內營運日 ServiceDay struct { PTXServiceDTOTourismSpecificationV2ServiceDay - } `json:"ServiceDay,omitempty"` + } `json:"ServiceDay,omitempty" xml:"ServiceDay,omitempty"` // Array // // 特殊營運日 - SpecialDays []*PTXServiceDTOTourismSpecificationV2SpecialDay `json:"SpecialDays"` + SpecialDays []*PTXServiceDTOTourismSpecificationV2SpecialDay "json:\"SpecialDays\" xml:\"List`1\"" // Array // // 公車停靠時間資料 // Required: true - StopTimes []*PTXServiceDTOTourismSpecificationV2BusStopTime `json:"StopTimes"` + StopTimes []*PTXServiceDTOTourismSpecificationV2BusStopTime "json:\"StopTimes\" xml:\"List`1\"" // String // // 班次代碼,為無意義之編碼 - TripID string `json:"TripID,omitempty"` + TripID string `json:"TripID,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 bus timetable diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_date_period.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_date_period.go index 0d6aac90..44b63502 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_date_period.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_date_period.go @@ -20,12 +20,12 @@ type PTXServiceDTOTourismSpecificationV2DatePeriod struct { // String // // 營運結束日(格式: yyyy-MM-dd) - EndDate string `json:"EndDate,omitempty"` + EndDate string `json:"EndDate,omitempty" xml:"String,omitempty"` // String // // 營運起始日(格式: yyyy-MM-dd) - StartDate string `json:"StartDate,omitempty"` + StartDate string `json:"StartDate,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 date period diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_hotel_tourism_info.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_hotel_tourism_info.go index 0a00a90b..3963af9a 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_hotel_tourism_info.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_hotel_tourism_info.go @@ -24,104 +24,106 @@ type PTXServiceDTOTourismSpecificationV2HotelTourismInfo struct { // String // // 旅館民宿地址 - Address string `json:"Address,omitempty"` + Address string `json:"Address,omitempty" xml:"String,omitempty"` // String // // 所屬縣市 - City string `json:"City,omitempty"` + City string `json:"City,omitempty" xml:"String,omitempty"` // String // // 旅館民宿分類 - Class string `json:"Class,omitempty"` + Class string `json:"Class,omitempty" xml:"String,omitempty"` // String // // 旅館民宿簡述 - Description string `json:"Description,omitempty"` + Description string `json:"Description,omitempty" xml:"String,omitempty"` // String // // 旅館民宿傳真 - Fax string `json:"Fax,omitempty"` + Fax string `json:"Fax,omitempty" xml:"String,omitempty"` // String // // 觀光旅館星級 - Grade string `json:"Grade,omitempty"` + Grade string `json:"Grade,omitempty" xml:"String,omitempty"` // String // // 旅館民宿代碼 // Required: true - ID *string `json:"ID"` + ID *string `json:"ID" xml:"String"` // String // // 旅館民宿地點簡圖連結網址 - MapURL string `json:"MapUrl,omitempty"` + MapURL string `json:"MapUrl,omitempty" xml:"String,omitempty"` // String // // 旅館民宿名稱 - Name string `json:"Name,omitempty"` + Name string `json:"Name,omitempty" xml:"String,omitempty"` // String // // 停車資訊 - ParkingInfo string `json:"ParkingInfo,omitempty"` + ParkingInfo string `json:"ParkingInfo,omitempty" xml:"String,omitempty"` // String // // 旅館民宿電話 - Phone string `json:"Phone,omitempty"` + Phone string `json:"Phone,omitempty" xml:"String,omitempty"` // TourismPicture // // 旅館民宿照片 Picture struct { PTXServiceDTOTourismSpecificationV2TourismPicture - } `json:"Picture,omitempty"` + } `json:"Picture,omitempty" xml:"TourismPicture,omitempty"` // PointType // // 旅館民宿位置 Position struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"Position,omitempty"` + } `json:"Position,omitempty" xml:"PointType,omitempty"` // String // // 服務內容介紹 - ServiceInfo string `json:"ServiceInfo,omitempty"` + ServiceInfo string `json:"ServiceInfo,omitempty" xml:"String,omitempty"` // String // // 房型、價目及數量說明 - Spec string `json:"Spec,omitempty"` + Spec string `json:"Spec,omitempty" xml:"String,omitempty"` // DateTime // // 觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // // 旅館民宿網站網址 - WebsiteURL string `json:"WebsiteUrl,omitempty"` + WebsiteURL string `json:"WebsiteUrl,omitempty" xml:"String,omitempty"` // String // // 郵遞區號 - ZipCode string `json:"ZipCode,omitempty"` + ZipCode string `json:"ZipCode,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 hotel tourism info @@ -185,6 +187,10 @@ func (m *PTXServiceDTOTourismSpecificationV2HotelTourismInfo) validateSrcUpdateT return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -194,6 +200,10 @@ func (m *PTXServiceDTOTourismSpecificationV2HotelTourismInfo) validateUpdateTime return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_restaurant_tourism_info.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_restaurant_tourism_info.go index 7a116010..7a8cd861 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_restaurant_tourism_info.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_restaurant_tourism_info.go @@ -24,89 +24,87 @@ type PTXServiceDTOTourismSpecificationV2RestaurantTourismInfo struct { // String // // 店家地址 - Address string `json:"Address,omitempty"` + Address string `json:"Address,omitempty" xml:"String,omitempty"` // String // // 所屬縣市 - City string `json:"City,omitempty"` + City string `json:"City,omitempty" xml:"String,omitempty"` // String // // 店家分類 - Class string `json:"Class,omitempty"` + Class string `json:"Class,omitempty" xml:"String,omitempty"` // String // // 店家簡述 - Description string `json:"Description,omitempty"` + Description string `json:"Description,omitempty" xml:"String,omitempty"` // String // // 餐飲店家代碼 // Required: true - ID *string `json:"ID"` + ID *string `json:"ID" xml:"String"` // String // // 店家地圖/簡圖介紹網址 - MapURL string `json:"MapUrl,omitempty"` + MapURL string `json:"MapUrl,omitempty" xml:"String,omitempty"` // String // // 餐飲店家名稱 - Name string `json:"Name,omitempty"` + Name string `json:"Name,omitempty" xml:"String,omitempty"` // String // // 營業時間 - OpenTime string `json:"OpenTime,omitempty"` + OpenTime string `json:"OpenTime,omitempty" xml:"String,omitempty"` // String // // 停車資訊 - ParkingInfo string `json:"ParkingInfo,omitempty"` + ParkingInfo string `json:"ParkingInfo,omitempty" xml:"String,omitempty"` // String // // 預約電話 - Phone string `json:"Phone,omitempty"` + Phone string `json:"Phone,omitempty" xml:"String,omitempty"` // TourismPicture // // 店家照片 Picture struct { PTXServiceDTOTourismSpecificationV2TourismPicture - } `json:"Picture,omitempty"` + } `json:"Picture,omitempty" xml:"TourismPicture,omitempty"` // PointType // // 店家位置 Position struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"Position,omitempty"` + } `json:"Position,omitempty" xml:"PointType,omitempty"` - // DateTime - // // 觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` - // DateTime - // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // // 店家網站網址 - WebsiteURL string `json:"WebsiteUrl,omitempty"` + WebsiteURL string `json:"WebsiteUrl,omitempty" xml:"String,omitempty"` // String // // 郵遞區號 - ZipCode string `json:"ZipCode,omitempty"` + ZipCode string `json:"ZipCode,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 restaurant tourism info @@ -170,6 +168,10 @@ func (m *PTXServiceDTOTourismSpecificationV2RestaurantTourismInfo) validateSrcUp return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -179,6 +181,10 @@ func (m *PTXServiceDTOTourismSpecificationV2RestaurantTourismInfo) validateUpdat return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_route_operator.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_route_operator.go index 6ef48ede..0ef81c27 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_route_operator.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_route_operator.go @@ -25,13 +25,13 @@ type PTXServiceDTOTourismSpecificationV2RouteOperator struct { // // 營運業者簡碼 // Required: true - OperatorCode *string `json:"OperatorCode"` + OperatorCode *string `json:"OperatorCode" xml:"String"` // String // // 營運業者代碼 // Required: true - OperatorID *string `json:"OperatorID"` + OperatorID *string `json:"OperatorID" xml:"String"` // NameType // @@ -39,13 +39,13 @@ type PTXServiceDTOTourismSpecificationV2RouteOperator struct { // Required: true OperatorName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"OperatorName"` + } `json:"OperatorName" xml:"NameType"` // String // // 營運業者編號[交通部票證資料系統定義] // Required: true - OperatorNo *string `json:"OperatorNo"` + OperatorNo *string `json:"OperatorNo" xml:"String"` } // Validate validates this p t x service d t o tourism specification v2 route operator diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_scenic_spot_tourism_info.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_scenic_spot_tourism_info.go index 6b631da4..253a078d 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_scenic_spot_tourism_info.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_scenic_spot_tourism_info.go @@ -24,136 +24,138 @@ type PTXServiceDTOTourismSpecificationV2ScenicSpotTourismInfo struct { // String // // 景點地址 - Address string `json:"Address,omitempty"` + Address string `json:"Address,omitempty" xml:"String,omitempty"` // String // // 所屬縣市 - City string `json:"City,omitempty"` + City string `json:"City,omitempty" xml:"String,omitempty"` // String // // 景點分類1 - Class1 string `json:"Class1,omitempty"` + Class1 string `json:"Class1,omitempty" xml:"String,omitempty"` // String // // 景點分類2 - Class2 string `json:"Class2,omitempty"` + Class2 string `json:"Class2,omitempty" xml:"String,omitempty"` // String // // 景點分類3 - Class3 string `json:"Class3,omitempty"` + Class3 string `json:"Class3,omitempty" xml:"String,omitempty"` // String // // 景點特色精簡說明 - Description string `json:"Description,omitempty"` + Description string `json:"Description,omitempty" xml:"String,omitempty"` // String // // 景點特色詳細說明 - DescriptionDetail string `json:"DescriptionDetail,omitempty"` + DescriptionDetail string `json:"DescriptionDetail,omitempty" xml:"String,omitempty"` // String // // 景點代碼 // Required: true - ID *string `json:"ID"` + ID *string `json:"ID" xml:"String"` // String // // 常用搜尋關鍵字 - Keyword string `json:"Keyword,omitempty"` + Keyword string `json:"Keyword,omitempty" xml:"String,omitempty"` // String // // 古蹟分級 - Level string `json:"Level,omitempty"` + Level string `json:"Level,omitempty" xml:"String,omitempty"` // String // // 景點地圖/簡圖介紹網址 - MapURL string `json:"MapUrl,omitempty"` + MapURL string `json:"MapUrl,omitempty" xml:"String,omitempty"` // String // // 景點名稱 - Name string `json:"Name,omitempty"` + Name string `json:"Name,omitempty" xml:"String,omitempty"` // String // // 開放時間 - OpenTime string `json:"OpenTime,omitempty"` + OpenTime string `json:"OpenTime,omitempty" xml:"String,omitempty"` // String // // 停車資訊 - ParkingInfo string `json:"ParkingInfo,omitempty"` + ParkingInfo string `json:"ParkingInfo,omitempty" xml:"String,omitempty"` // PointType // // 景點主要停車場位置 ParkingPosition struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"ParkingPosition,omitempty"` + } `json:"ParkingPosition,omitempty" xml:"PointType,omitempty"` // String // // 景點服務電話 - Phone string `json:"Phone,omitempty"` + Phone string `json:"Phone,omitempty" xml:"String,omitempty"` // TourismPicture // // 景點照片 Picture struct { PTXServiceDTOTourismSpecificationV2TourismPicture - } `json:"Picture,omitempty"` + } `json:"Picture,omitempty" xml:"TourismPicture,omitempty"` // PointType // // 景點位置 Position struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"Position,omitempty"` + } `json:"Position,omitempty" xml:"PointType,omitempty"` // String // // 警告及注意事項 - Remarks string `json:"Remarks,omitempty"` + Remarks string `json:"Remarks,omitempty" xml:"String,omitempty"` // DateTime // // 觀光局檔案更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - SrcUpdateTime *string `json:"SrcUpdateTime"` + // Format: date-time + SrcUpdateTime *strfmt.DateTime `json:"SrcUpdateTime"` // String // // 票價資訊 - TicketInfo string `json:"TicketInfo,omitempty"` + TicketInfo string `json:"TicketInfo,omitempty" xml:"String,omitempty"` // String // // 交通資訊 - TravelInfo string `json:"TravelInfo,omitempty"` + TravelInfo string `json:"TravelInfo,omitempty" xml:"String,omitempty"` // DateTime // // 本平台資料更新時間(ISO8601格式:yyyy-MM-ddTHH:mm:sszzz) // Required: true - UpdateTime *string `json:"UpdateTime"` + // Format: date-time + UpdateTime *strfmt.DateTime `json:"UpdateTime"` // String // // 景點官方網站網址 - WebsiteURL string `json:"WebsiteUrl,omitempty"` + WebsiteURL string `json:"WebsiteUrl,omitempty" xml:"String,omitempty"` // String // // 郵遞區號 - ZipCode string `json:"ZipCode,omitempty"` + ZipCode string `json:"ZipCode,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 scenic spot tourism info @@ -229,6 +231,10 @@ func (m *PTXServiceDTOTourismSpecificationV2ScenicSpotTourismInfo) validateSrcUp return err } + if err := validate.FormatOf("SrcUpdateTime", "body", "date-time", m.SrcUpdateTime.String(), formats); err != nil { + return err + } + return nil } @@ -238,6 +244,10 @@ func (m *PTXServiceDTOTourismSpecificationV2ScenicSpotTourismInfo) validateUpdat return err } + if err := validate.FormatOf("UpdateTime", "body", "date-time", m.UpdateTime.String(), formats); err != nil { + return err + } + return nil } diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_service_day.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_service_day.go index 4c5a4e2c..e7d181a1 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_service_day.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_service_day.go @@ -21,52 +21,52 @@ import ( // swagger:model PTX.Service.DTO.Tourism.Specification.V2.ServiceDay type PTXServiceDTOTourismSpecificationV2ServiceDay struct { - // integer + // Int32 // // 星期五是否營運 : [0:'否',1:'是'] // Required: true - Friday *int32 `json:"Friday"` + Friday *int64 `json:"Friday"` - // integer + // Int32 // // 星期一是否營運 : [0:'否',1:'是'] // Required: true - Monday *int32 `json:"Monday"` + Monday *int64 `json:"Monday"` - // integer + // Int32 // // 國定假日是否營運 : [0:'否',1:'是'] - NationalHolidays int32 `json:"NationalHolidays,omitempty"` + NationalHolidays int64 `json:"NationalHolidays,omitempty"` - // integer + // Int32 // // 星期六是否營運 : [0:'否',1:'是'] // Required: true - Saturday *int32 `json:"Saturday"` + Saturday *int64 `json:"Saturday"` - // integer + // Int32 // // 星期日是否營運 : [0:'否',1:'是'] // Required: true - Sunday *int32 `json:"Sunday"` + Sunday *int64 `json:"Sunday"` - // integer + // Int32 // // 星期四是否營運 : [0:'否',1:'是'] // Required: true - Thursday *int32 `json:"Thursday"` + Thursday *int64 `json:"Thursday"` - // integer + // Int32 // // 星期二是否營運 : [0:'否',1:'是'] // Required: true - Tuesday *int32 `json:"Tuesday"` + Tuesday *int64 `json:"Tuesday"` - // integer + // Int32 // // 星期三是否營運 : [0:'否',1:'是'] // Required: true - Wednesday *int32 `json:"Wednesday"` + Wednesday *int64 `json:"Wednesday"` } // Validate validates this p t x service d t o tourism specification v2 service day diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_special_day.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_special_day.go index ad3180f7..dbfa2b16 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_special_day.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_special_day.go @@ -25,22 +25,22 @@ type PTXServiceDTOTourismSpecificationV2SpecialDay struct { // 連續特殊日期 DatePeriod struct { PTXServiceDTOTourismSpecificationV2DatePeriod - } `json:"DatePeriod,omitempty"` + } `json:"DatePeriod,omitempty" xml:"DatePeriod,omitempty"` // Array // // 不連續特殊日期 - Dates []string `json:"Dates"` + Dates []string "json:\"Dates\" xml:\"List`1\"" // String // // 特殊營運描述 - Description string `json:"Description,omitempty"` + Description string `json:"Description,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 營運服務狀態代碼 : [0:'正常營運',1:'加班營運',2:'取消/停駛營運'] - ServiceStatus int32 `json:"ServiceStatus,omitempty"` + ServiceStatus int64 `json:"ServiceStatus,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 special day diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_stop.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_stop.go index 53050b6b..518382e7 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_stop.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_stop.go @@ -24,29 +24,29 @@ type PTXServiceDTOTourismSpecificationV2Stop struct { // String // // 站牌位置縣市之代碼(國際ISO 3166-2 三碼城市代碼)[若為公路/國道客運路線則為空值] - LocationCityCode string `json:"LocationCityCode,omitempty"` + LocationCityCode string `json:"LocationCityCode,omitempty" xml:"String,omitempty"` // String // // 站牌所屬的組站位ID // Required: true - StationGroupID *string `json:"StationGroupID"` + StationGroupID *string `json:"StationGroupID" xml:"String"` // String // // 站牌所屬的站位ID - StationID string `json:"StationID,omitempty"` + StationID string `json:"StationID,omitempty" xml:"String,omitempty"` - // integer + // Int32 // // 上下車站別 : [-1:'可下車',0:'可上下車',1:'可上車'] - StopBoarding int32 `json:"StopBoarding,omitempty"` + StopBoarding int64 `json:"StopBoarding,omitempty"` // String // // 地區既用中之站牌代碼(為原資料內碼) // Required: true - StopID *string `json:"StopID"` + StopID *string `json:"StopID" xml:"String"` // NameType // @@ -54,7 +54,7 @@ type PTXServiceDTOTourismSpecificationV2Stop struct { // Required: true StopName struct { PTXServiceDTOSharedSpecificationV2BaseNameType - } `json:"StopName"` + } `json:"StopName" xml:"NameType"` // PointType // @@ -62,7 +62,7 @@ type PTXServiceDTOTourismSpecificationV2Stop struct { // Required: true StopPosition struct { PTXServiceDTOSharedSpecificationV2BasePointType - } `json:"StopPosition"` + } `json:"StopPosition" xml:"PointType"` // Int32 // @@ -74,7 +74,7 @@ type PTXServiceDTOTourismSpecificationV2Stop struct { // // 站牌唯一識別代碼,規則為 {業管機關簡碼} + {StopID},其中 {業管機關簡碼} 可於Authority API中的AuthorityCode欄位查詢 // Required: true - StopUID *string `json:"StopUID"` + StopUID *string `json:"StopUID" xml:"String"` } // Validate validates this p t x service d t o tourism specification v2 stop diff --git a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_tourism_picture.go b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_tourism_picture.go index a5b0f785..55a6971d 100644 --- a/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_tourism_picture.go +++ b/tourism/v2/models/p_t_x_service_d_t_o_tourism_specification_v2_tourism_picture.go @@ -22,32 +22,32 @@ type PTXServiceDTOTourismSpecificationV2TourismPicture struct { // String // // 照片說明1 - PictureDescription1 string `json:"PictureDescription1,omitempty"` + PictureDescription1 string `json:"PictureDescription1,omitempty" xml:"String,omitempty"` // String // // 照片說明2 - PictureDescription2 string `json:"PictureDescription2,omitempty"` + PictureDescription2 string `json:"PictureDescription2,omitempty" xml:"String,omitempty"` // String // // 照片說明3 - PictureDescription3 string `json:"PictureDescription3,omitempty"` + PictureDescription3 string `json:"PictureDescription3,omitempty" xml:"String,omitempty"` // String // // 照片連結網址1 - PictureUrl1 string `json:"PictureUrl1,omitempty"` + PictureUrl1 string `json:"PictureUrl1,omitempty" xml:"String,omitempty"` // String // // 照片連結網址2 - PictureUrl2 string `json:"PictureUrl2,omitempty"` + PictureUrl2 string `json:"PictureUrl2,omitempty" xml:"String,omitempty"` // String // // 照片連結網址3 - PictureUrl3 string `json:"PictureUrl3,omitempty"` + PictureUrl3 string `json:"PictureUrl3,omitempty" xml:"String,omitempty"` } // Validate validates this p t x service d t o tourism specification v2 tourism picture