@@ -17,6 +17,16 @@ module Patch
1717 class CreateFlightEstimateRequest
1818 attr_accessor :distance_m
1919
20+ attr_accessor :origin_airport
21+
22+ attr_accessor :destination_airport
23+
24+ attr_accessor :aircraft_code
25+
26+ attr_accessor :cabin_class
27+
28+ attr_accessor :passenger_count
29+
2030 attr_accessor :project_id
2131
2232 attr_accessor :create_order
@@ -25,6 +35,11 @@ class CreateFlightEstimateRequest
2535 def self . attribute_map
2636 {
2737 :'distance_m' => :'distance_m' ,
38+ :'origin_airport' => :'origin_airport' ,
39+ :'destination_airport' => :'destination_airport' ,
40+ :'aircraft_code' => :'aircraft_code' ,
41+ :'cabin_class' => :'cabin_class' ,
42+ :'passenger_count' => :'passenger_count' ,
2843 :'project_id' => :'project_id' ,
2944 :'create_order' => :'create_order'
3045 }
@@ -39,6 +54,11 @@ def self.acceptable_attributes
3954 def self . openapi_types
4055 {
4156 :'distance_m' => :'Integer' ,
57+ :'origin_airport' => :'String' ,
58+ :'destination_airport' => :'String' ,
59+ :'aircraft_code' => :'String' ,
60+ :'cabin_class' => :'String' ,
61+ :'passenger_count' => :'Integer' ,
4262 :'project_id' => :'String' ,
4363 :'create_order' => :'Boolean'
4464 }
@@ -47,6 +67,12 @@ def self.openapi_types
4767 # List of attributes with nullable: true
4868 def self . openapi_nullable
4969 Set . new ( [
70+ :'distance_m' ,
71+ :'origin_airport' ,
72+ :'destination_airport' ,
73+ :'aircraft_code' ,
74+ :'cabin_class' ,
75+ :'passenger_count' ,
5076 :'project_id' ,
5177 :'create_order'
5278 ] )
@@ -83,6 +109,26 @@ def initialize(attributes = {})
83109 self . distance_m = attributes [ :'distance_m' ]
84110 end
85111
112+ if attributes . key? ( :'origin_airport' )
113+ self . origin_airport = attributes [ :'origin_airport' ]
114+ end
115+
116+ if attributes . key? ( :'destination_airport' )
117+ self . destination_airport = attributes [ :'destination_airport' ]
118+ end
119+
120+ if attributes . key? ( :'aircraft_code' )
121+ self . aircraft_code = attributes [ :'aircraft_code' ]
122+ end
123+
124+ if attributes . key? ( :'cabin_class' )
125+ self . cabin_class = attributes [ :'cabin_class' ]
126+ end
127+
128+ if attributes . key? ( :'passenger_count' )
129+ self . passenger_count = attributes [ :'passenger_count' ]
130+ end
131+
86132 if attributes . key? ( :'project_id' )
87133 self . project_id = attributes [ :'project_id' ]
88134 end
@@ -96,15 +142,11 @@ def initialize(attributes = {})
96142 # @return Array for valid properties with the reasons
97143 def list_invalid_properties
98144 invalid_properties = Array . new
99- if @distance_m . nil?
100- invalid_properties . push ( 'invalid value for "distance_m", distance_m cannot be nil.' )
101- end
102-
103- if @distance_m > 400000000
145+ if !@distance_m . nil? && @distance_m > 400000000
104146 invalid_properties . push ( 'invalid value for "distance_m", must be smaller than or equal to 400000000.' )
105147 end
106148
107- if @distance_m < 0
149+ if ! @distance_m . nil? && @distance_m < 0
108150 invalid_properties . push ( 'invalid value for "distance_m", must be greater than or equal to 0.' )
109151 end
110152
@@ -114,24 +156,19 @@ def list_invalid_properties
114156 # Check to see if the all the properties in the model are valid
115157 # @return true if the model is valid
116158 def valid?
117- return false if @distance_m . nil?
118- return false if @distance_m > 400000000
119- return false if @distance_m < 0
159+ return false if !@distance_m . nil? && @distance_m > 400000000
160+ return false if !@distance_m . nil? && @distance_m < 0
120161 true
121162 end
122163
123164 # Custom attribute writer method with validation
124165 # @param [Object] distance_m Value to be assigned
125166 def distance_m = ( distance_m )
126- if distance_m . nil?
127- fail ArgumentError , 'distance_m cannot be nil'
128- end
129-
130- if distance_m > 400000000
167+ if !distance_m . nil? && distance_m > 400000000
131168 fail ArgumentError , 'invalid value for "distance_m", must be smaller than or equal to 400000000.'
132169 end
133170
134- if distance_m < 0
171+ if ! distance_m . nil? && distance_m < 0
135172 fail ArgumentError , 'invalid value for "distance_m", must be greater than or equal to 0.'
136173 end
137174
@@ -144,6 +181,11 @@ def ==(o)
144181 return true if self . equal? ( o )
145182 self . class == o . class &&
146183 distance_m == o . distance_m &&
184+ origin_airport == o . origin_airport &&
185+ destination_airport == o . destination_airport &&
186+ aircraft_code == o . aircraft_code &&
187+ cabin_class == o . cabin_class &&
188+ passenger_count == o . passenger_count &&
147189 project_id == o . project_id &&
148190 create_order == o . create_order
149191 end
@@ -157,7 +199,7 @@ def eql?(o)
157199 # Calculates hash code according to all attributes.
158200 # @return [Integer] Hash code
159201 def hash
160- [ distance_m , project_id , create_order ] . hash
202+ [ distance_m , origin_airport , destination_airport , aircraft_code , cabin_class , passenger_count , project_id , create_order ] . hash
161203 end
162204
163205 # Builds the object from hash
0 commit comments