Close httplib2 connections.
computeFlightEmissions(body=None, x__xgafv=None)
Stateless method to retrieve 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 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 1000 flight legs. If the request has more than 1000 direct flights, if will fail with an INVALID_ARGUMENT error.
computeTypicalFlightEmissions(body=None, x__xgafv=None)
Retrieves typical flight emissions estimates between two airports, also known as a market. If there are no estimates available for a certain market, the response will return the market object with empty emission fields. The request will still be considered successful. Details on how the typical emissions estimates are computed are on [GitHub](https://github.com/google/travel-impact-model/blob/main/projects/typical_flight_emissions.md). The request can contain up to 1000 markets. If the request has more than 1000 markets, it will fail with an INVALID_ARGUMENT error.
close()
Close httplib2 connections.
computeFlightEmissions(body=None, x__xgafv=None)
Stateless method to retrieve 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 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 1000 flight legs. If the request has more than 1000 direct flights, if will fail with an INVALID_ARGUMENT error. Args: body: object, The request body. The object takes the form of: { # Input definition for the ComputeFlightEmissions request. "flights": [ # Required. Direct flights to return emission estimates for. { # All details related to a single request item for a direct flight emission estimates. "departureDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. Date of the flight in the time zone of the origin airport. Must be a date in the present or future. "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "destination": "A String", # Required. IATA airport code for flight destination, e.g. "JFK". "flightNumber": 42, # Required. Flight number, e.g. 324. "operatingCarrierCode": "A String", # Required. IATA carrier code, e.g. "AA". "origin": "A String", # Required. IATA airport code for flight origin, e.g. "LHR". }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # Output definition for the ComputeFlightEmissions response. "flightEmissions": [ # List of flight legs with emission estimates. { # Direct flight with emission estimates. "contrailsImpactBucket": "A String", # Optional. The significance of contrails warming impact compared to the total CO2e emissions impact. "easaLabelMetadata": { # Metadata about the EASA Flight Emissions Label. # Optional. Metadata about the EASA Flight Emissions Label. Only set when the emissions data source is EASA. "labelExpiryDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The date when the label expires. The label can be displayed until the end of this date. "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "labelIssueDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # The date when the label was issued. "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "labelVersion": "A String", # Version of the label. "safDiscountPercentage": 3.14, # Sustainable Aviation Fuel (SAF) emissions discount percentage applied to the label. It is a percentage as a decimal. The values are in the interval [0,1]. For example, 0.0021 means 0.21%. This discount and reduction in emissions are reported by the EASA label but they are not included in the CO2e estimates distributed by this API. }, "emissionsGramsPerPax": { # Grouped emissions per seating class results. # Optional. Per-passenger emission estimate numbers. Will not be present if emissions could not be computed. For the list of reasons why emissions could not be computed, see ComputeFlightEmissions. "business": 42, # Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not. "economy": 42, # Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not. "first": 42, # Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not. "premiumEconomy": 42, # Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not. }, "flight": { # All details related to a single request item for a direct flight emission estimates. # Required. Matches the flight identifiers in the request. Note: all IATA codes are capitalized. "departureDate": { # Represents a whole or partial calendar date, such as a birthday. The time of day and time zone are either specified elsewhere or are insignificant. The date is relative to the Gregorian Calendar. This can represent one of the following: * A full date, with non-zero year, month, and day values. * A month and day, with a zero year (for example, an anniversary). * A year on its own, with a zero month and a zero day. * A year and month, with a zero day (for example, a credit card expiration date). Related types: * google.type.TimeOfDay * google.type.DateTime * google.protobuf.Timestamp # Required. Date of the flight in the time zone of the origin airport. Must be a date in the present or future. "day": 42, # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant. "month": 42, # Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day. "year": 42, # Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year. }, "destination": "A String", # Required. IATA airport code for flight destination, e.g. "JFK". "flightNumber": 42, # Required. Flight number, e.g. 324. "operatingCarrierCode": "A String", # Required. IATA carrier code, e.g. "AA". "origin": "A String", # Required. IATA airport code for flight origin, e.g. "LHR". }, "source": "A String", # Optional. The source of the emissions data. }, ], "modelVersion": { # Travel Impact Model version. For more information about the model versioning see [GitHub](https://github.com/google/travel-impact-model/#versioning). # The model version under which emission estimates for all flights in this response were computed. "dated": "A String", # Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly. "major": 42, # Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect [Google Cloud API guidelines](https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible) "minor": 42, # Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation. "patch": 42, # Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation. }, }
computeTypicalFlightEmissions(body=None, x__xgafv=None)
Retrieves typical flight emissions estimates between two airports, also known as a market. If there are no estimates available for a certain market, the response will return the market object with empty emission fields. The request will still be considered successful. Details on how the typical emissions estimates are computed are on [GitHub](https://github.com/google/travel-impact-model/blob/main/projects/typical_flight_emissions.md). The request can contain up to 1000 markets. If the request has more than 1000 markets, it will fail with an INVALID_ARGUMENT error. Args: body: object, The request body. The object takes the form of: { # A list of pair of airports (markets) to request the typical emissions for. "markets": [ # Required. Request the typical flight emissions estimates for this market pair. A maximum of 1000 markets can be requested. { # A pair of airports. "destination": "A String", # Required. IATA airport code for flight destination, e.g. "JFK". "origin": "A String", # Required. IATA airport code for flight origin, e.g. "LHR". }, ], } x__xgafv: string, V1 error format. Allowed values 1 - v1 error format 2 - v2 error format Returns: An object of the form: { # The response includes the emissions but also the model version. "modelVersion": { # Travel Impact Model version. For more information about the model versioning see [GitHub](https://github.com/google/travel-impact-model/#versioning). # The model version under which typical flight emission estimates for all flights in this response were computed. "dated": "A String", # Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly. "major": 42, # Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect [Google Cloud API guidelines](https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible) "minor": 42, # Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation. "patch": 42, # Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation. }, "typicalFlightEmissions": [ # Market's Typical Flight Emissions requested. { # Typical flight emission estimates for a certain market "emissionsGramsPerPax": { # Grouped emissions per seating class results. # Optional. Typical flight emissions per passenger for requested market. Will not be present if a typical emissions could not be computed. For the list of reasons why typical flight emissions could not be computed, see [GitHub](https://github.com/google/travel-impact-model/blob/main/projects/typical_flight_emissions.md#step-7-validate-dataset). "business": 42, # Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not. "economy": 42, # Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not. "first": 42, # Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not. "premiumEconomy": 42, # Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not. }, "market": { # A pair of airports. # Required. Matches the flight identifiers in the request. Note: all IATA codes are capitalized. "destination": "A String", # Required. IATA airport code for flight destination, e.g. "JFK". "origin": "A String", # Required. IATA airport code for flight origin, e.g. "LHR". }, }, ], }