Class: Google::Apis::QpxExpressV1::SegmentInfo
- Inherits:
-
Object
- Object
- Google::Apis::QpxExpressV1::SegmentInfo
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- generated/google/apis/qpx_express_v1/classes.rb,
generated/google/apis/qpx_express_v1/representations.rb,
generated/google/apis/qpx_express_v1/representations.rb
Overview
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).
Instance Attribute Summary collapse
-
#booking_code ⇒ String
The booking code or class for this segment.
-
#booking_code_count ⇒ Fixnum
The number of seats available in this booking code on this segment.
-
#cabin ⇒ String
The cabin booked for this segment.
-
#connection_duration ⇒ Fixnum
In minutes, the duration of the connection following this segment.
-
#duration ⇒ Fixnum
The duration of the flight segment in minutes.
-
#flight ⇒ Google::Apis::QpxExpressV1::FlightInfo
A flight is a sequence of legs with the same airline carrier and flight number.
-
#id ⇒ String
An id uniquely identifying the segment in the solution.
-
#kind ⇒ String
Identifies this as a segment object.
-
#leg ⇒ Array<Google::Apis::QpxExpressV1::LegInfo>
The legs composing this segment.
-
#married_segment_group ⇒ String
The solution-based index of a segment in a married segment group.
-
#subject_to_government_approval ⇒ Boolean
(also: #subject_to_government_approval?)
Whether the operation of this segment remains subject to government approval.
Instance Method Summary collapse
-
#initialize(**args) ⇒ SegmentInfo
constructor
A new instance of SegmentInfo.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ SegmentInfo
Returns a new instance of SegmentInfo
777 778 779 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 777 def initialize(**args) update!(**args) end |
Instance Attribute Details
#booking_code ⇒ String
The booking code or class for this segment.
Corresponds to the JSON property bookingCode
707 708 709 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 707 def booking_code @booking_code end |
#booking_code_count ⇒ Fixnum
The number of seats available in this booking code on this segment.
Corresponds to the JSON property bookingCodeCount
712 713 714 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 712 def booking_code_count @booking_code_count end |
#cabin ⇒ String
The cabin booked for this segment.
Corresponds to the JSON property cabin
717 718 719 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 717 def cabin @cabin end |
#connection_duration ⇒ Fixnum
In minutes, the duration of the connection following this segment.
Corresponds to the JSON property connectionDuration
722 723 724 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 722 def connection_duration @connection_duration end |
#duration ⇒ Fixnum
The duration of the flight segment in minutes.
Corresponds to the JSON property duration
727 728 729 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 727 def duration @duration end |
#flight ⇒ Google::Apis::QpxExpressV1::FlightInfo
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
738 739 740 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 738 def flight @flight end |
#id ⇒ String
An id uniquely identifying the segment in the solution.
Corresponds to the JSON property id
743 744 745 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 743 def id @id end |
#kind ⇒ String
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
751 752 753 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 751 def kind @kind end |
#leg ⇒ Array<Google::Apis::QpxExpressV1::LegInfo>
The legs composing this segment.
Corresponds to the JSON property leg
756 757 758 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 756 def leg @leg end |
#married_segment_group ⇒ String
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
769 770 771 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 769 def married_segment_group @married_segment_group end |
#subject_to_government_approval ⇒ Boolean Also known as: subject_to_government_approval?
Whether the operation of this segment remains subject to government approval.
Corresponds to the JSON property subjectToGovernmentApproval
774 775 776 |
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 774 def subject_to_government_approval @subject_to_government_approval end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
782 783 784 785 786 787 788 789 790 791 792 793 794 |
# 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 |