Class: Google::Apis::QpxExpressV1::SegmentInfo

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

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_codeString

The booking code or class for this segment. Corresponds to the JSON property bookingCode

Returns:

  • (String)


707
708
709
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 707

def booking_code
  @booking_code
end

#booking_code_countFixnum

The number of seats available in this booking code on this segment. Corresponds to the JSON property bookingCodeCount

Returns:

  • (Fixnum)


712
713
714
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 712

def booking_code_count
  @booking_code_count
end

#cabinString

The cabin booked for this segment. Corresponds to the JSON property cabin

Returns:

  • (String)


717
718
719
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 717

def cabin
  @cabin
end

#connection_durationFixnum

In minutes, the duration of the connection following this segment. Corresponds to the JSON property connectionDuration

Returns:

  • (Fixnum)


722
723
724
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 722

def connection_duration
  @connection_duration
end

#durationFixnum

The duration of the flight segment in minutes. Corresponds to the JSON property duration

Returns:

  • (Fixnum)


727
728
729
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 727

def duration
  @duration
end

#flightGoogle::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

#idString

An id uniquely identifying the segment in the solution. Corresponds to the JSON property id

Returns:

  • (String)


743
744
745
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 743

def id
  @id
end

#kindString

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

Returns:

  • (String)


751
752
753
# File 'generated/google/apis/qpx_express_v1/classes.rb', line 751

def kind
  @kind
end

#legArray<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_groupString

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

Returns:

  • (String)


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_approvalBoolean Also known as: subject_to_government_approval?

Whether the operation of this segment remains subject to government approval. Corresponds to the JSON property subjectToGovernmentApproval

Returns:

  • (Boolean)


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