| 1: | <?php |
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | namespace Worldline\Connect\Sdk\V1\Domain; |
| 7: | |
| 8: | use UnexpectedValueException; |
| 9: | use Worldline\Connect\Sdk\Domain\DataObject; |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | class AirlineFlightLeg extends DataObject |
| 15: | { |
| 16: | |
| 17: | |
| 18: | |
| 19: | public ?string $airlineClass = null; |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | public ?string $arrivalAirport = null; |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | public ?string $arrivalTime = null; |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | public ?string $carrierCode = null; |
| 35: | |
| 36: | |
| 37: | |
| 38: | |
| 39: | public ?string $conjunctionTicket = null; |
| 40: | |
| 41: | |
| 42: | |
| 43: | |
| 44: | public ?string $couponNumber = null; |
| 45: | |
| 46: | |
| 47: | |
| 48: | |
| 49: | public ?string $date = null; |
| 50: | |
| 51: | |
| 52: | |
| 53: | |
| 54: | public ?string $departureTime = null; |
| 55: | |
| 56: | |
| 57: | |
| 58: | |
| 59: | public ?string $endorsementOrRestriction = null; |
| 60: | |
| 61: | |
| 62: | |
| 63: | |
| 64: | public ?string $exchangeTicket = null; |
| 65: | |
| 66: | |
| 67: | |
| 68: | |
| 69: | public ?string $fare = null; |
| 70: | |
| 71: | |
| 72: | |
| 73: | |
| 74: | public ?string $fareBasis = null; |
| 75: | |
| 76: | |
| 77: | |
| 78: | |
| 79: | public ?int $fee = null; |
| 80: | |
| 81: | |
| 82: | |
| 83: | |
| 84: | public ?string $flightNumber = null; |
| 85: | |
| 86: | |
| 87: | |
| 88: | |
| 89: | public ?int $number = null; |
| 90: | |
| 91: | |
| 92: | |
| 93: | |
| 94: | public ?string $originAirport = null; |
| 95: | |
| 96: | |
| 97: | |
| 98: | |
| 99: | public ?string $passengerClass = null; |
| 100: | |
| 101: | |
| 102: | |
| 103: | |
| 104: | |
| 105: | |
| 106: | public ?string $serviceClass = null; |
| 107: | |
| 108: | |
| 109: | |
| 110: | |
| 111: | public ?string $stopoverCode = null; |
| 112: | |
| 113: | |
| 114: | |
| 115: | |
| 116: | public ?int $taxes = null; |
| 117: | |
| 118: | |
| 119: | |
| 120: | |
| 121: | public function toObject(): object |
| 122: | { |
| 123: | $object = parent::toObject(); |
| 124: | if (!is_null($this->airlineClass)) { |
| 125: | $object->airlineClass = $this->airlineClass; |
| 126: | } |
| 127: | if (!is_null($this->arrivalAirport)) { |
| 128: | $object->arrivalAirport = $this->arrivalAirport; |
| 129: | } |
| 130: | if (!is_null($this->arrivalTime)) { |
| 131: | $object->arrivalTime = $this->arrivalTime; |
| 132: | } |
| 133: | if (!is_null($this->carrierCode)) { |
| 134: | $object->carrierCode = $this->carrierCode; |
| 135: | } |
| 136: | if (!is_null($this->conjunctionTicket)) { |
| 137: | $object->conjunctionTicket = $this->conjunctionTicket; |
| 138: | } |
| 139: | if (!is_null($this->couponNumber)) { |
| 140: | $object->couponNumber = $this->couponNumber; |
| 141: | } |
| 142: | if (!is_null($this->date)) { |
| 143: | $object->date = $this->date; |
| 144: | } |
| 145: | if (!is_null($this->departureTime)) { |
| 146: | $object->departureTime = $this->departureTime; |
| 147: | } |
| 148: | if (!is_null($this->endorsementOrRestriction)) { |
| 149: | $object->endorsementOrRestriction = $this->endorsementOrRestriction; |
| 150: | } |
| 151: | if (!is_null($this->exchangeTicket)) { |
| 152: | $object->exchangeTicket = $this->exchangeTicket; |
| 153: | } |
| 154: | if (!is_null($this->fare)) { |
| 155: | $object->fare = $this->fare; |
| 156: | } |
| 157: | if (!is_null($this->fareBasis)) { |
| 158: | $object->fareBasis = $this->fareBasis; |
| 159: | } |
| 160: | if (!is_null($this->fee)) { |
| 161: | $object->fee = $this->fee; |
| 162: | } |
| 163: | if (!is_null($this->flightNumber)) { |
| 164: | $object->flightNumber = $this->flightNumber; |
| 165: | } |
| 166: | if (!is_null($this->number)) { |
| 167: | $object->number = $this->number; |
| 168: | } |
| 169: | if (!is_null($this->originAirport)) { |
| 170: | $object->originAirport = $this->originAirport; |
| 171: | } |
| 172: | if (!is_null($this->passengerClass)) { |
| 173: | $object->passengerClass = $this->passengerClass; |
| 174: | } |
| 175: | if (!is_null($this->serviceClass)) { |
| 176: | $object->serviceClass = $this->serviceClass; |
| 177: | } |
| 178: | if (!is_null($this->stopoverCode)) { |
| 179: | $object->stopoverCode = $this->stopoverCode; |
| 180: | } |
| 181: | if (!is_null($this->taxes)) { |
| 182: | $object->taxes = $this->taxes; |
| 183: | } |
| 184: | return $object; |
| 185: | } |
| 186: | |
| 187: | |
| 188: | |
| 189: | |
| 190: | |
| 191: | |
| 192: | |
| 193: | public function fromObject(object $object): AirlineFlightLeg |
| 194: | { |
| 195: | parent::fromObject($object); |
| 196: | if (property_exists($object, 'airlineClass')) { |
| 197: | $this->airlineClass = $object->airlineClass; |
| 198: | } |
| 199: | if (property_exists($object, 'arrivalAirport')) { |
| 200: | $this->arrivalAirport = $object->arrivalAirport; |
| 201: | } |
| 202: | if (property_exists($object, 'arrivalTime')) { |
| 203: | $this->arrivalTime = $object->arrivalTime; |
| 204: | } |
| 205: | if (property_exists($object, 'carrierCode')) { |
| 206: | $this->carrierCode = $object->carrierCode; |
| 207: | } |
| 208: | if (property_exists($object, 'conjunctionTicket')) { |
| 209: | $this->conjunctionTicket = $object->conjunctionTicket; |
| 210: | } |
| 211: | if (property_exists($object, 'couponNumber')) { |
| 212: | $this->couponNumber = $object->couponNumber; |
| 213: | } |
| 214: | if (property_exists($object, 'date')) { |
| 215: | $this->date = $object->date; |
| 216: | } |
| 217: | if (property_exists($object, 'departureTime')) { |
| 218: | $this->departureTime = $object->departureTime; |
| 219: | } |
| 220: | if (property_exists($object, 'endorsementOrRestriction')) { |
| 221: | $this->endorsementOrRestriction = $object->endorsementOrRestriction; |
| 222: | } |
| 223: | if (property_exists($object, 'exchangeTicket')) { |
| 224: | $this->exchangeTicket = $object->exchangeTicket; |
| 225: | } |
| 226: | if (property_exists($object, 'fare')) { |
| 227: | $this->fare = $object->fare; |
| 228: | } |
| 229: | if (property_exists($object, 'fareBasis')) { |
| 230: | $this->fareBasis = $object->fareBasis; |
| 231: | } |
| 232: | if (property_exists($object, 'fee')) { |
| 233: | $this->fee = $object->fee; |
| 234: | } |
| 235: | if (property_exists($object, 'flightNumber')) { |
| 236: | $this->flightNumber = $object->flightNumber; |
| 237: | } |
| 238: | if (property_exists($object, 'number')) { |
| 239: | $this->number = $object->number; |
| 240: | } |
| 241: | if (property_exists($object, 'originAirport')) { |
| 242: | $this->originAirport = $object->originAirport; |
| 243: | } |
| 244: | if (property_exists($object, 'passengerClass')) { |
| 245: | $this->passengerClass = $object->passengerClass; |
| 246: | } |
| 247: | if (property_exists($object, 'serviceClass')) { |
| 248: | $this->serviceClass = $object->serviceClass; |
| 249: | } |
| 250: | if (property_exists($object, 'stopoverCode')) { |
| 251: | $this->stopoverCode = $object->stopoverCode; |
| 252: | } |
| 253: | if (property_exists($object, 'taxes')) { |
| 254: | $this->taxes = $object->taxes; |
| 255: | } |
| 256: | return $this; |
| 257: | } |
| 258: | } |
| 259: | |