Class: OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip

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

Defined Under Namespace

Classes: BlockStopTime

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(active_service_ids: , trips: , inactive_service_ids: nil) ⇒ Object

Parameters:



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/block_retrieve_response.rb', line 73

class Trip < OnebusawaySDK::Internal::Type::BaseModel
  # @!attribute accumulated_slack_time
  #
  #   @return [Float]
  required :accumulated_slack_time, Float, api_name: :accumulatedSlackTime

  # @!attribute block_stop_times
  #
  #   @return [Array<OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime>]
  required :block_stop_times,
           -> { OnebusawaySDK::Internal::Type::ArrayOf[OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime] },
           api_name: :blockStopTimes

  # @!attribute distance_along_block
  #
  #   @return [Float]
  required :distance_along_block, Float, api_name: :distanceAlongBlock

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

  # @!method initialize(accumulated_slack_time:, block_stop_times:, distance_along_block:, trip_id:)
  #   @param accumulated_slack_time [Float]
  #   @param block_stop_times [Array<OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime>]
  #   @param distance_along_block [Float]
  #   @param trip_id [String]

  class BlockStopTime < OnebusawaySDK::Internal::Type::BaseModel
    # @!attribute accumulated_slack_time
    #
    #   @return [Float]
    required :accumulated_slack_time, Float, api_name: :accumulatedSlackTime

    # @!attribute block_sequence
    #
    #   @return [Integer]
    required :block_sequence, Integer, api_name: :blockSequence

    # @!attribute distance_along_block
    #
    #   @return [Float]
    required :distance_along_block, Float, api_name: :distanceAlongBlock

    # @!attribute stop_time
    #
    #   @return [OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime::StopTime]
    required :stop_time,
             -> { OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime::StopTime },
             api_name: :stopTime

    # @!method initialize(accumulated_slack_time:, block_sequence:, distance_along_block:, stop_time:)
    #   @param accumulated_slack_time [Float]
    #   @param block_sequence [Integer]
    #   @param distance_along_block [Float]
    #   @param stop_time [OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime::StopTime]

    # @see OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime#stop_time
    class StopTime < OnebusawaySDK::Internal::Type::BaseModel
      # @!attribute arrival_time
      #
      #   @return [Integer]
      required :arrival_time, Integer, api_name: :arrivalTime

      # @!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 drop_off_type
      #
      #   @return [Integer, nil]
      optional :drop_off_type, Integer, api_name: :dropOffType

      # @!attribute pickup_type
      #
      #   @return [Integer, nil]
      optional :pickup_type, Integer, api_name: :pickupType

      # @!method initialize(arrival_time:, departure_time:, stop_id:, drop_off_type: nil, pickup_type: nil)
      #   @param arrival_time [Integer]
      #   @param departure_time [Integer]
      #   @param stop_id [String]
      #   @param drop_off_type [Integer]
      #   @param pickup_type [Integer]
    end
  end
end

Instance Attribute Details

#accumulated_slack_timeFloat

Returns:

  • (Float)


77
# File 'lib/onebusaway_sdk/models/block_retrieve_response.rb', line 77

required :accumulated_slack_time, Float, api_name: :accumulatedSlackTime

#block_stop_timesArray<OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime>



82
83
84
# File 'lib/onebusaway_sdk/models/block_retrieve_response.rb', line 82

required :block_stop_times,
-> { OnebusawaySDK::Internal::Type::ArrayOf[OnebusawaySDK::Models::BlockRetrieveResponse::Data::Entry::Configuration::Trip::BlockStopTime] },
api_name: :blockStopTimes

#distance_along_blockFloat

Returns:

  • (Float)


89
# File 'lib/onebusaway_sdk/models/block_retrieve_response.rb', line 89

required :distance_along_block, Float, api_name: :distanceAlongBlock

#trip_idString

Returns:

  • (String)


94
# File 'lib/onebusaway_sdk/models/block_retrieve_response.rb', line 94

required :trip_id, String, api_name: :tripId