...

Text file src/google.golang.org/api/travelimpactmodel/v1/travelimpactmodel-api.json

Documentation: google.golang.org/api/travelimpactmodel/v1

     1{
     2  "basePath": "",
     3  "baseUrl": "https://travelimpactmodel.googleapis.com/",
     4  "batchPath": "batch",
     5  "canonicalName": "Travel Impact Model",
     6  "description": "Travel Impact Model API lets you query travel carbon emission estimates.",
     7  "discoveryVersion": "v1",
     8  "documentationLink": "https://developers.google.com/travel/impact-model",
     9  "fullyEncodeReservedExpansion": true,
    10  "icons": {
    11    "x16": "http://www.google.com/images/icons/product/search-16.gif",
    12    "x32": "http://www.google.com/images/icons/product/search-32.gif"
    13  },
    14  "id": "travelimpactmodel:v1",
    15  "kind": "discovery#restDescription",
    16  "mtlsRootUrl": "https://travelimpactmodel.mtls.googleapis.com/",
    17  "name": "travelimpactmodel",
    18  "ownerDomain": "google.com",
    19  "ownerName": "Google",
    20  "parameters": {
    21    "$.xgafv": {
    22      "description": "V1 error format.",
    23      "enum": [
    24        "1",
    25        "2"
    26      ],
    27      "enumDescriptions": [
    28        "v1 error format",
    29        "v2 error format"
    30      ],
    31      "location": "query",
    32      "type": "string"
    33    },
    34    "access_token": {
    35      "description": "OAuth access token.",
    36      "location": "query",
    37      "type": "string"
    38    },
    39    "alt": {
    40      "default": "json",
    41      "description": "Data format for response.",
    42      "enum": [
    43        "json",
    44        "media",
    45        "proto"
    46      ],
    47      "enumDescriptions": [
    48        "Responses with Content-Type of application/json",
    49        "Media download with context-dependent Content-Type",
    50        "Responses with Content-Type of application/x-protobuf"
    51      ],
    52      "location": "query",
    53      "type": "string"
    54    },
    55    "callback": {
    56      "description": "JSONP",
    57      "location": "query",
    58      "type": "string"
    59    },
    60    "fields": {
    61      "description": "Selector specifying which fields to include in a partial response.",
    62      "location": "query",
    63      "type": "string"
    64    },
    65    "key": {
    66      "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
    67      "location": "query",
    68      "type": "string"
    69    },
    70    "oauth_token": {
    71      "description": "OAuth 2.0 token for the current user.",
    72      "location": "query",
    73      "type": "string"
    74    },
    75    "prettyPrint": {
    76      "default": "true",
    77      "description": "Returns response with indentations and line breaks.",
    78      "location": "query",
    79      "type": "boolean"
    80    },
    81    "quotaUser": {
    82      "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
    83      "location": "query",
    84      "type": "string"
    85    },
    86    "uploadType": {
    87      "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").",
    88      "location": "query",
    89      "type": "string"
    90    },
    91    "upload_protocol": {
    92      "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").",
    93      "location": "query",
    94      "type": "string"
    95    }
    96  },
    97  "protocol": "rest",
    98  "resources": {
    99    "flights": {
   100      "methods": {
   101        "computeFlightEmissions": {
   102          "description": "Stateless method to retrieve emission estimates. Details on how emission estimates are computed: 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.",
   103          "flatPath": "v1/flights:computeFlightEmissions",
   104          "httpMethod": "POST",
   105          "id": "travelimpactmodel.flights.computeFlightEmissions",
   106          "parameterOrder": [],
   107          "parameters": {},
   108          "path": "v1/flights:computeFlightEmissions",
   109          "request": {
   110            "$ref": "ComputeFlightEmissionsRequest"
   111          },
   112          "response": {
   113            "$ref": "ComputeFlightEmissionsResponse"
   114          }
   115        }
   116      }
   117    }
   118  },
   119  "revision": "20231011",
   120  "rootUrl": "https://travelimpactmodel.googleapis.com/",
   121  "schemas": {
   122    "ComputeFlightEmissionsRequest": {
   123      "description": "Input definition for the ComputeFlightEmissions request.",
   124      "id": "ComputeFlightEmissionsRequest",
   125      "properties": {
   126        "flights": {
   127          "description": "Required. Direct flights to return emission estimates for.",
   128          "items": {
   129            "$ref": "Flight"
   130          },
   131          "type": "array"
   132        }
   133      },
   134      "type": "object"
   135    },
   136    "ComputeFlightEmissionsResponse": {
   137      "description": "Output definition for the ComputeFlightEmissions response.",
   138      "id": "ComputeFlightEmissionsResponse",
   139      "properties": {
   140        "flightEmissions": {
   141          "description": "List of flight legs with emission estimates.",
   142          "items": {
   143            "$ref": "FlightWithEmissions"
   144          },
   145          "type": "array"
   146        },
   147        "modelVersion": {
   148          "$ref": "ModelVersion",
   149          "description": "The model version under which emission estimates for all flights in this response were computed."
   150        }
   151      },
   152      "type": "object"
   153    },
   154    "Date": {
   155      "description": "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",
   156      "id": "Date",
   157      "properties": {
   158        "day": {
   159          "description": "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.",
   160          "format": "int32",
   161          "type": "integer"
   162        },
   163        "month": {
   164          "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.",
   165          "format": "int32",
   166          "type": "integer"
   167        },
   168        "year": {
   169          "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.",
   170          "format": "int32",
   171          "type": "integer"
   172        }
   173      },
   174      "type": "object"
   175    },
   176    "EmissionsGramsPerPax": {
   177      "description": "Grouped emissions per seating class results.",
   178      "id": "EmissionsGramsPerPax",
   179      "properties": {
   180        "business": {
   181          "description": "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.",
   182          "format": "int32",
   183          "type": "integer"
   184        },
   185        "economy": {
   186          "description": "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.",
   187          "format": "int32",
   188          "type": "integer"
   189        },
   190        "first": {
   191          "description": "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.",
   192          "format": "int32",
   193          "type": "integer"
   194        },
   195        "premiumEconomy": {
   196          "description": "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.",
   197          "format": "int32",
   198          "type": "integer"
   199        }
   200      },
   201      "type": "object"
   202    },
   203    "Flight": {
   204      "description": "All details related to a single request item for a direct flight emission estimates.",
   205      "id": "Flight",
   206      "properties": {
   207        "departureDate": {
   208          "$ref": "Date",
   209          "description": "Required. Date of the flight in the time zone of the origin airport. Must be a date in the present or future."
   210        },
   211        "destination": {
   212          "description": "Required. IATA airport code for flight destination, e.g. \"JFK\".",
   213          "type": "string"
   214        },
   215        "flightNumber": {
   216          "description": "Required. Flight number, e.g. 324.",
   217          "format": "int32",
   218          "type": "integer"
   219        },
   220        "operatingCarrierCode": {
   221          "description": "Required. IATA carrier code, e.g. \"AA\".",
   222          "type": "string"
   223        },
   224        "origin": {
   225          "description": "Required. IATA airport code for flight origin, e.g. \"LHR\".",
   226          "type": "string"
   227        }
   228      },
   229      "type": "object"
   230    },
   231    "FlightWithEmissions": {
   232      "description": "Direct flight with emission estimates.",
   233      "id": "FlightWithEmissions",
   234      "properties": {
   235        "emissionsGramsPerPax": {
   236          "$ref": "EmissionsGramsPerPax",
   237          "description": "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. Note this field is currently equivalent to ttw_emissions_grams_per_pax until TIM version 1.X.0 which will update this to be total wtw emissions aka wtt_emissions_grams_per_pax + ttw_emissions_grams_per_pax."
   238        },
   239        "flight": {
   240          "$ref": "Flight",
   241          "description": "Required. Matches the flight identifiers in the request. Note: all IATA codes are capitalized."
   242        }
   243      },
   244      "type": "object"
   245    },
   246    "ModelVersion": {
   247      "description": "Travel Impact Model version. For more information about the model versioning see https://github.com/google/travel-impact-model/#versioning.",
   248      "id": "ModelVersion",
   249      "properties": {
   250        "dated": {
   251          "description": "Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly.",
   252          "type": "string"
   253        },
   254        "major": {
   255          "description": "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 guidelines in https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible",
   256          "format": "int32",
   257          "type": "integer"
   258        },
   259        "minor": {
   260          "description": "Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation.",
   261          "format": "int32",
   262          "type": "integer"
   263        },
   264        "patch": {
   265          "description": "Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation.",
   266          "format": "int32",
   267          "type": "integer"
   268        }
   269      },
   270      "type": "object"
   271    }
   272  },
   273  "servicePath": "",
   274  "title": "Travel Impact Model API",
   275  "version": "v1",
   276  "version_module": true
   277}

View as plain text