Skip to content

Commit c68f7b1

Browse files
1 parent 3600146 commit c68f7b1

File tree

8 files changed

+464
-6
lines changed

8 files changed

+464
-6
lines changed

clients/google-api-services-travelimpactmodel/v1/2.0.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
2222
<dependency>
2323
<groupId>com.google.apis</groupId>
2424
<artifactId>google-api-services-travelimpactmodel</artifactId>
25-
<version>v1-rev20250602-2.0.0</version>
25+
<version>v1-rev20250603-2.0.0</version>
2626
</dependency>
2727
</dependencies>
2828
</project>
@@ -35,7 +35,7 @@ repositories {
3535
mavenCentral()
3636
}
3737
dependencies {
38-
implementation 'com.google.apis:google-api-services-travelimpactmodel:v1-rev20250602-2.0.0'
38+
implementation 'com.google.apis:google-api-services-travelimpactmodel:v1-rev20250603-2.0.0'
3939
}
4040
```
4141

clients/google-api-services-travelimpactmodel/v1/2.0.0/com/google/api/services/travelimpactmodel/v1/TravelImpactModel.java

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,118 @@ public ComputeFlightEmissions set(String parameterName, Object value) {
269269
return (ComputeFlightEmissions) super.set(parameterName, value);
270270
}
271271
}
272+
/**
273+
* Retrieves typical flight emissions estimates between two airports, also known as a market. If
274+
* there are no estimates available for a certain market, the response will return the market object
275+
* with empty emission fields. The request will still be considered successful. Details on how the
276+
* typical emissions estimates are computed are on [GitHub](https://github.com/google/travel-impact-
277+
* model/blob/main/projects/typical_flight_emissions.md). The request can contain up to 1000
278+
* markets. If the request has more than 1000 markets, it will fail with an INVALID_ARGUMENT error.
279+
*
280+
* Create a request for the method "flights.computeTypicalFlightEmissions".
281+
*
282+
* This request holds the parameters needed by the travelimpactmodel server. After setting any
283+
* optional parameters, call the {@link ComputeTypicalFlightEmissions#execute()} method to invoke
284+
* the remote operation.
285+
*
286+
* @param content the {@link com.google.api.services.travelimpactmodel.v1.model.ComputeTypicalFlightEmissionsRequest}
287+
* @return the request
288+
*/
289+
public ComputeTypicalFlightEmissions computeTypicalFlightEmissions(com.google.api.services.travelimpactmodel.v1.model.ComputeTypicalFlightEmissionsRequest content) throws java.io.IOException {
290+
ComputeTypicalFlightEmissions result = new ComputeTypicalFlightEmissions(content);
291+
initialize(result);
292+
return result;
293+
}
294+
295+
public class ComputeTypicalFlightEmissions extends TravelImpactModelRequest<com.google.api.services.travelimpactmodel.v1.model.ComputeTypicalFlightEmissionsResponse> {
296+
297+
private static final String REST_PATH = "v1/flights:computeTypicalFlightEmissions";
298+
299+
/**
300+
* Retrieves typical flight emissions estimates between two airports, also known as a market. If
301+
* there are no estimates available for a certain market, the response will return the market
302+
* object with empty emission fields. The request will still be considered successful. Details on
303+
* how the typical emissions estimates are computed are on
304+
* [GitHub](https://github.com/google/travel-impact-
305+
* model/blob/main/projects/typical_flight_emissions.md). The request can contain up to 1000
306+
* markets. If the request has more than 1000 markets, it will fail with an INVALID_ARGUMENT
307+
* error.
308+
*
309+
* Create a request for the method "flights.computeTypicalFlightEmissions".
310+
*
311+
* This request holds the parameters needed by the the travelimpactmodel server. After setting
312+
* any optional parameters, call the {@link ComputeTypicalFlightEmissions#execute()} method to
313+
* invoke the remote operation. <p> {@link ComputeTypicalFlightEmissions#initialize(com.google.api
314+
* .client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this
315+
* instance immediately after invoking the constructor. </p>
316+
*
317+
* @param content the {@link com.google.api.services.travelimpactmodel.v1.model.ComputeTypicalFlightEmissionsRequest}
318+
* @since 1.13
319+
*/
320+
protected ComputeTypicalFlightEmissions(com.google.api.services.travelimpactmodel.v1.model.ComputeTypicalFlightEmissionsRequest content) {
321+
super(TravelImpactModel.this, "POST", REST_PATH, content, com.google.api.services.travelimpactmodel.v1.model.ComputeTypicalFlightEmissionsResponse.class);
322+
}
323+
324+
@Override
325+
public ComputeTypicalFlightEmissions set$Xgafv(java.lang.String $Xgafv) {
326+
return (ComputeTypicalFlightEmissions) super.set$Xgafv($Xgafv);
327+
}
328+
329+
@Override
330+
public ComputeTypicalFlightEmissions setAccessToken(java.lang.String accessToken) {
331+
return (ComputeTypicalFlightEmissions) super.setAccessToken(accessToken);
332+
}
333+
334+
@Override
335+
public ComputeTypicalFlightEmissions setAlt(java.lang.String alt) {
336+
return (ComputeTypicalFlightEmissions) super.setAlt(alt);
337+
}
338+
339+
@Override
340+
public ComputeTypicalFlightEmissions setCallback(java.lang.String callback) {
341+
return (ComputeTypicalFlightEmissions) super.setCallback(callback);
342+
}
343+
344+
@Override
345+
public ComputeTypicalFlightEmissions setFields(java.lang.String fields) {
346+
return (ComputeTypicalFlightEmissions) super.setFields(fields);
347+
}
348+
349+
@Override
350+
public ComputeTypicalFlightEmissions setKey(java.lang.String key) {
351+
return (ComputeTypicalFlightEmissions) super.setKey(key);
352+
}
353+
354+
@Override
355+
public ComputeTypicalFlightEmissions setOauthToken(java.lang.String oauthToken) {
356+
return (ComputeTypicalFlightEmissions) super.setOauthToken(oauthToken);
357+
}
358+
359+
@Override
360+
public ComputeTypicalFlightEmissions setPrettyPrint(java.lang.Boolean prettyPrint) {
361+
return (ComputeTypicalFlightEmissions) super.setPrettyPrint(prettyPrint);
362+
}
363+
364+
@Override
365+
public ComputeTypicalFlightEmissions setQuotaUser(java.lang.String quotaUser) {
366+
return (ComputeTypicalFlightEmissions) super.setQuotaUser(quotaUser);
367+
}
368+
369+
@Override
370+
public ComputeTypicalFlightEmissions setUploadType(java.lang.String uploadType) {
371+
return (ComputeTypicalFlightEmissions) super.setUploadType(uploadType);
372+
}
373+
374+
@Override
375+
public ComputeTypicalFlightEmissions setUploadProtocol(java.lang.String uploadProtocol) {
376+
return (ComputeTypicalFlightEmissions) super.setUploadProtocol(uploadProtocol);
377+
}
378+
379+
@Override
380+
public ComputeTypicalFlightEmissions set(String parameterName, Object value) {
381+
return (ComputeTypicalFlightEmissions) super.set(parameterName, value);
382+
}
383+
}
272384

273385
}
274386

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.travelimpactmodel.v1.model;
18+
19+
/**
20+
* A list of pair of airports (markets) to request the typical emissions for.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Travel Impact Model API. For a detailed explanation
24+
* see:
25+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
26+
* </p>
27+
*
28+
* @author Google, Inc.
29+
*/
30+
@SuppressWarnings("javadoc")
31+
public final class ComputeTypicalFlightEmissionsRequest extends com.google.api.client.json.GenericJson {
32+
33+
/**
34+
* Required. Request the typical flight emissions estimates for this market pair. A maximum of
35+
* 1000 markets can be requested.
36+
* The value may be {@code null}.
37+
*/
38+
@com.google.api.client.util.Key
39+
private java.util.List<Market> markets;
40+
41+
/**
42+
* Required. Request the typical flight emissions estimates for this market pair. A maximum of
43+
* 1000 markets can be requested.
44+
* @return value or {@code null} for none
45+
*/
46+
public java.util.List<Market> getMarkets() {
47+
return markets;
48+
}
49+
50+
/**
51+
* Required. Request the typical flight emissions estimates for this market pair. A maximum of
52+
* 1000 markets can be requested.
53+
* @param markets markets or {@code null} for none
54+
*/
55+
public ComputeTypicalFlightEmissionsRequest setMarkets(java.util.List<Market> markets) {
56+
this.markets = markets;
57+
return this;
58+
}
59+
60+
@Override
61+
public ComputeTypicalFlightEmissionsRequest set(String fieldName, Object value) {
62+
return (ComputeTypicalFlightEmissionsRequest) super.set(fieldName, value);
63+
}
64+
65+
@Override
66+
public ComputeTypicalFlightEmissionsRequest clone() {
67+
return (ComputeTypicalFlightEmissionsRequest) super.clone();
68+
}
69+
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.travelimpactmodel.v1.model;
18+
19+
/**
20+
* The response includes the emissions but also the model version.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Travel Impact Model API. For a detailed explanation
24+
* see:
25+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
26+
* </p>
27+
*
28+
* @author Google, Inc.
29+
*/
30+
@SuppressWarnings("javadoc")
31+
public final class ComputeTypicalFlightEmissionsResponse extends com.google.api.client.json.GenericJson {
32+
33+
/**
34+
* The model version under which typical flight emission estimates for all flights in this
35+
* response were computed.
36+
* The value may be {@code null}.
37+
*/
38+
@com.google.api.client.util.Key
39+
private ModelVersion modelVersion;
40+
41+
/**
42+
* Market's Typical Flight Emissions requested.
43+
* The value may be {@code null}.
44+
*/
45+
@com.google.api.client.util.Key
46+
private java.util.List<TypicalFlightEmissions> typicalFlightEmissions;
47+
48+
/**
49+
* The model version under which typical flight emission estimates for all flights in this
50+
* response were computed.
51+
* @return value or {@code null} for none
52+
*/
53+
public ModelVersion getModelVersion() {
54+
return modelVersion;
55+
}
56+
57+
/**
58+
* The model version under which typical flight emission estimates for all flights in this
59+
* response were computed.
60+
* @param modelVersion modelVersion or {@code null} for none
61+
*/
62+
public ComputeTypicalFlightEmissionsResponse setModelVersion(ModelVersion modelVersion) {
63+
this.modelVersion = modelVersion;
64+
return this;
65+
}
66+
67+
/**
68+
* Market's Typical Flight Emissions requested.
69+
* @return value or {@code null} for none
70+
*/
71+
public java.util.List<TypicalFlightEmissions> getTypicalFlightEmissions() {
72+
return typicalFlightEmissions;
73+
}
74+
75+
/**
76+
* Market's Typical Flight Emissions requested.
77+
* @param typicalFlightEmissions typicalFlightEmissions or {@code null} for none
78+
*/
79+
public ComputeTypicalFlightEmissionsResponse setTypicalFlightEmissions(java.util.List<TypicalFlightEmissions> typicalFlightEmissions) {
80+
this.typicalFlightEmissions = typicalFlightEmissions;
81+
return this;
82+
}
83+
84+
@Override
85+
public ComputeTypicalFlightEmissionsResponse set(String fieldName, Object value) {
86+
return (ComputeTypicalFlightEmissionsResponse) super.set(fieldName, value);
87+
}
88+
89+
@Override
90+
public ComputeTypicalFlightEmissionsResponse clone() {
91+
return (ComputeTypicalFlightEmissionsResponse) super.clone();
92+
}
93+
94+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
3+
* in compliance with the License. You may obtain a copy of the License at
4+
*
5+
* http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under the License
8+
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9+
* or implied. See the License for the specific language governing permissions and limitations under
10+
* the License.
11+
*/
12+
/*
13+
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
14+
* Modify at your own risk.
15+
*/
16+
17+
package com.google.api.services.travelimpactmodel.v1.model;
18+
19+
/**
20+
* A pair of airports.
21+
*
22+
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
23+
* transmitted over HTTP when working with the Travel Impact Model API. For a detailed explanation
24+
* see:
25+
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
26+
* </p>
27+
*
28+
* @author Google, Inc.
29+
*/
30+
@SuppressWarnings("javadoc")
31+
public final class Market extends com.google.api.client.json.GenericJson {
32+
33+
/**
34+
* Required. IATA airport code for flight destination, e.g. "JFK".
35+
* The value may be {@code null}.
36+
*/
37+
@com.google.api.client.util.Key
38+
private java.lang.String destination;
39+
40+
/**
41+
* Required. IATA airport code for flight origin, e.g. "LHR".
42+
* The value may be {@code null}.
43+
*/
44+
@com.google.api.client.util.Key
45+
private java.lang.String origin;
46+
47+
/**
48+
* Required. IATA airport code for flight destination, e.g. "JFK".
49+
* @return value or {@code null} for none
50+
*/
51+
public java.lang.String getDestination() {
52+
return destination;
53+
}
54+
55+
/**
56+
* Required. IATA airport code for flight destination, e.g. "JFK".
57+
* @param destination destination or {@code null} for none
58+
*/
59+
public Market setDestination(java.lang.String destination) {
60+
this.destination = destination;
61+
return this;
62+
}
63+
64+
/**
65+
* Required. IATA airport code for flight origin, e.g. "LHR".
66+
* @return value or {@code null} for none
67+
*/
68+
public java.lang.String getOrigin() {
69+
return origin;
70+
}
71+
72+
/**
73+
* Required. IATA airport code for flight origin, e.g. "LHR".
74+
* @param origin origin or {@code null} for none
75+
*/
76+
public Market setOrigin(java.lang.String origin) {
77+
this.origin = origin;
78+
return this;
79+
}
80+
81+
@Override
82+
public Market set(String fieldName, Object value) {
83+
return (Market) super.set(fieldName, value);
84+
}
85+
86+
@Override
87+
public Market clone() {
88+
return (Market) super.clone();
89+
}
90+
91+
}

0 commit comments

Comments
 (0)