<?php
namespace App\Amadeus\FileParser;

class Line_RSE extends \App\Amadeus\FileParser\LineAbstract
{
	/**
	 * 4.72. RSE Train segment data from Rail Server
	 * see page 224(266)
	 *
	 * This line is used to transmit Train Segment information as taken from the RAM TACTCQ message.
	 */
	protected $structure = [
		['name'=> 'MSGTAG',  'val' => 'RSE',   'type' => 'AN',   'req' => 'M',  'len' => 3,],                          // 1 : Message Tag (RSE)
		['name'=> 'TTONBR',                    'type' => 'N',    'req' => 'M',  'len' => 3,],                          // 2 : 1A PNR tattoo number
		['name'=> 'DELIM',                     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 3 : Delimiter (Constant val ue of ";")
		['name'=> 'SEGNBR',                    'type' => 'N',    'req' => 'M',  'len' => 3,],                          // 4 : 1A PNR Segment number
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 5 : Delimiter (Constant value of ";")
		['name'=> 'RSEGNBR',                   'type' => 'N',    'req' => 'M',  'len' => 3,],                          // 6 : Rail Segment number (link with RTK line)
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 7 : Delimiter (Constant value of ";")
		['name'=> 'CARRUIC',                   'type' => 'N',                   'len' => 4,],                          // 8 : Carrier UIC Code
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 9 : Delimiter (Constant value of ";")
		['name'=> 'DEPCNTY',                   'type' => 'AN',                  'len' => 2,],                          // 10 : Departure Country Code
		['name'=> 'DEPCITC',                   'type' => 'AN',                  'len_min' => 3,   'len_max' => 5,],    // 11 : Departure City Code (may not be IATA) only if DEPCNTY present
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 12 : Delimiter (Constant value of ';')
		['name'=> 'DEPCITN',                   'type' => 'AN',],                                                       // 13 : Departure City Name
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 14 : Delimiter (Constant value of ';')
		['name'=> 'ARRCNTY',                   'type' => 'AN',                  'len' => 2,],                          // 15 : Arrival Country Code
		['name'=> 'ARRCITC',                   'type' => 'AN',                  'len_min' => 3,   'len_max' => 5,],    // 16 : Arrival City Code (may not be IATA) only if ARRCNTY present
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 17 : Delimiter (Constant value of ';')
		['name'=> 'ARRCITN',                   'type' => 'AN',],                                                       // 18 : Arrival City Name
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 19 : Delimiter (Constant value of ";" )
		['name'=> 'EQUIPCODE',                 'type' => 'AN',                  'len' => 3,],                          // 20 : Equipment code
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 21 : Delimiter (Constant value of ';')
		['name'=> 'TRNNBR',                    'type' => 'N',                   'len' => 10,],                         // 22 : Train number or blanks
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 23 : Delimiter (Constant value of ';')
		['name'=> 'PHYSCLASS',                 'type' => 'AN',                  'len' => 1,],                          // 24 : Physical/Reservation Class A first class, SeatB second class, Seat C firth class, BerthD second class, BerthV first class, Sleeping-carW second class, Sleeping-car
		['name'=> 'DELIM',   'val' => '-',     'type' => 'AN',                  'len' => 1,],                          // 25 : Delimiter( Constant value of '-')
		['name'=> 'TARCLASS',                  'type' => 'AN',                  'len' => 2,],                          // 26 : Tariff Class
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 27 : Delimiter (Constant value of ";" )
		['name'=> 'DEPDATE',                   'type' => 'D:DDMMMYYYY',         'len' => 9,],                          // 28 : Departure date (DDMMMYYYY)
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 29 : Delimiter (Constant value of ';')
		['name'=> 'DEPTIME',                   'type' => 'HR',                  'len_min' => 3,   'len_max' => 5,],    // 30 : Departure time (HHMM)
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 31 : Constant value of ";"
		['name'=> 'ARRDATE',                   'type' => 'D:DDMMMYYYY',         'len' => 9,],                          // 32 : Arrival date (DDMMMYYYY)
		['name'=> 'DELIM',   'val' => ';',     'type' => 'AN',   'req' => 'M',  'len' => 1,],                          // 33 : Delimiter (Constant value of ';')
		['name'=> 'ARRTIME',                   'type' => 'HR',                  'len_min' => 3,   'len_max' => 5,],    // 34 : Arrival time ( HHMM)Ref.No NAME RequirementDesignator TypeLengthIteration Description
	];
}
