Skip to content

Commit 5a402cb

Browse files
authored
Merge pull request #241 from amadeus4dev/resources-field-declarations
Updated all resources field declaration
2 parents cfcb31c + 022fe20 commit 5a402cb

30 files changed

+483
-543
lines changed

src/main/java/com/amadeus/resources/Activity.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
*/
1010
@ToString
1111
public class Activity extends Resource {
12-
protected Activity() {}
13-
1412
private @Getter String type;
1513
private @Getter String id;
1614
private @Getter String name;
@@ -23,24 +21,25 @@ protected Activity() {}
2321
private @Getter ElementaryPrice price;
2422
private @Getter String[] pictures;
2523

24+
protected Activity() {}
2625

2726
/**
2827
* An Activity-related object as returned by the Tours and Activities API.
2928
* @see com.amadeus.shopping.Activity#get()
3029
*/
3130
@ToString
3231
public class GeoCode {
33-
protected GeoCode() {}
34-
3532
private @Getter double latitude;
3633
private @Getter double longitude;
34+
35+
protected GeoCode() {}
3736
}
3837

3938
@ToString
4039
public class ElementaryPrice {
41-
protected ElementaryPrice() {}
42-
4340
private @Getter String amount;
4441
private @Getter String currencyCode;
42+
43+
protected ElementaryPrice() {}
4544
}
4645
}

src/main/java/com/amadeus/resources/AirTraffic.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,33 @@
1111
*/
1212
@ToString
1313
public class AirTraffic extends Resource {
14-
protected AirTraffic() {}
15-
1614
private @Getter String type;
1715
private @Getter String subType;
1816
private @Getter String destination;
1917
private @Getter Analytics analytics;
2018

19+
protected AirTraffic() {}
20+
2121
/**
2222
* An AirTraffic-related object as returned by the AirTraffic API.
2323
* @see Traveled#get()
2424
*/
2525
@ToString
2626
public class Analytics {
27-
protected Analytics() {}
28-
2927
private @Getter Flights flights;
3028
private @Getter Travelers travelers;
3129

30+
protected Analytics() {}
31+
3232
/**
3333
* An AirTraffic-related object as returned by the AirTraffic API.
3434
* @see Traveled#get()
3535
*/
3636
@ToString
3737
public class Flights {
38-
protected Flights() {}
39-
4038
private @Getter Double score;
39+
40+
protected Flights() {}
4141
}
4242

4343
/**
@@ -46,9 +46,9 @@ protected Flights() {}
4646
*/
4747
@ToString
4848
public class Travelers {
49-
protected Travelers() {}
50-
5149
private @Getter Double score;
50+
51+
protected Travelers() {}
5252
}
5353
}
5454
}

src/main/java/com/amadeus/resources/Airline.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
*/
1010
@ToString
1111
public class Airline extends Resource {
12-
protected Airline() {}
13-
1412
private @Getter String type;
1513
private @Getter String iataCode;
1614
private @Getter String icaoCode;
1715
private @Getter String businessName;
1816
private @Getter String commonName;
17+
18+
protected Airline() {}
1919
}

src/main/java/com/amadeus/resources/CheckinLink.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
*/
1010
@ToString
1111
public class CheckinLink extends Resource {
12-
protected CheckinLink() {}
13-
1412
private @Getter String type;
1513
private @Getter String id;
1614
private @Getter String href;
1715
private @Getter String channel;
16+
17+
protected CheckinLink() {}
1818
}

src/main/java/com/amadeus/resources/City.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
*/
1010
@ToString
1111
public class City extends Resource {
12-
protected City() {}
13-
1412
private @Getter String type;
1513
private @Getter Relationship[] relationships;
1614
private @Getter String subType;
@@ -19,21 +17,23 @@ protected City() {}
1917
private @Getter Address address;
2018
private @Getter Location.GeoCode geoCode;
2119

20+
protected City() {}
21+
2222
@ToString
2323
public class Relationship {
24-
protected Relationship() {}
25-
2624
private @Getter String id;
2725
private @Getter String type;
2826
private @Getter String href;
27+
28+
protected Relationship() {}
2929
}
3030

3131
@ToString
3232
public class Address {
33-
protected Address() {}
34-
3533
private @Getter String postalCode;
3634
private @Getter String countryCode;
3735
private @Getter String stateCode;
36+
37+
protected Address() {}
3838
}
3939
}

src/main/java/com/amadeus/resources/DatedFlight.java

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -9,126 +9,113 @@
99
*/
1010
@ToString
1111
public class DatedFlight extends Resource {
12-
protected DatedFlight() {}
13-
1412
private @Getter String type;
1513
private @Getter String scheduledDepartureDate;
1614
private @Getter FlightDesignator flightDesignator;
1715
private @Getter FlightPoint[] flightPoints;
1816
private @Getter Segment[] segments;
1917
private @Getter Leg[] legs;
2018

19+
protected DatedFlight() {}
20+
2121
@ToString
2222
public class FlightDesignator {
23-
protected FlightDesignator() {
24-
}
25-
2623
private @Getter String carrierCode;
2724
private @Getter int flightNumber;
2825
private @Getter String operationalSuffix;
2926

27+
protected FlightDesignator() {}
3028
}
3129

3230
@ToString
3331
public class FlightPoint {
34-
protected FlightPoint() {
35-
}
36-
3732
private @Getter String iataCode;
3833
private @Getter Departure departure;
3934
private @Getter Arrival arrival;
35+
36+
protected FlightPoint() {}
4037
}
4138

4239
@ToString
4340
public class Departure {
44-
protected Departure() {
45-
}
46-
4741
private @Getter Timing[] timings;
4842
private @Getter Terminal terminal;
4943
private @Getter Gate gate;
44+
45+
protected Departure() {}
5046
}
5147

5248
@ToString
5349
public class Arrival {
54-
protected Arrival() {
55-
}
56-
5750
private @Getter Timing[] timings;
5851
private @Getter Terminal terminal;
5952
private @Getter Gate gate;
53+
54+
protected Arrival() {}
6055
}
6156

6257
@ToString
6358
public class Timing {
64-
protected Timing() {
65-
}
66-
6759
private @Getter String qualifier;
6860
private @Getter String value;
6961
private @Getter Delay[] delays;
62+
63+
protected Timing() {}
7064
}
7165

7266
@ToString
7367
public class Delay {
74-
protected Delay() {
75-
}
76-
7768
private @Getter String duration;
69+
70+
protected Delay() {}
7871
}
7972

8073
@ToString
8174
public class Gate {
82-
protected Gate() {
83-
}
84-
8575
private @Getter String mainGate;
76+
77+
protected Gate() {}
8678
}
8779

8880
@ToString
8981
public class Terminal {
90-
protected Terminal() {
91-
}
92-
9382
private @Getter String code;
83+
84+
protected Terminal() {}
9485
}
9586

9687
@ToString
9788
public class Segment {
98-
protected Segment() {
99-
}
100-
10189
private @Getter String boardPointIataCode;
10290
private @Getter String offPointIataCode;
10391
private @Getter String scheduledSegmentDuration;
10492
private @Getter Partnership partnership;
93+
94+
protected Segment() {}
10595
}
10696

10797
@ToString
10898
public class Partnership {
109-
protected Partnership() {
110-
}
111-
11299
private @Getter FlightDesignator operatingFlight;
100+
101+
protected Partnership() {}
113102
}
114103

115104
@ToString
116105
public class Leg {
117-
protected Leg() {
118-
}
119-
120106
private @Getter String boardPointIataCode;
121107
private @Getter String offPointIataCode;
122108
private @Getter AircraftEquipment aircraftEquipment;
123109
private @Getter String scheduledLegDuration;
110+
111+
protected Leg() {}
124112
}
125113

126114
@ToString
127115
public class AircraftEquipment {
128-
protected AircraftEquipment() {
129-
}
130-
131116
private @Getter String aircraftType;
117+
118+
protected AircraftEquipment() {}
132119
}
133120

134121
}

src/main/java/com/amadeus/resources/Destination.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111

1212
@ToString
1313
public class Destination extends Resource {
14-
15-
protected Destination() {}
16-
1714
private @Getter String type;
1815
private @Getter String subtype;
1916
private @Getter String name;
2017
private @Getter String iataCode;
18+
19+
protected Destination() {}
2120
}

0 commit comments

Comments
 (0)