@@ -269,6 +269,156 @@ public ComputeFlightEmissions set(String parameterName, Object value) {
269269 return (ComputeFlightEmissions ) super .set (parameterName , value );
270270 }
271271 }
272+ /**
273+ * Stateless method to retrieve GHG emissions estimates for a set of flight segments for Scope 3
274+ * reporting. The response will contain all entries that match the input Scope3FlightSegment flight
275+ * segments, in the same order provided. The estimates will be computed using the following
276+ * cascading logic (using the first one that is available): 1. TIM-based emissions given origin,
277+ * destination, carrier, flightNumber, departureDate, and cabinClass. 2. Typical flight emissions
278+ * given origin, destination, year in departureDate, and cabinClass. 3. Distance-based emissions
279+ * calculated using distanceKm, year in departureDate, and cabinClass. If there are no estimates
280+ * available for a certain flight with any of the three methods, the response will return a
281+ * Scope3FlightEmissions object with empty emission fields. The request will still be considered
282+ * successful. Generally, missing emissions estimates occur when the flight is unknown to the server
283+ * (e.g. no specific flight exists, or typical flight emissions are not available for the requested
284+ * pair). The request will fail with an `INVALID_ARGUMENT` error if: * The request contains more
285+ * than 1,000 flight legs. * The input flight leg is missing one or more identifiers. For example,
286+ * missing origin/destination without a valid distance for TIM_EMISSIONS or TYPICAL_FLIGHT_EMISSIONS
287+ * type matching, or missing distance for a DISTANCE_BASED_EMISSIONS type matching (if you want to
288+ * fallback to distance-based emissions or want a distance-based emissions estimate, you need to
289+ * specify a distance). * The flight date is before 2019 (Scope 3 data is only available for 2019
290+ * and after). * The flight distance is not between 0 and 25,000,000,000,000,000 km. * Missing cabin
291+ * class. Because the request is processed with fallback logic, it is possible that misconfigured
292+ * requests return valid emissions estimates using fallback methods. For example, if a request has
293+ * the wrong flight number but specifies the origin and destination, the request will still succeed,
294+ * but the returned emissions will be based solely on the typical flight emissions. Similarly, if a
295+ * request is missing the origin for a typical flight emissions request, but specifies a valid
296+ * distance, the request could succeed based solely on the distance-based emissions. Consequently,
297+ * one should check the source of the returned emissions (source) to confirm the results are as
298+ * expected.
299+ *
300+ * Create a request for the method "flights.computeScope3FlightEmissions".
301+ *
302+ * This request holds the parameters needed by the travelimpactmodel server. After setting any
303+ * optional parameters, call the {@link ComputeScope3FlightEmissions#execute()} method to invoke the
304+ * remote operation.
305+ *
306+ * @param content the {@link com.google.api.services.travelimpactmodel.v1.model.ComputeScope3FlightEmissionsRequest}
307+ * @return the request
308+ */
309+ public ComputeScope3FlightEmissions computeScope3FlightEmissions (com .google .api .services .travelimpactmodel .v1 .model .ComputeScope3FlightEmissionsRequest content ) throws java .io .IOException {
310+ ComputeScope3FlightEmissions result = new ComputeScope3FlightEmissions (content );
311+ initialize (result );
312+ return result ;
313+ }
314+
315+ public class ComputeScope3FlightEmissions extends TravelImpactModelRequest <com .google .api .services .travelimpactmodel .v1 .model .ComputeScope3FlightEmissionsResponse > {
316+
317+ private static final String REST_PATH = "v1/flights:computeScope3FlightEmissions" ;
318+
319+ /**
320+ * Stateless method to retrieve GHG emissions estimates for a set of flight segments for Scope 3
321+ * reporting. The response will contain all entries that match the input Scope3FlightSegment
322+ * flight segments, in the same order provided. The estimates will be computed using the following
323+ * cascading logic (using the first one that is available): 1. TIM-based emissions given origin,
324+ * destination, carrier, flightNumber, departureDate, and cabinClass. 2. Typical flight emissions
325+ * given origin, destination, year in departureDate, and cabinClass. 3. Distance-based emissions
326+ * calculated using distanceKm, year in departureDate, and cabinClass. If there are no estimates
327+ * available for a certain flight with any of the three methods, the response will return a
328+ * Scope3FlightEmissions object with empty emission fields. The request will still be considered
329+ * successful. Generally, missing emissions estimates occur when the flight is unknown to the
330+ * server (e.g. no specific flight exists, or typical flight emissions are not available for the
331+ * requested pair). The request will fail with an `INVALID_ARGUMENT` error if: * The request
332+ * contains more than 1,000 flight legs. * The input flight leg is missing one or more
333+ * identifiers. For example, missing origin/destination without a valid distance for TIM_EMISSIONS
334+ * or TYPICAL_FLIGHT_EMISSIONS type matching, or missing distance for a DISTANCE_BASED_EMISSIONS
335+ * type matching (if you want to fallback to distance-based emissions or want a distance-based
336+ * emissions estimate, you need to specify a distance). * The flight date is before 2019 (Scope 3
337+ * data is only available for 2019 and after). * The flight distance is not between 0 and
338+ * 25,000,000,000,000,000 km. * Missing cabin class. Because the request is processed with
339+ * fallback logic, it is possible that misconfigured requests return valid emissions estimates
340+ * using fallback methods. For example, if a request has the wrong flight number but specifies the
341+ * origin and destination, the request will still succeed, but the returned emissions will be
342+ * based solely on the typical flight emissions. Similarly, if a request is missing the origin for
343+ * a typical flight emissions request, but specifies a valid distance, the request could succeed
344+ * based solely on the distance-based emissions. Consequently, one should check the source of the
345+ * returned emissions (source) to confirm the results are as expected.
346+ *
347+ * Create a request for the method "flights.computeScope3FlightEmissions".
348+ *
349+ * This request holds the parameters needed by the the travelimpactmodel server. After setting
350+ * any optional parameters, call the {@link ComputeScope3FlightEmissions#execute()} method to
351+ * invoke the remote operation. <p> {@link ComputeScope3FlightEmissions#initialize(com.google.api.
352+ * client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this
353+ * instance immediately after invoking the constructor. </p>
354+ *
355+ * @param content the {@link com.google.api.services.travelimpactmodel.v1.model.ComputeScope3FlightEmissionsRequest}
356+ * @since 1.13
357+ */
358+ protected ComputeScope3FlightEmissions (com .google .api .services .travelimpactmodel .v1 .model .ComputeScope3FlightEmissionsRequest content ) {
359+ super (TravelImpactModel .this , "POST" , REST_PATH , content , com .google .api .services .travelimpactmodel .v1 .model .ComputeScope3FlightEmissionsResponse .class );
360+ }
361+
362+ @ Override
363+ public ComputeScope3FlightEmissions set$Xgafv (java .lang .String $Xgafv ) {
364+ return (ComputeScope3FlightEmissions ) super .set$Xgafv ($Xgafv );
365+ }
366+
367+ @ Override
368+ public ComputeScope3FlightEmissions setAccessToken (java .lang .String accessToken ) {
369+ return (ComputeScope3FlightEmissions ) super .setAccessToken (accessToken );
370+ }
371+
372+ @ Override
373+ public ComputeScope3FlightEmissions setAlt (java .lang .String alt ) {
374+ return (ComputeScope3FlightEmissions ) super .setAlt (alt );
375+ }
376+
377+ @ Override
378+ public ComputeScope3FlightEmissions setCallback (java .lang .String callback ) {
379+ return (ComputeScope3FlightEmissions ) super .setCallback (callback );
380+ }
381+
382+ @ Override
383+ public ComputeScope3FlightEmissions setFields (java .lang .String fields ) {
384+ return (ComputeScope3FlightEmissions ) super .setFields (fields );
385+ }
386+
387+ @ Override
388+ public ComputeScope3FlightEmissions setKey (java .lang .String key ) {
389+ return (ComputeScope3FlightEmissions ) super .setKey (key );
390+ }
391+
392+ @ Override
393+ public ComputeScope3FlightEmissions setOauthToken (java .lang .String oauthToken ) {
394+ return (ComputeScope3FlightEmissions ) super .setOauthToken (oauthToken );
395+ }
396+
397+ @ Override
398+ public ComputeScope3FlightEmissions setPrettyPrint (java .lang .Boolean prettyPrint ) {
399+ return (ComputeScope3FlightEmissions ) super .setPrettyPrint (prettyPrint );
400+ }
401+
402+ @ Override
403+ public ComputeScope3FlightEmissions setQuotaUser (java .lang .String quotaUser ) {
404+ return (ComputeScope3FlightEmissions ) super .setQuotaUser (quotaUser );
405+ }
406+
407+ @ Override
408+ public ComputeScope3FlightEmissions setUploadType (java .lang .String uploadType ) {
409+ return (ComputeScope3FlightEmissions ) super .setUploadType (uploadType );
410+ }
411+
412+ @ Override
413+ public ComputeScope3FlightEmissions setUploadProtocol (java .lang .String uploadProtocol ) {
414+ return (ComputeScope3FlightEmissions ) super .setUploadProtocol (uploadProtocol );
415+ }
416+
417+ @ Override
418+ public ComputeScope3FlightEmissions set (String parameterName , Object value ) {
419+ return (ComputeScope3FlightEmissions ) super .set (parameterName , value );
420+ }
421+ }
272422 /**
273423 * Retrieves typical flight emissions estimates between two airports, also known as a market. If
274424 * there are no estimates available for a certain market, the response will return the market object
0 commit comments