Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FlightSearchSegment" /> class.
 /// </summary>
 /// <param name="DepartsAt">Date and time of departure at the origin, in &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/ISO_8601\&quot;&gt;ISO 8601&lt;/a&gt;  date format yyyy-MM-ddTHH:mm in the local time at the origin airport (required).</param>
 /// <param name="ArrivesAt">Date and time of departure at the destination, in &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/ISO_8601\&quot;&gt;ISO 8601&lt;/a&gt;  date format yyyy-MM-ddTHH:mm in the local time at the destination airport (required).</param>
 /// <param name="Origin">Information on the origin airport, from which this flight departs (required).</param>
 /// <param name="Destination">Information on the destination airport, at which this flight arrives (required).</param>
 /// <param name="MarketingAirline">The 2 character alphanumeric &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/Airline_codes\&quot;&gt;IATA airline code&lt;/a&gt; of the airline that is responsible for the traveller this flight (required).</param>
 /// <param name="OperatingAirline">The 2 character alphanumeric &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/Airline_codes\&quot;&gt;IATA airline code&lt;/a&gt; of the airline that is providing the aircraft for this flight. Note that in the USA, if the marketing and operating carrier are different, you are legally required to display this in your application. (required).</param>
 /// <param name="FlightNumber">The identifier that the airline uses for this flight route. This is most commonly - but not always - a number. When combined with the airline and date, it identifies an individual aircraft&#39;s flight (required).</param>
 /// <param name="Aircraft">The &lt;a href&#x3D;\&quot;http://www.jacanaent.com/JacTechLib/07Aviation/AircraftTypeCodes.txt\&quot;&gt;IATA aircraft type designator&lt;/a&gt; of aircraft that will be used for this flight.</param>
 /// <param name="BookingInfo">A booking information object with additional details about how the quality of this flight at the given price. (required).</param>
 public FlightSearchSegment(string DepartsAt = default(string), string ArrivesAt = default(string), Airport Origin = default(Airport), Airport Destination = default(Airport), string MarketingAirline = default(string), string OperatingAirline = default(string), string FlightNumber = default(string), string Aircraft = default(string), FlightSearchBookingInfo BookingInfo = default(FlightSearchBookingInfo))
 {
     // to ensure "DepartsAt" is required (not null)
     if (DepartsAt == null)
     {
         throw new InvalidDataException("DepartsAt is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.DepartsAt = DepartsAt;
     }
     // to ensure "ArrivesAt" is required (not null)
     if (ArrivesAt == null)
     {
         throw new InvalidDataException("ArrivesAt is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.ArrivesAt = ArrivesAt;
     }
     // to ensure "Origin" is required (not null)
     if (Origin == null)
     {
         throw new InvalidDataException("Origin is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.Origin = Origin;
     }
     // to ensure "Destination" is required (not null)
     if (Destination == null)
     {
         throw new InvalidDataException("Destination is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.Destination = Destination;
     }
     // to ensure "MarketingAirline" is required (not null)
     if (MarketingAirline == null)
     {
         throw new InvalidDataException("MarketingAirline is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.MarketingAirline = MarketingAirline;
     }
     // to ensure "OperatingAirline" is required (not null)
     if (OperatingAirline == null)
     {
         throw new InvalidDataException("OperatingAirline is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.OperatingAirline = OperatingAirline;
     }
     // to ensure "FlightNumber" is required (not null)
     if (FlightNumber == null)
     {
         throw new InvalidDataException("FlightNumber is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.FlightNumber = FlightNumber;
     }
     // to ensure "BookingInfo" is required (not null)
     if (BookingInfo == null)
     {
         throw new InvalidDataException("BookingInfo is a required property for FlightSearchSegment and cannot be null");
     }
     else
     {
         this.BookingInfo = BookingInfo;
     }
     this.Aircraft = Aircraft;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FlightReservationSegment" /> class.
 /// </summary>
 /// <param name="Id">Uniquely identifies this flight in this travel record. This ID is persistent, and remains the same for the lifetime of the travel record. (required).</param>
 /// <param name="DepartsAt">Date and time of departure at the origin, in &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/ISO_8601\&quot;&gt;ISO 8601&lt;/a&gt;  date format yyyy-MM-ddTHH:mm in the local time at the origin airport (required).</param>
 /// <param name="ArrivesAt">Date and time of departure at the destination, in &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/ISO_8601\&quot;&gt;ISO 8601&lt;/a&gt;  date format yyyy-MM-ddTHH:mm in the local time at the destination airport (required).</param>
 /// <param name="Origin">Information on the origin airport, from which this flight departs (required).</param>
 /// <param name="Destination">Information on the destination airport, at which this flight arrives (required).</param>
 /// <param name="MarketingAirline">The 2 character alphanumeric &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/Airline_codes\&quot;&gt;IATA airline code&lt;/a&gt; of the airline that is responsible for the traveller this flight (required).</param>
 /// <param name="OperatingAirline">The 2 character alphanumeric &lt;a href&#x3D;\&quot;https://en.wikipedia.org/wiki/Airline_codes\&quot;&gt;IATA airline code&lt;/a&gt; of the airline that is providing the aircraft for this flight. Note that in the USA, if the marketing and operating carrier are different, you are legally required to display this in your application. (required).</param>
 /// <param name="FlightNumber">The identifier that the airline uses for this flight route. This is most commonly - but not always - a number. When combined with the airline and date, it identifies an individual aircraft&#39;s flight (required).</param>
 /// <param name="TravelerIds">Traveler identifiers to indicate the travelers to whom this ticket applies. (required).</param>
 /// <param name="BookingInfo">A booking information object with additional details about how the quality of this flight at the given price. (required).</param>
 public FlightReservationSegment(string Id = default(string), string DepartsAt = default(string), string ArrivesAt = default(string), Airport Origin = default(Airport), Airport Destination = default(Airport), string MarketingAirline = default(string), string OperatingAirline = default(string), string FlightNumber = default(string), List <string> TravelerIds = default(List <string>), FlightReservationBookingInfo BookingInfo = default(FlightReservationBookingInfo))
 {
     // to ensure "Id" is required (not null)
     if (Id == null)
     {
         throw new InvalidDataException("Id is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.Id = Id;
     }
     // to ensure "DepartsAt" is required (not null)
     if (DepartsAt == null)
     {
         throw new InvalidDataException("DepartsAt is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.DepartsAt = DepartsAt;
     }
     // to ensure "ArrivesAt" is required (not null)
     if (ArrivesAt == null)
     {
         throw new InvalidDataException("ArrivesAt is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.ArrivesAt = ArrivesAt;
     }
     // to ensure "Origin" is required (not null)
     if (Origin == null)
     {
         throw new InvalidDataException("Origin is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.Origin = Origin;
     }
     // to ensure "Destination" is required (not null)
     if (Destination == null)
     {
         throw new InvalidDataException("Destination is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.Destination = Destination;
     }
     // to ensure "MarketingAirline" is required (not null)
     if (MarketingAirline == null)
     {
         throw new InvalidDataException("MarketingAirline is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.MarketingAirline = MarketingAirline;
     }
     // to ensure "OperatingAirline" is required (not null)
     if (OperatingAirline == null)
     {
         throw new InvalidDataException("OperatingAirline is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.OperatingAirline = OperatingAirline;
     }
     // to ensure "FlightNumber" is required (not null)
     if (FlightNumber == null)
     {
         throw new InvalidDataException("FlightNumber is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.FlightNumber = FlightNumber;
     }
     // to ensure "TravelerIds" is required (not null)
     if (TravelerIds == null)
     {
         throw new InvalidDataException("TravelerIds is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.TravelerIds = TravelerIds;
     }
     // to ensure "BookingInfo" is required (not null)
     if (BookingInfo == null)
     {
         throw new InvalidDataException("BookingInfo is a required property for FlightReservationSegment and cannot be null");
     }
     else
     {
         this.BookingInfo = BookingInfo;
     }
 }