1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package qpxexpress provides access to the QPX Express API.
8//
9// For product documentation, see: http://developers.google.com/qpx-express
10//
11// Creating a client
12//
13// Usage example:
14//
15//   import "google.golang.org/api/qpxexpress/v1"
16//   ...
17//   ctx := context.Background()
18//   qpxexpressService, err := qpxexpress.NewService(ctx)
19//
20// In this example, Google Application Default Credentials are used for authentication.
21//
22// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
23//
24// Other authentication options
25//
26// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
27//
28//   qpxexpressService, err := qpxexpress.NewService(ctx, option.WithAPIKey("AIza..."))
29//
30// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
31//
32//   config := &oauth2.Config{...}
33//   // ...
34//   token, err := config.Exchange(ctx, ...)
35//   qpxexpressService, err := qpxexpress.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
36//
37// See https://godoc.org/google.golang.org/api/option/ for details on options.
38package qpxexpress // import "google.golang.org/api/qpxexpress/v1"
39
40import (
41	"bytes"
42	"context"
43	"encoding/json"
44	"errors"
45	"fmt"
46	"io"
47	"net/http"
48	"net/url"
49	"strconv"
50	"strings"
51
52	googleapi "google.golang.org/api/googleapi"
53	gensupport "google.golang.org/api/internal/gensupport"
54	option "google.golang.org/api/option"
55	htransport "google.golang.org/api/transport/http"
56)
57
58// Always reference these packages, just in case the auto-generated code
59// below doesn't.
60var _ = bytes.NewBuffer
61var _ = strconv.Itoa
62var _ = fmt.Sprintf
63var _ = json.NewDecoder
64var _ = io.Copy
65var _ = url.Parse
66var _ = gensupport.MarshalJSON
67var _ = googleapi.Version
68var _ = errors.New
69var _ = strings.Replace
70var _ = context.Canceled
71
72const apiId = "qpxExpress:v1"
73const apiName = "qpxExpress"
74const apiVersion = "v1"
75const basePath = "https://www.googleapis.com/qpxExpress/v1/trips/"
76
77// NewService creates a new Service.
78func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
79	client, endpoint, err := htransport.NewClient(ctx, opts...)
80	if err != nil {
81		return nil, err
82	}
83	s, err := New(client)
84	if err != nil {
85		return nil, err
86	}
87	if endpoint != "" {
88		s.BasePath = endpoint
89	}
90	return s, nil
91}
92
93// New creates a new Service. It uses the provided http.Client for requests.
94//
95// Deprecated: please use NewService instead.
96// To provide a custom HTTP client, use option.WithHTTPClient.
97// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
98func New(client *http.Client) (*Service, error) {
99	if client == nil {
100		return nil, errors.New("client is nil")
101	}
102	s := &Service{client: client, BasePath: basePath}
103	s.Trips = NewTripsService(s)
104	return s, nil
105}
106
107type Service struct {
108	client    *http.Client
109	BasePath  string // API endpoint base URL
110	UserAgent string // optional additional User-Agent fragment
111
112	Trips *TripsService
113}
114
115func (s *Service) userAgent() string {
116	if s.UserAgent == "" {
117		return googleapi.UserAgent
118	}
119	return googleapi.UserAgent + " " + s.UserAgent
120}
121
122func NewTripsService(s *Service) *TripsService {
123	rs := &TripsService{s: s}
124	return rs
125}
126
127type TripsService struct {
128	s *Service
129}
130
131// AircraftData: The make, model, and type of an aircraft.
132type AircraftData struct {
133	// Code: The aircraft code. For example, for a Boeing 777 the code would
134	// be 777.
135	Code string `json:"code,omitempty"`
136
137	// Kind: Identifies this as an aircraftData object. Value: the fixed
138	// string qpxexpress#aircraftData
139	Kind string `json:"kind,omitempty"`
140
141	// Name: The name of an aircraft, for example Boeing 777.
142	Name string `json:"name,omitempty"`
143
144	// ForceSendFields is a list of field names (e.g. "Code") to
145	// unconditionally include in API requests. By default, fields with
146	// empty values are omitted from API requests. However, any non-pointer,
147	// non-interface field appearing in ForceSendFields will be sent to the
148	// server regardless of whether the field is empty or not. This may be
149	// used to include empty fields in Patch requests.
150	ForceSendFields []string `json:"-"`
151
152	// NullFields is a list of field names (e.g. "Code") to include in API
153	// requests with the JSON null value. By default, fields with empty
154	// values are omitted from API requests. However, any field with an
155	// empty value appearing in NullFields will be sent to the server as
156	// null. It is an error if a field in this list has a non-empty value.
157	// This may be used to include null fields in Patch requests.
158	NullFields []string `json:"-"`
159}
160
161func (s *AircraftData) MarshalJSON() ([]byte, error) {
162	type NoMethod AircraftData
163	raw := NoMethod(*s)
164	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
165}
166
167// AirportData: An airport.
168type AirportData struct {
169	// City: The city code an airport is located in. For example, for JFK
170	// airport, this is NYC.
171	City string `json:"city,omitempty"`
172
173	// Code: An airport's code. For example, for Boston Logan airport, this
174	// is BOS.
175	Code string `json:"code,omitempty"`
176
177	// Kind: Identifies this as an airport object. Value: the fixed string
178	// qpxexpress#airportData.
179	Kind string `json:"kind,omitempty"`
180
181	// Name: The name of an airport. For example, for airport BOS the name
182	// is "Boston Logan International".
183	Name string `json:"name,omitempty"`
184
185	// ForceSendFields is a list of field names (e.g. "City") to
186	// unconditionally include in API requests. By default, fields with
187	// empty values are omitted from API requests. However, any non-pointer,
188	// non-interface field appearing in ForceSendFields will be sent to the
189	// server regardless of whether the field is empty or not. This may be
190	// used to include empty fields in Patch requests.
191	ForceSendFields []string `json:"-"`
192
193	// NullFields is a list of field names (e.g. "City") to include in API
194	// requests with the JSON null value. By default, fields with empty
195	// values are omitted from API requests. However, any field with an
196	// empty value appearing in NullFields will be sent to the server as
197	// null. It is an error if a field in this list has a non-empty value.
198	// This may be used to include null fields in Patch requests.
199	NullFields []string `json:"-"`
200}
201
202func (s *AirportData) MarshalJSON() ([]byte, error) {
203	type NoMethod AirportData
204	raw := NoMethod(*s)
205	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
206}
207
208// BagDescriptor: Information about an item of baggage.
209type BagDescriptor struct {
210	// CommercialName: Provides the commercial name for an optional service.
211	CommercialName string `json:"commercialName,omitempty"`
212
213	// Count: How many of this type of bag will be checked on this flight.
214	Count int64 `json:"count,omitempty"`
215
216	// Description: A description of the baggage.
217	Description []string `json:"description,omitempty"`
218
219	// Kind: Identifies this as a baggage object. Value: the fixed string
220	// qpxexpress#bagDescriptor.
221	Kind string `json:"kind,omitempty"`
222
223	// Subcode: The standard IATA subcode used to identify this optional
224	// service.
225	Subcode string `json:"subcode,omitempty"`
226
227	// ForceSendFields is a list of field names (e.g. "CommercialName") to
228	// unconditionally include in API requests. By default, fields with
229	// empty values are omitted from API requests. However, any non-pointer,
230	// non-interface field appearing in ForceSendFields will be sent to the
231	// server regardless of whether the field is empty or not. This may be
232	// used to include empty fields in Patch requests.
233	ForceSendFields []string `json:"-"`
234
235	// NullFields is a list of field names (e.g. "CommercialName") to
236	// include in API requests with the JSON null value. By default, fields
237	// with empty values are omitted from API requests. However, any field
238	// with an empty value appearing in NullFields will be sent to the
239	// server as null. It is an error if a field in this list has a
240	// non-empty value. This may be used to include null fields in Patch
241	// requests.
242	NullFields []string `json:"-"`
243}
244
245func (s *BagDescriptor) MarshalJSON() ([]byte, error) {
246	type NoMethod BagDescriptor
247	raw := NoMethod(*s)
248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
249}
250
251// CarrierData: Information about a carrier (ie. an airline, bus line,
252// railroad, etc) that might be useful to display to an end-user.
253type CarrierData struct {
254	// Code: The IATA designator of a carrier (airline, etc). For example,
255	// for American Airlines, the code is AA.
256	Code string `json:"code,omitempty"`
257
258	// Kind: Identifies this as a kind of carrier (ie. an airline, bus line,
259	// railroad, etc). Value: the fixed string qpxexpress#carrierData.
260	Kind string `json:"kind,omitempty"`
261
262	// Name: The long, full name of a carrier. For example: American
263	// Airlines.
264	Name string `json:"name,omitempty"`
265
266	// ForceSendFields is a list of field names (e.g. "Code") to
267	// unconditionally include in API requests. By default, fields with
268	// empty values are omitted from API requests. However, any non-pointer,
269	// non-interface field appearing in ForceSendFields will be sent to the
270	// server regardless of whether the field is empty or not. This may be
271	// used to include empty fields in Patch requests.
272	ForceSendFields []string `json:"-"`
273
274	// NullFields is a list of field names (e.g. "Code") to include in API
275	// requests with the JSON null value. By default, fields with empty
276	// values are omitted from API requests. However, any field with an
277	// empty value appearing in NullFields will be sent to the server as
278	// null. It is an error if a field in this list has a non-empty value.
279	// This may be used to include null fields in Patch requests.
280	NullFields []string `json:"-"`
281}
282
283func (s *CarrierData) MarshalJSON() ([]byte, error) {
284	type NoMethod CarrierData
285	raw := NoMethod(*s)
286	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
287}
288
289// CityData: Information about a city that might be useful to an
290// end-user; typically the city of an airport.
291type CityData struct {
292	// Code: The IATA character ID of a city. For example, for Boston this
293	// is BOS.
294	Code string `json:"code,omitempty"`
295
296	// Country: The two-character country code of the country the city is
297	// located in. For example, US for the United States of America.
298	Country string `json:"country,omitempty"`
299
300	// Kind: Identifies this as a city, typically with one or more airports.
301	// Value: the fixed string qpxexpress#cityData.
302	Kind string `json:"kind,omitempty"`
303
304	// Name: The full name of a city. An example would be: New York.
305	Name string `json:"name,omitempty"`
306
307	// ForceSendFields is a list of field names (e.g. "Code") to
308	// unconditionally include in API requests. By default, fields with
309	// empty values are omitted from API requests. However, any non-pointer,
310	// non-interface field appearing in ForceSendFields will be sent to the
311	// server regardless of whether the field is empty or not. This may be
312	// used to include empty fields in Patch requests.
313	ForceSendFields []string `json:"-"`
314
315	// NullFields is a list of field names (e.g. "Code") to include in API
316	// requests with the JSON null value. By default, fields with empty
317	// values are omitted from API requests. However, any field with an
318	// empty value appearing in NullFields will be sent to the server as
319	// null. It is an error if a field in this list has a non-empty value.
320	// This may be used to include null fields in Patch requests.
321	NullFields []string `json:"-"`
322}
323
324func (s *CityData) MarshalJSON() ([]byte, error) {
325	type NoMethod CityData
326	raw := NoMethod(*s)
327	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
328}
329
330// Data: Detailed information about components found in the solutions of
331// this response, including a trip's airport, city, taxes, airline, and
332// aircraft.
333type Data struct {
334	// Aircraft: The aircraft that is flying between an origin and
335	// destination.
336	Aircraft []*AircraftData `json:"aircraft,omitempty"`
337
338	// Airport: The airport of an origin or destination.
339	Airport []*AirportData `json:"airport,omitempty"`
340
341	// Carrier: The airline carrier of the aircraft flying between an origin
342	// and destination. Allowed values are IATA carrier codes.
343	Carrier []*CarrierData `json:"carrier,omitempty"`
344
345	// City: The city that is either the origin or destination of part of a
346	// trip.
347	City []*CityData `json:"city,omitempty"`
348
349	// Kind: Identifies this as QPX Express response resource, including a
350	// trip's airport, city, taxes, airline, and aircraft. Value: the fixed
351	// string qpxexpress#data.
352	Kind string `json:"kind,omitempty"`
353
354	// Tax: The taxes due for flying between an origin and a destination.
355	Tax []*TaxData `json:"tax,omitempty"`
356
357	// ForceSendFields is a list of field names (e.g. "Aircraft") to
358	// unconditionally include in API requests. By default, fields with
359	// empty values are omitted from API requests. However, any non-pointer,
360	// non-interface field appearing in ForceSendFields will be sent to the
361	// server regardless of whether the field is empty or not. This may be
362	// used to include empty fields in Patch requests.
363	ForceSendFields []string `json:"-"`
364
365	// NullFields is a list of field names (e.g. "Aircraft") to include in
366	// API requests with the JSON null value. By default, fields with empty
367	// values are omitted from API requests. However, any field with an
368	// empty value appearing in NullFields will be sent to the server as
369	// null. It is an error if a field in this list has a non-empty value.
370	// This may be used to include null fields in Patch requests.
371	NullFields []string `json:"-"`
372}
373
374func (s *Data) MarshalJSON() ([]byte, error) {
375	type NoMethod Data
376	raw := NoMethod(*s)
377	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
378}
379
380// FareInfo: Complete information about a fare used in the solution to a
381// low-fare search query. In the airline industry a fare is a price an
382// airline charges for one-way travel between two points. A fare
383// typically contains a carrier code, two city codes, a price, and a
384// fare basis. (A fare basis is a one-to-eight character alphanumeric
385// code used to identify a fare.)
386type FareInfo struct {
387	BasisCode string `json:"basisCode,omitempty"`
388
389	// Carrier: The carrier of the aircraft or other vehicle commuting
390	// between two points.
391	Carrier string `json:"carrier,omitempty"`
392
393	// Destination: The city code of the city the trip ends at.
394	Destination string `json:"destination,omitempty"`
395
396	// Id: A unique identifier of the fare.
397	Id string `json:"id,omitempty"`
398
399	// Kind: Identifies this as a fare object. Value: the fixed string
400	// qpxexpress#fareInfo.
401	Kind string `json:"kind,omitempty"`
402
403	// Origin: The city code of the city the trip begins at.
404	Origin string `json:"origin,omitempty"`
405
406	// Private: Whether this is a private fare, for example one offered only
407	// to select customers rather than the general public.
408	Private bool `json:"private,omitempty"`
409
410	// ForceSendFields is a list of field names (e.g. "BasisCode") to
411	// unconditionally include in API requests. By default, fields with
412	// empty values are omitted from API requests. However, any non-pointer,
413	// non-interface field appearing in ForceSendFields will be sent to the
414	// server regardless of whether the field is empty or not. This may be
415	// used to include empty fields in Patch requests.
416	ForceSendFields []string `json:"-"`
417
418	// NullFields is a list of field names (e.g. "BasisCode") to include in
419	// API requests with the JSON null value. By default, fields with empty
420	// values are omitted from API requests. However, any field with an
421	// empty value appearing in NullFields will be sent to the server as
422	// null. It is an error if a field in this list has a non-empty value.
423	// This may be used to include null fields in Patch requests.
424	NullFields []string `json:"-"`
425}
426
427func (s *FareInfo) MarshalJSON() ([]byte, error) {
428	type NoMethod FareInfo
429	raw := NoMethod(*s)
430	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
431}
432
433// FlightInfo: A flight is a sequence of legs with the same airline
434// carrier and flight number. (A leg is the smallest unit of travel, in
435// the case of a flight a takeoff immediately followed by a landing at
436// two set points on a particular carrier with a particular flight
437// number.) The naive view is that a flight is scheduled travel of an
438// aircraft between two points, with possibly intermediate stops, but
439// carriers will frequently list flights that require a change of
440// aircraft between legs.
441type FlightInfo struct {
442	Carrier string `json:"carrier,omitempty"`
443
444	// Number: The flight number.
445	Number string `json:"number,omitempty"`
446
447	// ForceSendFields is a list of field names (e.g. "Carrier") to
448	// unconditionally include in API requests. By default, fields with
449	// empty values are omitted from API requests. However, any non-pointer,
450	// non-interface field appearing in ForceSendFields will be sent to the
451	// server regardless of whether the field is empty or not. This may be
452	// used to include empty fields in Patch requests.
453	ForceSendFields []string `json:"-"`
454
455	// NullFields is a list of field names (e.g. "Carrier") to include in
456	// API requests with the JSON null value. By default, fields with empty
457	// values are omitted from API requests. However, any field with an
458	// empty value appearing in NullFields will be sent to the server as
459	// null. It is an error if a field in this list has a non-empty value.
460	// This may be used to include null fields in Patch requests.
461	NullFields []string `json:"-"`
462}
463
464func (s *FlightInfo) MarshalJSON() ([]byte, error) {
465	type NoMethod FlightInfo
466	raw := NoMethod(*s)
467	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
468}
469
470// FreeBaggageAllowance: Information about free baggage allowed on one
471// segment of a trip.
472type FreeBaggageAllowance struct {
473	// BagDescriptor: A representation of a type of bag, such as an ATPCo
474	// subcode, Commercial Name, or other description.
475	BagDescriptor []*BagDescriptor `json:"bagDescriptor,omitempty"`
476
477	// Kilos: The maximum number of kilos all the free baggage together may
478	// weigh.
479	Kilos int64 `json:"kilos,omitempty"`
480
481	// KilosPerPiece: The maximum number of kilos any one piece of baggage
482	// may weigh.
483	KilosPerPiece int64 `json:"kilosPerPiece,omitempty"`
484
485	// Kind: Identifies this as free baggage object, allowed on one segment
486	// of a trip. Value: the fixed string qpxexpress#freeBaggageAllowance.
487	Kind string `json:"kind,omitempty"`
488
489	// Pieces: The number of free pieces of baggage allowed.
490	Pieces int64 `json:"pieces,omitempty"`
491
492	// Pounds: The number of pounds of free baggage allowed.
493	Pounds int64 `json:"pounds,omitempty"`
494
495	// ForceSendFields is a list of field names (e.g. "BagDescriptor") to
496	// unconditionally include in API requests. By default, fields with
497	// empty values are omitted from API requests. However, any non-pointer,
498	// non-interface field appearing in ForceSendFields will be sent to the
499	// server regardless of whether the field is empty or not. This may be
500	// used to include empty fields in Patch requests.
501	ForceSendFields []string `json:"-"`
502
503	// NullFields is a list of field names (e.g. "BagDescriptor") to include
504	// in API requests with the JSON null value. By default, fields with
505	// empty values are omitted from API requests. However, any field with
506	// an empty value appearing in NullFields will be sent to the server as
507	// null. It is an error if a field in this list has a non-empty value.
508	// This may be used to include null fields in Patch requests.
509	NullFields []string `json:"-"`
510}
511
512func (s *FreeBaggageAllowance) MarshalJSON() ([]byte, error) {
513	type NoMethod FreeBaggageAllowance
514	raw := NoMethod(*s)
515	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
516}
517
518// LegInfo: Information about a leg. (A leg is the smallest unit of
519// travel, in the case of a flight a takeoff immediately followed by a
520// landing at two set points on a particular carrier with a particular
521// flight number.)
522type LegInfo struct {
523	// Aircraft: The aircraft (or bus, ferry, railcar, etc) travelling
524	// between the two points of this leg.
525	Aircraft string `json:"aircraft,omitempty"`
526
527	// ArrivalTime: The scheduled time of arrival at the destination of the
528	// leg, local to the point of arrival.
529	ArrivalTime string `json:"arrivalTime,omitempty"`
530
531	// ChangePlane: Whether you have to change planes following this leg.
532	// Only applies to the next leg.
533	ChangePlane bool `json:"changePlane,omitempty"`
534
535	// ConnectionDuration: Duration of a connection following this leg, in
536	// minutes.
537	ConnectionDuration int64 `json:"connectionDuration,omitempty"`
538
539	// DepartureTime: The scheduled departure time of the leg, local to the
540	// point of departure.
541	DepartureTime string `json:"departureTime,omitempty"`
542
543	// Destination: The leg destination as a city and airport.
544	Destination string `json:"destination,omitempty"`
545
546	// DestinationTerminal: The terminal the flight is scheduled to arrive
547	// at.
548	DestinationTerminal string `json:"destinationTerminal,omitempty"`
549
550	// Duration: The scheduled travelling time from the origin to the
551	// destination.
552	Duration int64 `json:"duration,omitempty"`
553
554	// Id: An identifier that uniquely identifies this leg in the solution.
555	Id string `json:"id,omitempty"`
556
557	// Kind: Identifies this as a leg object. A leg is the smallest unit of
558	// travel, in the case of a flight a takeoff immediately followed by a
559	// landing at two set points on a particular carrier with a particular
560	// flight number. Value: the fixed string qpxexpress#legInfo.
561	Kind string `json:"kind,omitempty"`
562
563	// Meal: A simple, general description of the meal(s) served on the
564	// flight, for example: "Hot meal".
565	Meal string `json:"meal,omitempty"`
566
567	// Mileage: The number of miles in this leg.
568	Mileage int64 `json:"mileage,omitempty"`
569
570	// OnTimePerformance: In percent, the published on time performance on
571	// this leg.
572	OnTimePerformance int64 `json:"onTimePerformance,omitempty"`
573
574	// OperatingDisclosure: Department of Transportation disclosure
575	// information on the actual operator of a flight in a code share. (A
576	// code share refers to a marketing agreement between two carriers,
577	// where one carrier will list in its schedules (and take bookings for)
578	// flights that are actually operated by another carrier.)
579	OperatingDisclosure string `json:"operatingDisclosure,omitempty"`
580
581	// Origin: The leg origin as a city and airport.
582	Origin string `json:"origin,omitempty"`
583
584	// OriginTerminal: The terminal the flight is scheduled to depart from.
585	OriginTerminal string `json:"originTerminal,omitempty"`
586
587	// Secure: Whether passenger information must be furnished to the United
588	// States Transportation Security Administration (TSA) prior to
589	// departure.
590	Secure bool `json:"secure,omitempty"`
591
592	// ForceSendFields is a list of field names (e.g. "Aircraft") to
593	// unconditionally include in API requests. By default, fields with
594	// empty values are omitted from API requests. However, any non-pointer,
595	// non-interface field appearing in ForceSendFields will be sent to the
596	// server regardless of whether the field is empty or not. This may be
597	// used to include empty fields in Patch requests.
598	ForceSendFields []string `json:"-"`
599
600	// NullFields is a list of field names (e.g. "Aircraft") to include in
601	// API requests with the JSON null value. By default, fields with empty
602	// values are omitted from API requests. However, any field with an
603	// empty value appearing in NullFields will be sent to the server as
604	// null. It is an error if a field in this list has a non-empty value.
605	// This may be used to include null fields in Patch requests.
606	NullFields []string `json:"-"`
607}
608
609func (s *LegInfo) MarshalJSON() ([]byte, error) {
610	type NoMethod LegInfo
611	raw := NoMethod(*s)
612	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
613}
614
615// PassengerCounts: The number and type of passengers. Unfortunately the
616// definition of an infant, child, adult, and senior citizen varies
617// across carriers and reservation systems.
618type PassengerCounts struct {
619	// AdultCount: The number of passengers that are adults.
620	AdultCount int64 `json:"adultCount,omitempty"`
621
622	// ChildCount: The number of passengers that are children.
623	ChildCount int64 `json:"childCount,omitempty"`
624
625	// InfantInLapCount: The number of passengers that are infants
626	// travelling in the lap of an adult.
627	InfantInLapCount int64 `json:"infantInLapCount,omitempty"`
628
629	// InfantInSeatCount: The number of passengers that are infants each
630	// assigned a seat.
631	InfantInSeatCount int64 `json:"infantInSeatCount,omitempty"`
632
633	// Kind: Identifies this as a passenger count object, representing the
634	// number of passengers. Value: the fixed string
635	// qpxexpress#passengerCounts.
636	Kind string `json:"kind,omitempty"`
637
638	// SeniorCount: The number of passengers that are senior citizens.
639	SeniorCount int64 `json:"seniorCount,omitempty"`
640
641	// ForceSendFields is a list of field names (e.g. "AdultCount") to
642	// unconditionally include in API requests. By default, fields with
643	// empty values are omitted from API requests. However, any non-pointer,
644	// non-interface field appearing in ForceSendFields will be sent to the
645	// server regardless of whether the field is empty or not. This may be
646	// used to include empty fields in Patch requests.
647	ForceSendFields []string `json:"-"`
648
649	// NullFields is a list of field names (e.g. "AdultCount") to include in
650	// API requests with the JSON null value. By default, fields with empty
651	// values are omitted from API requests. However, any field with an
652	// empty value appearing in NullFields will be sent to the server as
653	// null. It is an error if a field in this list has a non-empty value.
654	// This may be used to include null fields in Patch requests.
655	NullFields []string `json:"-"`
656}
657
658func (s *PassengerCounts) MarshalJSON() ([]byte, error) {
659	type NoMethod PassengerCounts
660	raw := NoMethod(*s)
661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
662}
663
664// PricingInfo: The price of one or more travel segments. The currency
665// used to purchase tickets is usually determined by the sale/ticketing
666// city or the sale/ticketing country, unless none are specified, in
667// which case it defaults to that of the journey origin country.
668type PricingInfo struct {
669	// BaseFareTotal: The total fare in the base fare currency (the currency
670	// of the country of origin). This element is only present when the
671	// sales currency and the currency of the country of commencement are
672	// different.
673	BaseFareTotal string `json:"baseFareTotal,omitempty"`
674
675	// Fare: The fare used to price one or more segments.
676	Fare []*FareInfo `json:"fare,omitempty"`
677
678	// FareCalculation: The horizontal fare calculation. This is a field on
679	// a ticket that displays all of the relevant items that go into the
680	// calculation of the fare.
681	FareCalculation string `json:"fareCalculation,omitempty"`
682
683	// Kind: Identifies this as a pricing object, representing the price of
684	// one or more travel segments. Value: the fixed string
685	// qpxexpress#pricingInfo.
686	Kind string `json:"kind,omitempty"`
687
688	// LatestTicketingTime: The latest ticketing time for this pricing
689	// assuming the reservation occurs at ticketing time and there is no
690	// change in fares/rules. The time is local to the point of sale (POS).
691	LatestTicketingTime string `json:"latestTicketingTime,omitempty"`
692
693	// Passengers: The number of passengers to which this price applies.
694	Passengers *PassengerCounts `json:"passengers,omitempty"`
695
696	// Ptc: The passenger type code for this pricing. An alphanumeric code
697	// used by a carrier to restrict fares to certain categories of
698	// passenger. For instance, a fare might be valid only for senior
699	// citizens.
700	Ptc string `json:"ptc,omitempty"`
701
702	// Refundable: Whether the fares on this pricing are refundable.
703	Refundable bool `json:"refundable,omitempty"`
704
705	// SaleFareTotal: The total fare in the sale or equivalent currency.
706	SaleFareTotal string `json:"saleFareTotal,omitempty"`
707
708	// SaleTaxTotal: The taxes in the sale or equivalent currency.
709	SaleTaxTotal string `json:"saleTaxTotal,omitempty"`
710
711	// SaleTotal: Total per-passenger price (fare and tax) in the sale or
712	// equivalent currency.
713	SaleTotal string `json:"saleTotal,omitempty"`
714
715	// SegmentPricing: The per-segment price and baggage information.
716	SegmentPricing []*SegmentPricing `json:"segmentPricing,omitempty"`
717
718	// Tax: The taxes used to calculate the tax total per ticket.
719	Tax []*TaxInfo `json:"tax,omitempty"`
720
721	// ForceSendFields is a list of field names (e.g. "BaseFareTotal") to
722	// unconditionally include in API requests. By default, fields with
723	// empty values are omitted from API requests. However, any non-pointer,
724	// non-interface field appearing in ForceSendFields will be sent to the
725	// server regardless of whether the field is empty or not. This may be
726	// used to include empty fields in Patch requests.
727	ForceSendFields []string `json:"-"`
728
729	// NullFields is a list of field names (e.g. "BaseFareTotal") to include
730	// in API requests with the JSON null value. By default, fields with
731	// empty values are omitted from API requests. However, any field with
732	// an empty value appearing in NullFields will be sent to the server as
733	// null. It is an error if a field in this list has a non-empty value.
734	// This may be used to include null fields in Patch requests.
735	NullFields []string `json:"-"`
736}
737
738func (s *PricingInfo) MarshalJSON() ([]byte, error) {
739	type NoMethod PricingInfo
740	raw := NoMethod(*s)
741	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
742}
743
744// SegmentInfo: Details of a segment of a flight; a segment is one or
745// more consecutive legs on the same flight. For example a hypothetical
746// flight ZZ001, from DFW to OGG, would have one segment with two legs:
747// DFW to HNL (leg 1), HNL to OGG (leg 2), and DFW to OGG (legs 1 and
748// 2).
749type SegmentInfo struct {
750	// BookingCode: The booking code or class for this segment.
751	BookingCode string `json:"bookingCode,omitempty"`
752
753	// BookingCodeCount: The number of seats available in this booking code
754	// on this segment.
755	BookingCodeCount int64 `json:"bookingCodeCount,omitempty"`
756
757	// Cabin: The cabin booked for this segment.
758	Cabin string `json:"cabin,omitempty"`
759
760	// ConnectionDuration: In minutes, the duration of the connection
761	// following this segment.
762	ConnectionDuration int64 `json:"connectionDuration,omitempty"`
763
764	// Duration: The duration of the flight segment in minutes.
765	Duration int64 `json:"duration,omitempty"`
766
767	// Flight: The flight this is a segment of.
768	Flight *FlightInfo `json:"flight,omitempty"`
769
770	// Id: An id uniquely identifying the segment in the solution.
771	Id string `json:"id,omitempty"`
772
773	// Kind: Identifies this as a segment object. A segment is one or more
774	// consecutive legs on the same flight. For example a hypothetical
775	// flight ZZ001, from DFW to OGG, could have one segment with two legs:
776	// DFW to HNL (leg 1), HNL to OGG (leg 2). Value: the fixed string
777	// qpxexpress#segmentInfo.
778	Kind string `json:"kind,omitempty"`
779
780	// Leg: The legs composing this segment.
781	Leg []*LegInfo `json:"leg,omitempty"`
782
783	// MarriedSegmentGroup: The solution-based index of a segment in a
784	// married segment group. Married segments can only be booked together.
785	// For example, an airline might report a certain booking code as sold
786	// out from Boston to Pittsburgh, but as available as part of two
787	// married segments Boston to Chicago connecting through Pittsburgh. For
788	// example content of this field, consider the round-trip flight ZZ1
789	// PHX-PHL ZZ2 PHL-CLT ZZ3 CLT-PHX. This has three segments, with the
790	// two outbound ones (ZZ1 ZZ2) married. In this case, the two outbound
791	// segments belong to married segment group 0, and the return segment
792	// belongs to married segment group 1.
793	MarriedSegmentGroup string `json:"marriedSegmentGroup,omitempty"`
794
795	// SubjectToGovernmentApproval: Whether the operation of this segment
796	// remains subject to government approval.
797	SubjectToGovernmentApproval bool `json:"subjectToGovernmentApproval,omitempty"`
798
799	// ForceSendFields is a list of field names (e.g. "BookingCode") to
800	// unconditionally include in API requests. By default, fields with
801	// empty values are omitted from API requests. However, any non-pointer,
802	// non-interface field appearing in ForceSendFields will be sent to the
803	// server regardless of whether the field is empty or not. This may be
804	// used to include empty fields in Patch requests.
805	ForceSendFields []string `json:"-"`
806
807	// NullFields is a list of field names (e.g. "BookingCode") to include
808	// in API requests with the JSON null value. By default, fields with
809	// empty values are omitted from API requests. However, any field with
810	// an empty value appearing in NullFields will be sent to the server as
811	// null. It is an error if a field in this list has a non-empty value.
812	// This may be used to include null fields in Patch requests.
813	NullFields []string `json:"-"`
814}
815
816func (s *SegmentInfo) MarshalJSON() ([]byte, error) {
817	type NoMethod SegmentInfo
818	raw := NoMethod(*s)
819	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
820}
821
822// SegmentPricing: The price of this segment.
823type SegmentPricing struct {
824	// FareId: A segment identifier unique within a single solution. It is
825	// used to refer to different parts of the same solution.
826	FareId string `json:"fareId,omitempty"`
827
828	// FreeBaggageOption: Details of the free baggage allowance on this
829	// segment.
830	FreeBaggageOption []*FreeBaggageAllowance `json:"freeBaggageOption,omitempty"`
831
832	// Kind: Identifies this as a segment pricing object, representing the
833	// price of this segment. Value: the fixed string
834	// qpxexpress#segmentPricing.
835	Kind string `json:"kind,omitempty"`
836
837	// SegmentId: Unique identifier in the response of this segment.
838	SegmentId string `json:"segmentId,omitempty"`
839
840	// ForceSendFields is a list of field names (e.g. "FareId") to
841	// unconditionally include in API requests. By default, fields with
842	// empty values are omitted from API requests. However, any non-pointer,
843	// non-interface field appearing in ForceSendFields will be sent to the
844	// server regardless of whether the field is empty or not. This may be
845	// used to include empty fields in Patch requests.
846	ForceSendFields []string `json:"-"`
847
848	// NullFields is a list of field names (e.g. "FareId") to include in API
849	// requests with the JSON null value. By default, fields with empty
850	// values are omitted from API requests. However, any field with an
851	// empty value appearing in NullFields will be sent to the server as
852	// null. It is an error if a field in this list has a non-empty value.
853	// This may be used to include null fields in Patch requests.
854	NullFields []string `json:"-"`
855}
856
857func (s *SegmentPricing) MarshalJSON() ([]byte, error) {
858	type NoMethod SegmentPricing
859	raw := NoMethod(*s)
860	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
861}
862
863// SliceInfo: Information about a slice. A slice represents a
864// traveller's intent, the portion of a low-fare search corresponding to
865// a traveler's request to get between two points. One-way journeys are
866// generally expressed using 1 slice, round-trips using 2. For example,
867// if a traveler specifies the following trip in a user interface:
868// | Origin | Destination | Departure Date | | BOS | LAX | March 10,
869// 2007 | | LAX | SYD | March 17, 2007 | | SYD | BOS | March 22, 2007
870// |
871// then this is a three slice trip.
872type SliceInfo struct {
873	// Duration: The duration of the slice in minutes.
874	Duration int64 `json:"duration,omitempty"`
875
876	// Kind: Identifies this as a slice object. A slice represents a
877	// traveller's intent, the portion of a low-fare search corresponding to
878	// a traveler's request to get between two points. One-way journeys are
879	// generally expressed using 1 slice, round-trips using 2. Value: the
880	// fixed string qpxexpress#sliceInfo.
881	Kind string `json:"kind,omitempty"`
882
883	// Segment: The segment(s) constituting the slice.
884	Segment []*SegmentInfo `json:"segment,omitempty"`
885
886	// ForceSendFields is a list of field names (e.g. "Duration") to
887	// unconditionally include in API requests. By default, fields with
888	// empty values are omitted from API requests. However, any non-pointer,
889	// non-interface field appearing in ForceSendFields will be sent to the
890	// server regardless of whether the field is empty or not. This may be
891	// used to include empty fields in Patch requests.
892	ForceSendFields []string `json:"-"`
893
894	// NullFields is a list of field names (e.g. "Duration") to include in
895	// API requests with the JSON null value. By default, fields with empty
896	// values are omitted from API requests. However, any field with an
897	// empty value appearing in NullFields will be sent to the server as
898	// null. It is an error if a field in this list has a non-empty value.
899	// This may be used to include null fields in Patch requests.
900	NullFields []string `json:"-"`
901}
902
903func (s *SliceInfo) MarshalJSON() ([]byte, error) {
904	type NoMethod SliceInfo
905	raw := NoMethod(*s)
906	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
907}
908
909// SliceInput: Criteria a desired slice must satisfy.
910type SliceInput struct {
911	// Alliance: Slices with only the carriers in this alliance should be
912	// returned; do not use this field with permittedCarrier. Allowed values
913	// are ONEWORLD, SKYTEAM, and STAR.
914	Alliance string `json:"alliance,omitempty"`
915
916	// Date: Departure date in YYYY-MM-DD format.
917	Date string `json:"date,omitempty"`
918
919	// Destination: Airport or city IATA designator of the destination.
920	Destination string `json:"destination,omitempty"`
921
922	// Kind: Identifies this as a slice input object, representing the
923	// criteria a desired slice must satisfy. Value: the fixed string
924	// qpxexpress#sliceInput.
925	Kind string `json:"kind,omitempty"`
926
927	// MaxConnectionDuration: The longest connection between two legs, in
928	// minutes, you are willing to accept.
929	MaxConnectionDuration int64 `json:"maxConnectionDuration,omitempty"`
930
931	// MaxStops: The maximum number of stops you are willing to accept in
932	// this slice.
933	MaxStops int64 `json:"maxStops,omitempty"`
934
935	// Origin: Airport or city IATA designator of the origin.
936	Origin string `json:"origin,omitempty"`
937
938	// PermittedCarrier: A list of 2-letter IATA airline designators. Slices
939	// with only these carriers should be returned.
940	PermittedCarrier []string `json:"permittedCarrier,omitempty"`
941
942	// PermittedDepartureTime: Slices must depart in this time of day range,
943	// local to the point of departure.
944	PermittedDepartureTime *TimeOfDayRange `json:"permittedDepartureTime,omitempty"`
945
946	// PreferredCabin: Prefer solutions that book in this cabin for this
947	// slice. Allowed values are COACH, PREMIUM_COACH, BUSINESS, and FIRST.
948	PreferredCabin string `json:"preferredCabin,omitempty"`
949
950	// ProhibitedCarrier: A list of 2-letter IATA airline designators.
951	// Exclude slices that use these carriers.
952	ProhibitedCarrier []string `json:"prohibitedCarrier,omitempty"`
953
954	// ForceSendFields is a list of field names (e.g. "Alliance") to
955	// unconditionally include in API requests. By default, fields with
956	// empty values are omitted from API requests. However, any non-pointer,
957	// non-interface field appearing in ForceSendFields will be sent to the
958	// server regardless of whether the field is empty or not. This may be
959	// used to include empty fields in Patch requests.
960	ForceSendFields []string `json:"-"`
961
962	// NullFields is a list of field names (e.g. "Alliance") to include in
963	// API requests with the JSON null value. By default, fields with empty
964	// values are omitted from API requests. However, any field with an
965	// empty value appearing in NullFields will be sent to the server as
966	// null. It is an error if a field in this list has a non-empty value.
967	// This may be used to include null fields in Patch requests.
968	NullFields []string `json:"-"`
969}
970
971func (s *SliceInput) MarshalJSON() ([]byte, error) {
972	type NoMethod SliceInput
973	raw := NoMethod(*s)
974	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
975}
976
977// TaxData: Tax data.
978type TaxData struct {
979	// Id: An identifier uniquely identifying a tax in a response.
980	Id string `json:"id,omitempty"`
981
982	// Kind: Identifies this as a tax data object, representing some tax.
983	// Value: the fixed string qpxexpress#taxData.
984	Kind string `json:"kind,omitempty"`
985
986	// Name: The name of a tax.
987	Name string `json:"name,omitempty"`
988
989	// ForceSendFields is a list of field names (e.g. "Id") to
990	// unconditionally include in API requests. By default, fields with
991	// empty values are omitted from API requests. However, any non-pointer,
992	// non-interface field appearing in ForceSendFields will be sent to the
993	// server regardless of whether the field is empty or not. This may be
994	// used to include empty fields in Patch requests.
995	ForceSendFields []string `json:"-"`
996
997	// NullFields is a list of field names (e.g. "Id") to include in API
998	// requests with the JSON null value. By default, fields with empty
999	// values are omitted from API requests. However, any field with an
1000	// empty value appearing in NullFields will be sent to the server as
1001	// null. It is an error if a field in this list has a non-empty value.
1002	// This may be used to include null fields in Patch requests.
1003	NullFields []string `json:"-"`
1004}
1005
1006func (s *TaxData) MarshalJSON() ([]byte, error) {
1007	type NoMethod TaxData
1008	raw := NoMethod(*s)
1009	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1010}
1011
1012// TaxInfo: Tax information.
1013type TaxInfo struct {
1014	// ChargeType: Whether this is a government charge or a carrier
1015	// surcharge.
1016	ChargeType string `json:"chargeType,omitempty"`
1017
1018	// Code: The code to enter in the ticket's tax box.
1019	Code string `json:"code,omitempty"`
1020
1021	// Country: For government charges, the country levying the charge.
1022	Country string `json:"country,omitempty"`
1023
1024	// Id: Identifier uniquely identifying this tax in a response. Not
1025	// present for unnamed carrier surcharges.
1026	Id string `json:"id,omitempty"`
1027
1028	// Kind: Identifies this as a tax information object. Value: the fixed
1029	// string qpxexpress#taxInfo.
1030	Kind string `json:"kind,omitempty"`
1031
1032	// SalePrice: The price of the tax in the sales or equivalent currency.
1033	SalePrice string `json:"salePrice,omitempty"`
1034
1035	// ForceSendFields is a list of field names (e.g. "ChargeType") to
1036	// unconditionally include in API requests. By default, fields with
1037	// empty values are omitted from API requests. However, any non-pointer,
1038	// non-interface field appearing in ForceSendFields will be sent to the
1039	// server regardless of whether the field is empty or not. This may be
1040	// used to include empty fields in Patch requests.
1041	ForceSendFields []string `json:"-"`
1042
1043	// NullFields is a list of field names (e.g. "ChargeType") to include in
1044	// API requests with the JSON null value. By default, fields with empty
1045	// values are omitted from API requests. However, any field with an
1046	// empty value appearing in NullFields will be sent to the server as
1047	// null. It is an error if a field in this list has a non-empty value.
1048	// This may be used to include null fields in Patch requests.
1049	NullFields []string `json:"-"`
1050}
1051
1052func (s *TaxInfo) MarshalJSON() ([]byte, error) {
1053	type NoMethod TaxInfo
1054	raw := NoMethod(*s)
1055	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1056}
1057
1058// TimeOfDayRange: Two times in a single day defining a time range.
1059type TimeOfDayRange struct {
1060	// EarliestTime: The earliest time of day in HH:MM format.
1061	EarliestTime string `json:"earliestTime,omitempty"`
1062
1063	// Kind: Identifies this as a time of day range object, representing two
1064	// times in a single day defining a time range. Value: the fixed string
1065	// qpxexpress#timeOfDayRange.
1066	Kind string `json:"kind,omitempty"`
1067
1068	// LatestTime: The latest time of day in HH:MM format.
1069	LatestTime string `json:"latestTime,omitempty"`
1070
1071	// ForceSendFields is a list of field names (e.g. "EarliestTime") to
1072	// unconditionally include in API requests. By default, fields with
1073	// empty values are omitted from API requests. However, any non-pointer,
1074	// non-interface field appearing in ForceSendFields will be sent to the
1075	// server regardless of whether the field is empty or not. This may be
1076	// used to include empty fields in Patch requests.
1077	ForceSendFields []string `json:"-"`
1078
1079	// NullFields is a list of field names (e.g. "EarliestTime") to include
1080	// in API requests with the JSON null value. By default, fields with
1081	// empty values are omitted from API requests. However, any field with
1082	// an empty value appearing in NullFields will be sent to the server as
1083	// null. It is an error if a field in this list has a non-empty value.
1084	// This may be used to include null fields in Patch requests.
1085	NullFields []string `json:"-"`
1086}
1087
1088func (s *TimeOfDayRange) MarshalJSON() ([]byte, error) {
1089	type NoMethod TimeOfDayRange
1090	raw := NoMethod(*s)
1091	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1092}
1093
1094// TripOption: Trip information.
1095type TripOption struct {
1096	// Id: Identifier uniquely identifying this trip in a response.
1097	Id string `json:"id,omitempty"`
1098
1099	// Kind: Identifies this as a trip information object. Value: the fixed
1100	// string qpxexpress#tripOption.
1101	Kind string `json:"kind,omitempty"`
1102
1103	// Pricing: Per passenger pricing information.
1104	Pricing []*PricingInfo `json:"pricing,omitempty"`
1105
1106	// SaleTotal: The total price for all passengers on the trip, in the
1107	// form of a currency followed by an amount, e.g. USD253.35.
1108	SaleTotal string `json:"saleTotal,omitempty"`
1109
1110	// Slice: The slices that make up this trip's itinerary.
1111	Slice []*SliceInfo `json:"slice,omitempty"`
1112
1113	// ForceSendFields is a list of field names (e.g. "Id") to
1114	// unconditionally include in API requests. By default, fields with
1115	// empty values are omitted from API requests. However, any non-pointer,
1116	// non-interface field appearing in ForceSendFields will be sent to the
1117	// server regardless of whether the field is empty or not. This may be
1118	// used to include empty fields in Patch requests.
1119	ForceSendFields []string `json:"-"`
1120
1121	// NullFields is a list of field names (e.g. "Id") to include in API
1122	// requests with the JSON null value. By default, fields with empty
1123	// values are omitted from API requests. However, any field with an
1124	// empty value appearing in NullFields will be sent to the server as
1125	// null. It is an error if a field in this list has a non-empty value.
1126	// This may be used to include null fields in Patch requests.
1127	NullFields []string `json:"-"`
1128}
1129
1130func (s *TripOption) MarshalJSON() ([]byte, error) {
1131	type NoMethod TripOption
1132	raw := NoMethod(*s)
1133	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1134}
1135
1136// TripOptionsRequest: A QPX Express search request, which will yield
1137// one or more solutions.
1138type TripOptionsRequest struct {
1139	// MaxPrice: Do not return solutions that cost more than this price. The
1140	// alphabetical part of the price is in ISO 4217. The format, in regex,
1141	// is [A-Z]{3}\d+(\.\d+)? Example: $102.07
1142	MaxPrice string `json:"maxPrice,omitempty"`
1143
1144	// Passengers: Counts for each passenger type in the request.
1145	Passengers *PassengerCounts `json:"passengers,omitempty"`
1146
1147	// Refundable: Return only solutions with refundable fares.
1148	Refundable bool `json:"refundable,omitempty"`
1149
1150	// SaleCountry: IATA country code representing the point of sale. This
1151	// determines the "equivalent amount paid" currency for the ticket.
1152	SaleCountry string `json:"saleCountry,omitempty"`
1153
1154	// Slice: The slices that make up the itinerary of this trip. A slice
1155	// represents a traveler's intent, the portion of a low-fare search
1156	// corresponding to a traveler's request to get between two points.
1157	// One-way journeys are generally expressed using one slice, round-trips
1158	// using two. An example of a one slice trip with three segments might
1159	// be BOS-SYD, SYD-LAX, LAX-BOS if the traveler only stopped in SYD and
1160	// LAX just long enough to change planes.
1161	Slice []*SliceInput `json:"slice,omitempty"`
1162
1163	// Solutions: The number of solutions to return, maximum 500.
1164	Solutions int64 `json:"solutions,omitempty"`
1165
1166	// TicketingCountry: IATA country code representing the point of
1167	// ticketing.
1168	TicketingCountry string `json:"ticketingCountry,omitempty"`
1169
1170	// ForceSendFields is a list of field names (e.g. "MaxPrice") to
1171	// unconditionally include in API requests. By default, fields with
1172	// empty values are omitted from API requests. However, any non-pointer,
1173	// non-interface field appearing in ForceSendFields will be sent to the
1174	// server regardless of whether the field is empty or not. This may be
1175	// used to include empty fields in Patch requests.
1176	ForceSendFields []string `json:"-"`
1177
1178	// NullFields is a list of field names (e.g. "MaxPrice") to include in
1179	// API requests with the JSON null value. By default, fields with empty
1180	// values are omitted from API requests. However, any field with an
1181	// empty value appearing in NullFields will be sent to the server as
1182	// null. It is an error if a field in this list has a non-empty value.
1183	// This may be used to include null fields in Patch requests.
1184	NullFields []string `json:"-"`
1185}
1186
1187func (s *TripOptionsRequest) MarshalJSON() ([]byte, error) {
1188	type NoMethod TripOptionsRequest
1189	raw := NoMethod(*s)
1190	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1191}
1192
1193// TripOptionsResponse: A QPX Express search response.
1194type TripOptionsResponse struct {
1195	// Data: Informational data global to list of solutions.
1196	Data *Data `json:"data,omitempty"`
1197
1198	// Kind: Identifies this as a QPX Express trip response object, which
1199	// consists of zero or more solutions. Value: the fixed string
1200	// qpxexpress#tripOptions.
1201	Kind string `json:"kind,omitempty"`
1202
1203	// RequestId: An identifier uniquely identifying this response.
1204	RequestId string `json:"requestId,omitempty"`
1205
1206	// TripOption: A list of priced itinerary solutions to the QPX Express
1207	// query.
1208	TripOption []*TripOption `json:"tripOption,omitempty"`
1209
1210	// ForceSendFields is a list of field names (e.g. "Data") to
1211	// unconditionally include in API requests. By default, fields with
1212	// empty values are omitted from API requests. However, any non-pointer,
1213	// non-interface field appearing in ForceSendFields will be sent to the
1214	// server regardless of whether the field is empty or not. This may be
1215	// used to include empty fields in Patch requests.
1216	ForceSendFields []string `json:"-"`
1217
1218	// NullFields is a list of field names (e.g. "Data") to include in API
1219	// requests with the JSON null value. By default, fields with empty
1220	// values are omitted from API requests. However, any field with an
1221	// empty value appearing in NullFields will be sent to the server as
1222	// null. It is an error if a field in this list has a non-empty value.
1223	// This may be used to include null fields in Patch requests.
1224	NullFields []string `json:"-"`
1225}
1226
1227func (s *TripOptionsResponse) MarshalJSON() ([]byte, error) {
1228	type NoMethod TripOptionsResponse
1229	raw := NoMethod(*s)
1230	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1231}
1232
1233// TripsSearchRequest: A QPX Express search request.
1234type TripsSearchRequest struct {
1235	// Request: A QPX Express search request. Required values are at least
1236	// one adult or senior passenger, an origin, a destination, and a date.
1237	Request *TripOptionsRequest `json:"request,omitempty"`
1238
1239	// ForceSendFields is a list of field names (e.g. "Request") to
1240	// unconditionally include in API requests. By default, fields with
1241	// empty values are omitted from API requests. However, any non-pointer,
1242	// non-interface field appearing in ForceSendFields will be sent to the
1243	// server regardless of whether the field is empty or not. This may be
1244	// used to include empty fields in Patch requests.
1245	ForceSendFields []string `json:"-"`
1246
1247	// NullFields is a list of field names (e.g. "Request") to include in
1248	// API requests with the JSON null value. By default, fields with empty
1249	// values are omitted from API requests. However, any field with an
1250	// empty value appearing in NullFields will be sent to the server as
1251	// null. It is an error if a field in this list has a non-empty value.
1252	// This may be used to include null fields in Patch requests.
1253	NullFields []string `json:"-"`
1254}
1255
1256func (s *TripsSearchRequest) MarshalJSON() ([]byte, error) {
1257	type NoMethod TripsSearchRequest
1258	raw := NoMethod(*s)
1259	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1260}
1261
1262// TripsSearchResponse: A QPX Express search response.
1263type TripsSearchResponse struct {
1264	// Kind: Identifies this as a QPX Express API search response resource.
1265	// Value: the fixed string qpxExpress#tripsSearch.
1266	Kind string `json:"kind,omitempty"`
1267
1268	// Trips: All possible solutions to the QPX Express search request.
1269	Trips *TripOptionsResponse `json:"trips,omitempty"`
1270
1271	// ServerResponse contains the HTTP response code and headers from the
1272	// server.
1273	googleapi.ServerResponse `json:"-"`
1274
1275	// ForceSendFields is a list of field names (e.g. "Kind") to
1276	// unconditionally include in API requests. By default, fields with
1277	// empty values are omitted from API requests. However, any non-pointer,
1278	// non-interface field appearing in ForceSendFields will be sent to the
1279	// server regardless of whether the field is empty or not. This may be
1280	// used to include empty fields in Patch requests.
1281	ForceSendFields []string `json:"-"`
1282
1283	// NullFields is a list of field names (e.g. "Kind") to include in API
1284	// requests with the JSON null value. By default, fields with empty
1285	// values are omitted from API requests. However, any field with an
1286	// empty value appearing in NullFields will be sent to the server as
1287	// null. It is an error if a field in this list has a non-empty value.
1288	// This may be used to include null fields in Patch requests.
1289	NullFields []string `json:"-"`
1290}
1291
1292func (s *TripsSearchResponse) MarshalJSON() ([]byte, error) {
1293	type NoMethod TripsSearchResponse
1294	raw := NoMethod(*s)
1295	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1296}
1297
1298// method id "qpxExpress.trips.search":
1299
1300type TripsSearchCall struct {
1301	s                  *Service
1302	tripssearchrequest *TripsSearchRequest
1303	urlParams_         gensupport.URLParams
1304	ctx_               context.Context
1305	header_            http.Header
1306}
1307
1308// Search: Returns a list of flights.
1309func (r *TripsService) Search(tripssearchrequest *TripsSearchRequest) *TripsSearchCall {
1310	c := &TripsSearchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
1311	c.tripssearchrequest = tripssearchrequest
1312	return c
1313}
1314
1315// Fields allows partial responses to be retrieved. See
1316// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1317// for more information.
1318func (c *TripsSearchCall) Fields(s ...googleapi.Field) *TripsSearchCall {
1319	c.urlParams_.Set("fields", googleapi.CombineFields(s))
1320	return c
1321}
1322
1323// Context sets the context to be used in this call's Do method. Any
1324// pending HTTP request will be aborted if the provided context is
1325// canceled.
1326func (c *TripsSearchCall) Context(ctx context.Context) *TripsSearchCall {
1327	c.ctx_ = ctx
1328	return c
1329}
1330
1331// Header returns an http.Header that can be modified by the caller to
1332// add HTTP headers to the request.
1333func (c *TripsSearchCall) Header() http.Header {
1334	if c.header_ == nil {
1335		c.header_ = make(http.Header)
1336	}
1337	return c.header_
1338}
1339
1340func (c *TripsSearchCall) doRequest(alt string) (*http.Response, error) {
1341	reqHeaders := make(http.Header)
1342	reqHeaders.Set("x-goog-api-client", "gl-go/1.13.7 gdcl/20200203")
1343	for k, v := range c.header_ {
1344		reqHeaders[k] = v
1345	}
1346	reqHeaders.Set("User-Agent", c.s.userAgent())
1347	var body io.Reader = nil
1348	body, err := googleapi.WithoutDataWrapper.JSONReader(c.tripssearchrequest)
1349	if err != nil {
1350		return nil, err
1351	}
1352	reqHeaders.Set("Content-Type", "application/json")
1353	c.urlParams_.Set("alt", alt)
1354	c.urlParams_.Set("prettyPrint", "false")
1355	urls := googleapi.ResolveRelative(c.s.BasePath, "search")
1356	urls += "?" + c.urlParams_.Encode()
1357	req, err := http.NewRequest("POST", urls, body)
1358	if err != nil {
1359		return nil, err
1360	}
1361	req.Header = reqHeaders
1362	return gensupport.SendRequest(c.ctx_, c.s.client, req)
1363}
1364
1365// Do executes the "qpxExpress.trips.search" call.
1366// Exactly one of *TripsSearchResponse or error will be non-nil. Any
1367// non-2xx status code is an error. Response headers are in either
1368// *TripsSearchResponse.ServerResponse.Header or (if a response was
1369// returned at all) in error.(*googleapi.Error).Header. Use
1370// googleapi.IsNotModified to check whether the returned error was
1371// because http.StatusNotModified was returned.
1372func (c *TripsSearchCall) Do(opts ...googleapi.CallOption) (*TripsSearchResponse, error) {
1373	gensupport.SetOptions(c.urlParams_, opts...)
1374	res, err := c.doRequest("json")
1375	if res != nil && res.StatusCode == http.StatusNotModified {
1376		if res.Body != nil {
1377			res.Body.Close()
1378		}
1379		return nil, &googleapi.Error{
1380			Code:   res.StatusCode,
1381			Header: res.Header,
1382		}
1383	}
1384	if err != nil {
1385		return nil, err
1386	}
1387	defer googleapi.CloseBody(res)
1388	if err := googleapi.CheckResponse(res); err != nil {
1389		return nil, err
1390	}
1391	ret := &TripsSearchResponse{
1392		ServerResponse: googleapi.ServerResponse{
1393			Header:         res.Header,
1394			HTTPStatusCode: res.StatusCode,
1395		},
1396	}
1397	target := &ret
1398	if err := gensupport.DecodeResponse(target, res); err != nil {
1399		return nil, err
1400	}
1401	return ret, nil
1402	// {
1403	//   "description": "Returns a list of flights.",
1404	//   "httpMethod": "POST",
1405	//   "id": "qpxExpress.trips.search",
1406	//   "path": "search",
1407	//   "request": {
1408	//     "$ref": "TripsSearchRequest"
1409	//   },
1410	//   "response": {
1411	//     "$ref": "TripsSearchResponse"
1412	//   }
1413	// }
1414
1415}
1416