Class: OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/onebusaway_sdk/models/schedule_for_route_retrieve_response.rb

Defined Under Namespace

Classes: Entry

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(entry:) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# File 'lib/onebusaway_sdk/models/schedule_for_route_retrieve_response.rb', line 15

class Data < OnebusawaySDK::Internal::Type::BaseModel
  # @!attribute entry
  #
  #   @return [OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry]
  required :entry, -> { OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry }

  # @!method initialize(entry:)
  #   @param entry [OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry]

  # @see OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data#entry
  class Entry < OnebusawaySDK::Internal::Type::BaseModel
    # @!attribute route_id
    #
    #   @return [String]
    required :route_id, String, api_name: :routeId

    # @!attribute schedule_date
    #
    #   @return [Integer]
    required :schedule_date, Integer, api_name: :scheduleDate

    # @!attribute service_ids
    #
    #   @return [Array<String>]
    required :service_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :serviceIds

    # @!attribute stop_trip_groupings
    #
    #   @return [Array<OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping>]
    required :stop_trip_groupings,
             -> { OnebusawaySDK::Internal::Type::ArrayOf[OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping] },
             api_name: :stopTripGroupings

    # @!method initialize(route_id:, schedule_date:, service_ids:, stop_trip_groupings:)
    #   @param route_id [String]
    #   @param schedule_date [Integer]
    #   @param service_ids [Array<String>]
    #   @param stop_trip_groupings [Array<OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping>]

    class StopTripGrouping < OnebusawaySDK::Internal::Type::BaseModel
      # @!attribute direction_id
      #
      #   @return [String]
      required :direction_id, String, api_name: :directionId

      # @!attribute stop_ids
      #
      #   @return [Array<String>]
      required :stop_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :stopIds

      # @!attribute trip_headsigns
      #
      #   @return [Array<String>]
      required :trip_headsigns, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :tripHeadsigns

      # @!attribute trip_ids
      #
      #   @return [Array<String>]
      required :trip_ids, OnebusawaySDK::Internal::Type::ArrayOf[String], api_name: :tripIds

      # @!attribute trips_with_stop_times
      #
      #   @return [Array<OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping::TripsWithStopTime>, nil]
      optional :trips_with_stop_times,
               -> { OnebusawaySDK::Internal::Type::ArrayOf[OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping::TripsWithStopTime] },
               api_name: :tripsWithStopTimes

      # @!method initialize(direction_id:, stop_ids:, trip_headsigns:, trip_ids:, trips_with_stop_times: nil)
      #   @param direction_id [String]
      #   @param stop_ids [Array<String>]
      #   @param trip_headsigns [Array<String>]
      #   @param trip_ids [Array<String>]
      #   @param trips_with_stop_times [Array<OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping::TripsWithStopTime>]

      class TripsWithStopTime < OnebusawaySDK::Internal::Type::BaseModel
        # @!attribute stop_times
        #
        #   @return [Array<OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping::TripsWithStopTime::StopTime>]
        required :stop_times,
                 -> do
                   OnebusawaySDK::Internal::Type::ArrayOf[
                     OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping::TripsWithStopTime::StopTime
                   ]
                 end,
                 api_name: :stopTimes

        # @!attribute trip_id
        #
        #   @return [String]
        required :trip_id, String, api_name: :tripId

        # @!method initialize(stop_times:, trip_id:)
        #   @param stop_times [Array<OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry::StopTripGrouping::TripsWithStopTime::StopTime>]
        #   @param trip_id [String]

        class StopTime < OnebusawaySDK::Internal::Type::BaseModel
          # @!attribute arrival_enabled
          #
          #   @return [Boolean]
          required :arrival_enabled, OnebusawaySDK::Internal::Type::Boolean, api_name: :arrivalEnabled

          # @!attribute arrival_time
          #
          #   @return [Integer]
          required :arrival_time, Integer, api_name: :arrivalTime

          # @!attribute departure_enabled
          #
          #   @return [Boolean]
          required :departure_enabled,
                   OnebusawaySDK::Internal::Type::Boolean,
                   api_name: :departureEnabled

          # @!attribute departure_time
          #
          #   @return [Integer]
          required :departure_time, Integer, api_name: :departureTime

          # @!attribute stop_id
          #
          #   @return [String]
          required :stop_id, String, api_name: :stopId

          # @!attribute trip_id
          #
          #   @return [String]
          required :trip_id, String, api_name: :tripId

          # @!attribute service_id
          #
          #   @return [String, nil]
          optional :service_id, String, api_name: :serviceId

          # @!attribute stop_headsign
          #
          #   @return [String, nil]
          optional :stop_headsign, String, api_name: :stopHeadsign

          # @!method initialize(arrival_enabled:, arrival_time:, departure_enabled:, departure_time:, stop_id:, trip_id:, service_id: nil, stop_headsign: nil)
          #   @param arrival_enabled [Boolean]
          #   @param arrival_time [Integer]
          #   @param departure_enabled [Boolean]
          #   @param departure_time [Integer]
          #   @param stop_id [String]
          #   @param trip_id [String]
          #   @param service_id [String]
          #   @param stop_headsign [String]
        end
      end
    end
  end
end

Instance Attribute Details

#entryOnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry



19
# File 'lib/onebusaway_sdk/models/schedule_for_route_retrieve_response.rb', line 19

required :entry, -> { OnebusawaySDK::Models::ScheduleForRouteRetrieveResponse::Data::Entry }