Skip to content

Commit

Permalink
Merge pull request #241 from amadeus4dev/resources-field-declarations
Browse files Browse the repository at this point in the history
Updated all resources field declaration
  • Loading branch information
tsolakoua authored Jan 18, 2023
2 parents cfcb31c + 022fe20 commit 5a402cb
Show file tree
Hide file tree
Showing 30 changed files with 483 additions and 543 deletions.
11 changes: 5 additions & 6 deletions src/main/java/com/amadeus/resources/Activity.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
@ToString
public class Activity extends Resource {
protected Activity() {}

private @Getter String type;
private @Getter String id;
private @Getter String name;
Expand All @@ -23,24 +21,25 @@ protected Activity() {}
private @Getter ElementaryPrice price;
private @Getter String[] pictures;

protected Activity() {}

/**
* An Activity-related object as returned by the Tours and Activities API.
* @see com.amadeus.shopping.Activity#get()
*/
@ToString
public class GeoCode {
protected GeoCode() {}

private @Getter double latitude;
private @Getter double longitude;

protected GeoCode() {}
}

@ToString
public class ElementaryPrice {
protected ElementaryPrice() {}

private @Getter String amount;
private @Getter String currencyCode;

protected ElementaryPrice() {}
}
}
16 changes: 8 additions & 8 deletions src/main/java/com/amadeus/resources/AirTraffic.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@
*/
@ToString
public class AirTraffic extends Resource {
protected AirTraffic() {}

private @Getter String type;
private @Getter String subType;
private @Getter String destination;
private @Getter Analytics analytics;

protected AirTraffic() {}

/**
* An AirTraffic-related object as returned by the AirTraffic API.
* @see Traveled#get()
*/
@ToString
public class Analytics {
protected Analytics() {}

private @Getter Flights flights;
private @Getter Travelers travelers;

protected Analytics() {}

/**
* An AirTraffic-related object as returned by the AirTraffic API.
* @see Traveled#get()
*/
@ToString
public class Flights {
protected Flights() {}

private @Getter Double score;

protected Flights() {}
}

/**
Expand All @@ -46,9 +46,9 @@ protected Flights() {}
*/
@ToString
public class Travelers {
protected Travelers() {}

private @Getter Double score;

protected Travelers() {}
}
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/amadeus/resources/Airline.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
*/
@ToString
public class Airline extends Resource {
protected Airline() {}

private @Getter String type;
private @Getter String iataCode;
private @Getter String icaoCode;
private @Getter String businessName;
private @Getter String commonName;

protected Airline() {}
}
4 changes: 2 additions & 2 deletions src/main/java/com/amadeus/resources/CheckinLink.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
*/
@ToString
public class CheckinLink extends Resource {
protected CheckinLink() {}

private @Getter String type;
private @Getter String id;
private @Getter String href;
private @Getter String channel;

protected CheckinLink() {}
}
12 changes: 6 additions & 6 deletions src/main/java/com/amadeus/resources/City.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
*/
@ToString
public class City extends Resource {
protected City() {}

private @Getter String type;
private @Getter Relationship[] relationships;
private @Getter String subType;
Expand All @@ -19,21 +17,23 @@ protected City() {}
private @Getter Address address;
private @Getter Location.GeoCode geoCode;

protected City() {}

@ToString
public class Relationship {
protected Relationship() {}

private @Getter String id;
private @Getter String type;
private @Getter String href;

protected Relationship() {}
}

@ToString
public class Address {
protected Address() {}

private @Getter String postalCode;
private @Getter String countryCode;
private @Getter String stateCode;

protected Address() {}
}
}
63 changes: 25 additions & 38 deletions src/main/java/com/amadeus/resources/DatedFlight.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,126 +9,113 @@
*/
@ToString
public class DatedFlight extends Resource {
protected DatedFlight() {}

private @Getter String type;
private @Getter String scheduledDepartureDate;
private @Getter FlightDesignator flightDesignator;
private @Getter FlightPoint[] flightPoints;
private @Getter Segment[] segments;
private @Getter Leg[] legs;

protected DatedFlight() {}

@ToString
public class FlightDesignator {
protected FlightDesignator() {
}

private @Getter String carrierCode;
private @Getter int flightNumber;
private @Getter String operationalSuffix;

protected FlightDesignator() {}
}

@ToString
public class FlightPoint {
protected FlightPoint() {
}

private @Getter String iataCode;
private @Getter Departure departure;
private @Getter Arrival arrival;

protected FlightPoint() {}
}

@ToString
public class Departure {
protected Departure() {
}

private @Getter Timing[] timings;
private @Getter Terminal terminal;
private @Getter Gate gate;

protected Departure() {}
}

@ToString
public class Arrival {
protected Arrival() {
}

private @Getter Timing[] timings;
private @Getter Terminal terminal;
private @Getter Gate gate;

protected Arrival() {}
}

@ToString
public class Timing {
protected Timing() {
}

private @Getter String qualifier;
private @Getter String value;
private @Getter Delay[] delays;

protected Timing() {}
}

@ToString
public class Delay {
protected Delay() {
}

private @Getter String duration;

protected Delay() {}
}

@ToString
public class Gate {
protected Gate() {
}

private @Getter String mainGate;

protected Gate() {}
}

@ToString
public class Terminal {
protected Terminal() {
}

private @Getter String code;

protected Terminal() {}
}

@ToString
public class Segment {
protected Segment() {
}

private @Getter String boardPointIataCode;
private @Getter String offPointIataCode;
private @Getter String scheduledSegmentDuration;
private @Getter Partnership partnership;

protected Segment() {}
}

@ToString
public class Partnership {
protected Partnership() {
}

private @Getter FlightDesignator operatingFlight;

protected Partnership() {}
}

@ToString
public class Leg {
protected Leg() {
}

private @Getter String boardPointIataCode;
private @Getter String offPointIataCode;
private @Getter AircraftEquipment aircraftEquipment;
private @Getter String scheduledLegDuration;

protected Leg() {}
}

@ToString
public class AircraftEquipment {
protected AircraftEquipment() {
}

private @Getter String aircraftType;

protected AircraftEquipment() {}
}

}
5 changes: 2 additions & 3 deletions src/main/java/com/amadeus/resources/Destination.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@

@ToString
public class Destination extends Resource {

protected Destination() {}

private @Getter String type;
private @Getter String subtype;
private @Getter String name;
private @Getter String iataCode;

protected Destination() {}
}
Loading

0 comments on commit 5a402cb

Please sign in to comment.