class Google::Apis::QpxExpressV1::SegmentInfo

Details of a segment of a flight; a segment is one or more consecutive legs on the same flight. For example a hypothetical flight ZZ001, from DFW to OGG, would have one segment with two legs: DFW to HNL (leg 1), HNL to OGG (leg 2), and DFW to OGG (legs 1 and 2).

Attributes

booking_code[RW]

The booking code or class for this segment. Corresponds to the JSON property `bookingCode` @return [String]

booking_code_count[RW]

The number of seats available in this booking code on this segment. Corresponds to the JSON property `bookingCodeCount` @return [Fixnum]

cabin[RW]

The cabin booked for this segment. Corresponds to the JSON property `cabin` @return [String]

connection_duration[RW]

In minutes, the duration of the connection following this segment. Corresponds to the JSON property `connectionDuration` @return [Fixnum]

duration[RW]

The duration of the flight segment in minutes. Corresponds to the JSON property `duration` @return [Fixnum]

flight[RW]

A flight is a sequence of legs with the same airline carrier and flight number. (A leg is the smallest unit of travel, in the case of a flight a takeoff immediately followed by a landing at two set points on a particular carrier with a particular flight number.) The naive view is that a flight is scheduled travel of an aircraft between two points, with possibly intermediate stops, but carriers will frequently list flights that require a change of aircraft between legs. Corresponds to the JSON property `flight` @return [Google::Apis::QpxExpressV1::FlightInfo]

id[RW]

An id uniquely identifying the segment in the solution. Corresponds to the JSON property `id` @return [String]

kind[RW]

Identifies this as a segment object. A segment is one or more consecutive legs on the same flight. For example a hypothetical flight ZZ001, from DFW to OGG, could have one segment with two legs: DFW to HNL (leg 1), HNL to OGG (leg 2). Value: the fixed string qpxexpress#segmentInfo. Corresponds to the JSON property `kind` @return [String]

leg[RW]

The legs composing this segment. Corresponds to the JSON property `leg` @return [Array<Google::Apis::QpxExpressV1::LegInfo>]

married_segment_group[RW]

The solution-based index of a segment in a married segment group. Married segments can only be booked together. For example, an airline might report a certain booking code as sold out from Boston to Pittsburgh, but as available as part of two married segments Boston to Chicago connecting through Pittsburgh. For example content of this field, consider the round-trip flight ZZ1 PHX-PHL ZZ2 PHL-CLT ZZ3 CLT-PHX. This has three segments, with the two outbound ones (ZZ1 ZZ2) married. In this case, the two outbound segments belong to married segment group 0, and the return segment belongs to married segment group 1. Corresponds to the JSON property `marriedSegmentGroup` @return [String]

subject_to_government_approval[RW]

Whether the operation of this segment remains subject to government approval. Corresponds to the JSON property `subjectToGovernmentApproval` @return [Boolean]

subject_to_government_approval?[RW]

Whether the operation of this segment remains subject to government approval. Corresponds to the JSON property `subjectToGovernmentApproval` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/qpx_express_v1/classes.rb, line 777
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/qpx_express_v1/classes.rb, line 782
def update!(**args)
  @booking_code = args[:booking_code] if args.key?(:booking_code)
  @booking_code_count = args[:booking_code_count] if args.key?(:booking_code_count)
  @cabin = args[:cabin] if args.key?(:cabin)
  @connection_duration = args[:connection_duration] if args.key?(:connection_duration)
  @duration = args[:duration] if args.key?(:duration)
  @flight = args[:flight] if args.key?(:flight)
  @id = args[:id] if args.key?(:id)
  @kind = args[:kind] if args.key?(:kind)
  @leg = args[:leg] if args.key?(:leg)
  @married_segment_group = args[:married_segment_group] if args.key?(:married_segment_group)
  @subject_to_government_approval = args[:subject_to_government_approval] if args.key?(:subject_to_government_approval)
end