Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Add the following lines to your `pom.xml` file:
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-travelimpactmodel</artifactId>
<version>v1-rev20260602-2.0.0</version>
<version>v1-rev20260615-2.0.0</version>
</dependency>
</dependencies>
</project>
Expand All @@ -35,7 +35,7 @@ repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.apis:google-api-services-travelimpactmodel:v1-rev20260602-2.0.0'
implementation 'com.google.apis:google-api-services-travelimpactmodel:v1-rev20260615-2.0.0'
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,128 @@ public Flights flights() {
*/
public class Flights {

/**
* Retrieves detailed emission estimates. Detailed Flight Emissions are transparent per-passenger
* greenhouse gas emission estimates supplemented by comprehensive metadata detailing the
* calculation methodology, emissions breakdown, contrail impact, and data provenance. Details on
* how emission estimates are computed are in [GitHub](https://github.com/google/travel-impact-
* model). The response will contain all entries that match the input flight legs, in the same
* order. If there are no estimates available for a certain flight leg, the response will return the
* flight leg object with empty emission fields. The request will still be considered successful.
* Reasons for missing emission estimates include: * The flight is unknown to the server. * The
* input flight leg is missing one or more identifiers. * The flight date is in the past. * The
* aircraft type is not supported by the model. * Missing seat configuration. The request can
* contain up to 100 flight legs. If the request has more than 100 flight legs, it will fail with an
* INVALID_ARGUMENT error.
*
* Create a request for the method "flights.computeDetailedFlightEmissions".
*
* This request holds the parameters needed by the travelimpactmodel server. After setting any
* optional parameters, call the {@link ComputeDetailedFlightEmissions#execute()} method to invoke
* the remote operation.
*
* @param content the {@link com.google.api.services.travelimpactmodel.v1.model.ComputeDetailedFlightEmissionsRequest}
* @return the request
*/
public ComputeDetailedFlightEmissions computeDetailedFlightEmissions(com.google.api.services.travelimpactmodel.v1.model.ComputeDetailedFlightEmissionsRequest content) throws java.io.IOException {
ComputeDetailedFlightEmissions result = new ComputeDetailedFlightEmissions(content);
initialize(result);
return result;
}

public class ComputeDetailedFlightEmissions extends TravelImpactModelRequest<com.google.api.services.travelimpactmodel.v1.model.ComputeDetailedFlightEmissionsResponse> {

private static final String REST_PATH = "v1/flights:computeDetailedFlightEmissions";

/**
* Retrieves detailed emission estimates. Detailed Flight Emissions are transparent per-passenger
* greenhouse gas emission estimates supplemented by comprehensive metadata detailing the
* calculation methodology, emissions breakdown, contrail impact, and data provenance. Details on
* how emission estimates are computed are in [GitHub](https://github.com/google/travel-impact-
* model). The response will contain all entries that match the input flight legs, in the same
* order. If there are no estimates available for a certain flight leg, the response will return
* the flight leg object with empty emission fields. The request will still be considered
* successful. Reasons for missing emission estimates include: * The flight is unknown to the
* server. * The input flight leg is missing one or more identifiers. * The flight date is in the
* past. * The aircraft type is not supported by the model. * Missing seat configuration. The
* request can contain up to 100 flight legs. If the request has more than 100 flight legs, it
* will fail with an INVALID_ARGUMENT error.
*
* Create a request for the method "flights.computeDetailedFlightEmissions".
*
* This request holds the parameters needed by the the travelimpactmodel server. After setting
* any optional parameters, call the {@link ComputeDetailedFlightEmissions#execute()} method to
* invoke the remote operation. <p> {@link ComputeDetailedFlightEmissions#initialize(com.google.ap
* i.client.googleapis.services.AbstractGoogleClientRequest)} must be called to initialize this
* instance immediately after invoking the constructor. </p>
*
* @param content the {@link com.google.api.services.travelimpactmodel.v1.model.ComputeDetailedFlightEmissionsRequest}
* @since 1.13
*/
protected ComputeDetailedFlightEmissions(com.google.api.services.travelimpactmodel.v1.model.ComputeDetailedFlightEmissionsRequest content) {
super(TravelImpactModel.this, "POST", REST_PATH, content, com.google.api.services.travelimpactmodel.v1.model.ComputeDetailedFlightEmissionsResponse.class);
}

@Override
public ComputeDetailedFlightEmissions set$Xgafv(java.lang.String $Xgafv) {
return (ComputeDetailedFlightEmissions) super.set$Xgafv($Xgafv);
}

@Override
public ComputeDetailedFlightEmissions setAccessToken(java.lang.String accessToken) {
return (ComputeDetailedFlightEmissions) super.setAccessToken(accessToken);
}

@Override
public ComputeDetailedFlightEmissions setAlt(java.lang.String alt) {
return (ComputeDetailedFlightEmissions) super.setAlt(alt);
}

@Override
public ComputeDetailedFlightEmissions setCallback(java.lang.String callback) {
return (ComputeDetailedFlightEmissions) super.setCallback(callback);
}

@Override
public ComputeDetailedFlightEmissions setFields(java.lang.String fields) {
return (ComputeDetailedFlightEmissions) super.setFields(fields);
}

@Override
public ComputeDetailedFlightEmissions setKey(java.lang.String key) {
return (ComputeDetailedFlightEmissions) super.setKey(key);
}

@Override
public ComputeDetailedFlightEmissions setOauthToken(java.lang.String oauthToken) {
return (ComputeDetailedFlightEmissions) super.setOauthToken(oauthToken);
}

@Override
public ComputeDetailedFlightEmissions setPrettyPrint(java.lang.Boolean prettyPrint) {
return (ComputeDetailedFlightEmissions) super.setPrettyPrint(prettyPrint);
}

@Override
public ComputeDetailedFlightEmissions setQuotaUser(java.lang.String quotaUser) {
return (ComputeDetailedFlightEmissions) super.setQuotaUser(quotaUser);
}

@Override
public ComputeDetailedFlightEmissions setUploadType(java.lang.String uploadType) {
return (ComputeDetailedFlightEmissions) super.setUploadType(uploadType);
}

@Override
public ComputeDetailedFlightEmissions setUploadProtocol(java.lang.String uploadProtocol) {
return (ComputeDetailedFlightEmissions) super.setUploadProtocol(uploadProtocol);
}

@Override
public ComputeDetailedFlightEmissions set(String parameterName, Object value) {
return (ComputeDetailedFlightEmissions) super.set(parameterName, value);
}
}
/**
* Retrieves emission estimates. Details on how emission estimates are computed are in
* [GitHub](https://github.com/google/travel-impact-model). The response will contain all entries
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.travelimpactmodel.v1.model;

/**
* Input definition for the ComputeDetailedFlightEmissions request.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Travel Impact Model API. For a detailed explanation
* see:
* <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>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class ComputeDetailedFlightEmissionsRequest extends com.google.api.client.json.GenericJson {

/**
* Required. Direct flights to return emission estimates for.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<Flight> flights;

/**
* Required. Direct flights to return emission estimates for.
* @return value or {@code null} for none
*/
public java.util.List<Flight> getFlights() {
return flights;
}

/**
* Required. Direct flights to return emission estimates for.
* @param flights flights or {@code null} for none
*/
public ComputeDetailedFlightEmissionsRequest setFlights(java.util.List<Flight> flights) {
this.flights = flights;
return this;
}

@Override
public ComputeDetailedFlightEmissionsRequest set(String fieldName, Object value) {
return (ComputeDetailedFlightEmissionsRequest) super.set(fieldName, value);
}

@Override
public ComputeDetailedFlightEmissionsRequest clone() {
return (ComputeDetailedFlightEmissionsRequest) super.clone();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/

package com.google.api.services.travelimpactmodel.v1.model;

/**
* Output definition for the ComputeDetailedFlightEmissions response.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Travel Impact Model API. For a detailed explanation
* see:
* <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>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class ComputeDetailedFlightEmissionsResponse extends com.google.api.client.json.GenericJson {

/**
* List of flight legs with emission estimates.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List<FlightWithDetailedEmissions> flightsWithDetailedEmissions;

/**
* The model version under which emission estimates for all flights in this response were
* computed.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ModelVersion modelVersion;

/**
* List of flight legs with emission estimates.
* @return value or {@code null} for none
*/
public java.util.List<FlightWithDetailedEmissions> getFlightsWithDetailedEmissions() {
return flightsWithDetailedEmissions;
}

/**
* List of flight legs with emission estimates.
* @param flightsWithDetailedEmissions flightsWithDetailedEmissions or {@code null} for none
*/
public ComputeDetailedFlightEmissionsResponse setFlightsWithDetailedEmissions(java.util.List<FlightWithDetailedEmissions> flightsWithDetailedEmissions) {
this.flightsWithDetailedEmissions = flightsWithDetailedEmissions;
return this;
}

/**
* The model version under which emission estimates for all flights in this response were
* computed.
* @return value or {@code null} for none
*/
public ModelVersion getModelVersion() {
return modelVersion;
}

/**
* The model version under which emission estimates for all flights in this response were
* computed.
* @param modelVersion modelVersion or {@code null} for none
*/
public ComputeDetailedFlightEmissionsResponse setModelVersion(ModelVersion modelVersion) {
this.modelVersion = modelVersion;
return this;
}

@Override
public ComputeDetailedFlightEmissionsResponse set(String fieldName, Object value) {
return (ComputeDetailedFlightEmissionsResponse) super.set(fieldName, value);
}

@Override
public ComputeDetailedFlightEmissionsResponse clone() {
return (ComputeDetailedFlightEmissionsResponse) super.clone();
}

}
Loading
Loading