gestione documentale avanzata 1 parte

This commit is contained in:
2026-05-28 09:34:28 +02:00
parent 3471befb1a
commit f2b0833b90
34482 changed files with 4312269 additions and 546 deletions
@@ -0,0 +1,45 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ComputeFlightEmissionsRequest extends \Google\Collection
{
protected $collection_key = 'flights';
protected $flightsType = Flight::class;
protected $flightsDataType = 'array';
/**
* Required. Direct flights to return emission estimates for.
*
* @param Flight[] $flights
*/
public function setFlights($flights)
{
$this->flights = $flights;
}
/**
* @return Flight[]
*/
public function getFlights()
{
return $this->flights;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeFlightEmissionsRequest::class, 'Google_Service_TravelImpactModel_ComputeFlightEmissionsRequest');
@@ -0,0 +1,64 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ComputeFlightEmissionsResponse extends \Google\Collection
{
protected $collection_key = 'flightEmissions';
protected $flightEmissionsType = FlightWithEmissions::class;
protected $flightEmissionsDataType = 'array';
protected $modelVersionType = ModelVersion::class;
protected $modelVersionDataType = '';
/**
* List of flight legs with emission estimates.
*
* @param FlightWithEmissions[] $flightEmissions
*/
public function setFlightEmissions($flightEmissions)
{
$this->flightEmissions = $flightEmissions;
}
/**
* @return FlightWithEmissions[]
*/
public function getFlightEmissions()
{
return $this->flightEmissions;
}
/**
* The model version under which emission estimates for all flights in this
* response were computed.
*
* @param ModelVersion $modelVersion
*/
public function setModelVersion(ModelVersion $modelVersion)
{
$this->modelVersion = $modelVersion;
}
/**
* @return ModelVersion
*/
public function getModelVersion()
{
return $this->modelVersion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeFlightEmissionsResponse::class, 'Google_Service_TravelImpactModel_ComputeFlightEmissionsResponse');
@@ -0,0 +1,64 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ComputeScope3FlightEmissionsRequest extends \Google\Collection
{
protected $collection_key = 'flights';
protected $flightsType = Scope3FlightSegment::class;
protected $flightsDataType = 'array';
protected $modelVersionType = ModelVersion::class;
protected $modelVersionDataType = '';
/**
* Required. Flights to return emission estimates for.
*
* @param Scope3FlightSegment[] $flights
*/
public function setFlights($flights)
{
$this->flights = $flights;
}
/**
* @return Scope3FlightSegment[]
*/
public function getFlights()
{
return $this->flights;
}
/**
* Optional. The model version under which emission estimates for all flights
* in this request were computed.
*
* @param ModelVersion $modelVersion
*/
public function setModelVersion(ModelVersion $modelVersion)
{
$this->modelVersion = $modelVersion;
}
/**
* @return ModelVersion
*/
public function getModelVersion()
{
return $this->modelVersion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeScope3FlightEmissionsRequest::class, 'Google_Service_TravelImpactModel_ComputeScope3FlightEmissionsRequest');
@@ -0,0 +1,64 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ComputeScope3FlightEmissionsResponse extends \Google\Collection
{
protected $collection_key = 'flightEmissions';
protected $flightEmissionsType = Scope3FlightEmissions::class;
protected $flightEmissionsDataType = 'array';
protected $modelVersionType = ModelVersion::class;
protected $modelVersionDataType = '';
/**
* List of flight segments with emission estimates.
*
* @param Scope3FlightEmissions[] $flightEmissions
*/
public function setFlightEmissions($flightEmissions)
{
$this->flightEmissions = $flightEmissions;
}
/**
* @return Scope3FlightEmissions[]
*/
public function getFlightEmissions()
{
return $this->flightEmissions;
}
/**
* The model version under which emission estimates for all flights in this
* response were computed.
*
* @param ModelVersion $modelVersion
*/
public function setModelVersion(ModelVersion $modelVersion)
{
$this->modelVersion = $modelVersion;
}
/**
* @return ModelVersion
*/
public function getModelVersion()
{
return $this->modelVersion;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeScope3FlightEmissionsResponse::class, 'Google_Service_TravelImpactModel_ComputeScope3FlightEmissionsResponse');
@@ -0,0 +1,46 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ComputeTypicalFlightEmissionsRequest extends \Google\Collection
{
protected $collection_key = 'markets';
protected $marketsType = Market::class;
protected $marketsDataType = 'array';
/**
* Required. Request the typical flight emissions estimates for this market
* pair. A maximum of 1000 markets can be requested.
*
* @param Market[] $markets
*/
public function setMarkets($markets)
{
$this->markets = $markets;
}
/**
* @return Market[]
*/
public function getMarkets()
{
return $this->markets;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeTypicalFlightEmissionsRequest::class, 'Google_Service_TravelImpactModel_ComputeTypicalFlightEmissionsRequest');
@@ -0,0 +1,64 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ComputeTypicalFlightEmissionsResponse extends \Google\Collection
{
protected $collection_key = 'typicalFlightEmissions';
protected $modelVersionType = ModelVersion::class;
protected $modelVersionDataType = '';
protected $typicalFlightEmissionsType = TypicalFlightEmissions::class;
protected $typicalFlightEmissionsDataType = 'array';
/**
* The model version under which typical flight emission estimates for all
* flights in this response were computed.
*
* @param ModelVersion $modelVersion
*/
public function setModelVersion(ModelVersion $modelVersion)
{
$this->modelVersion = $modelVersion;
}
/**
* @return ModelVersion
*/
public function getModelVersion()
{
return $this->modelVersion;
}
/**
* Market's Typical Flight Emissions requested.
*
* @param TypicalFlightEmissions[] $typicalFlightEmissions
*/
public function setTypicalFlightEmissions($typicalFlightEmissions)
{
$this->typicalFlightEmissions = $typicalFlightEmissions;
}
/**
* @return TypicalFlightEmissions[]
*/
public function getTypicalFlightEmissions()
{
return $this->typicalFlightEmissions;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ComputeTypicalFlightEmissionsResponse::class, 'Google_Service_TravelImpactModel_ComputeTypicalFlightEmissionsResponse');
@@ -0,0 +1,100 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class Date extends \Google\Model
{
/**
* 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.
*
* @var int
*/
public $day;
/**
* Month of a year. Must be from 1 to 12, or 0 to specify a year without a
* month and day.
*
* @var int
*/
public $month;
/**
* Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
* year.
*
* @var int
*/
public $year;
/**
* 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.
*
* @param int $day
*/
public function setDay($day)
{
$this->day = $day;
}
/**
* @return int
*/
public function getDay()
{
return $this->day;
}
/**
* Month of a year. Must be from 1 to 12, or 0 to specify a year without a
* month and day.
*
* @param int $month
*/
public function setMonth($month)
{
$this->month = $month;
}
/**
* @return int
*/
public function getMonth()
{
return $this->month;
}
/**
* Year of the date. Must be from 1 to 9999, or 0 to specify a date without a
* year.
*
* @param int $year
*/
public function setYear($year)
{
$this->year = $year;
}
/**
* @return int
*/
public function getYear()
{
return $this->year;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Date::class, 'Google_Service_TravelImpactModel_Date');
@@ -0,0 +1,103 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class EasaLabelMetadata extends \Google\Model
{
protected $labelExpiryDateType = Date::class;
protected $labelExpiryDateDataType = '';
protected $labelIssueDateType = Date::class;
protected $labelIssueDateDataType = '';
/**
* Version of the label.
*
* @var string
*/
public $labelVersion;
/**
* 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.
*
* @var
*/
public $safDiscountPercentage;
/**
* The date when the label expires. The label can be displayed until the end
* of this date.
*
* @param Date $labelExpiryDate
*/
public function setLabelExpiryDate(Date $labelExpiryDate)
{
$this->labelExpiryDate = $labelExpiryDate;
}
/**
* @return Date
*/
public function getLabelExpiryDate()
{
return $this->labelExpiryDate;
}
/**
* The date when the label was issued.
*
* @param Date $labelIssueDate
*/
public function setLabelIssueDate(Date $labelIssueDate)
{
$this->labelIssueDate = $labelIssueDate;
}
/**
* @return Date
*/
public function getLabelIssueDate()
{
return $this->labelIssueDate;
}
/**
* Version of the label.
*
* @param string $labelVersion
*/
public function setLabelVersion($labelVersion)
{
$this->labelVersion = $labelVersion;
}
/**
* @return string
*/
public function getLabelVersion()
{
return $this->labelVersion;
}
public function setSafDiscountPercentage($safDiscountPercentage)
{
$this->safDiscountPercentage = $safDiscountPercentage;
}
public function getSafDiscountPercentage()
{
return $this->safDiscountPercentage;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EasaLabelMetadata::class, 'Google_Service_TravelImpactModel_EasaLabelMetadata');
@@ -0,0 +1,130 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class EmissionsGramsPerPax extends \Google\Model
{
/**
* 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.
*
* @var int
*/
public $business;
/**
* 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.
*
* @var int
*/
public $economy;
/**
* 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.
*
* @var int
*/
public $first;
/**
* 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.
*
* @var int
*/
public $premiumEconomy;
/**
* 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.
*
* @param int $business
*/
public function setBusiness($business)
{
$this->business = $business;
}
/**
* @return int
*/
public function getBusiness()
{
return $this->business;
}
/**
* 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.
*
* @param int $economy
*/
public function setEconomy($economy)
{
$this->economy = $economy;
}
/**
* @return int
*/
public function getEconomy()
{
return $this->economy;
}
/**
* 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.
*
* @param int $first
*/
public function setFirst($first)
{
$this->first = $first;
}
/**
* @return int
*/
public function getFirst()
{
return $this->first;
}
/**
* 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.
*
* @param int $premiumEconomy
*/
public function setPremiumEconomy($premiumEconomy)
{
$this->premiumEconomy = $premiumEconomy;
}
/**
* @return int
*/
public function getPremiumEconomy()
{
return $this->premiumEconomy;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(EmissionsGramsPerPax::class, 'Google_Service_TravelImpactModel_EmissionsGramsPerPax');
@@ -0,0 +1,133 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class Flight extends \Google\Model
{
protected $departureDateType = Date::class;
protected $departureDateDataType = '';
/**
* Required. IATA airport code for flight destination, e.g. "JFK".
*
* @var string
*/
public $destination;
/**
* Required. Flight number, e.g. 324.
*
* @var int
*/
public $flightNumber;
/**
* Required. IATA carrier code, e.g. "AA".
*
* @var string
*/
public $operatingCarrierCode;
/**
* Required. IATA airport code for flight origin, e.g. "LHR".
*
* @var string
*/
public $origin;
/**
* Required. Date of the flight in the time zone of the origin airport. Must
* be a date in the present or future.
*
* @param Date $departureDate
*/
public function setDepartureDate(Date $departureDate)
{
$this->departureDate = $departureDate;
}
/**
* @return Date
*/
public function getDepartureDate()
{
return $this->departureDate;
}
/**
* Required. IATA airport code for flight destination, e.g. "JFK".
*
* @param string $destination
*/
public function setDestination($destination)
{
$this->destination = $destination;
}
/**
* @return string
*/
public function getDestination()
{
return $this->destination;
}
/**
* Required. Flight number, e.g. 324.
*
* @param int $flightNumber
*/
public function setFlightNumber($flightNumber)
{
$this->flightNumber = $flightNumber;
}
/**
* @return int
*/
public function getFlightNumber()
{
return $this->flightNumber;
}
/**
* Required. IATA carrier code, e.g. "AA".
*
* @param string $operatingCarrierCode
*/
public function setOperatingCarrierCode($operatingCarrierCode)
{
$this->operatingCarrierCode = $operatingCarrierCode;
}
/**
* @return string
*/
public function getOperatingCarrierCode()
{
return $this->operatingCarrierCode;
}
/**
* Required. IATA airport code for flight origin, e.g. "LHR".
*
* @param string $origin
*/
public function setOrigin($origin)
{
$this->origin = $origin;
}
/**
* @return string
*/
public function getOrigin()
{
return $this->origin;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Flight::class, 'Google_Service_TravelImpactModel_Flight');
@@ -0,0 +1,163 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class FlightWithEmissions extends \Google\Model
{
/**
* The contrails impact is unspecified.
*/
public const CONTRAILS_IMPACT_BUCKET_CONTRAILS_IMPACT_UNSPECIFIED = 'CONTRAILS_IMPACT_UNSPECIFIED';
/**
* The contrails impact is negligible compared to the total CO2e emissions.
*/
public const CONTRAILS_IMPACT_BUCKET_CONTRAILS_IMPACT_NEGLIGIBLE = 'CONTRAILS_IMPACT_NEGLIGIBLE';
/**
* The contrails impact is comparable to the total CO2e emissions.
*/
public const CONTRAILS_IMPACT_BUCKET_CONTRAILS_IMPACT_MODERATE = 'CONTRAILS_IMPACT_MODERATE';
/**
* The contrails impact is higher than the total CO2e emissions impact.
*/
public const CONTRAILS_IMPACT_BUCKET_CONTRAILS_IMPACT_SEVERE = 'CONTRAILS_IMPACT_SEVERE';
/**
* The source of the emissions data is unspecified.
*/
public const SOURCE_SOURCE_UNSPECIFIED = 'SOURCE_UNSPECIFIED';
/**
* The emissions data is from the Travel Impact Model.
*/
public const SOURCE_TIM = 'TIM';
/**
* The emissions data is from the EASA environmental labels.
*/
public const SOURCE_EASA = 'EASA';
/**
* Optional. The significance of contrails warming impact compared to the
* total CO2e emissions impact.
*
* @var string
*/
public $contrailsImpactBucket;
protected $easaLabelMetadataType = EasaLabelMetadata::class;
protected $easaLabelMetadataDataType = '';
protected $emissionsGramsPerPaxType = EmissionsGramsPerPax::class;
protected $emissionsGramsPerPaxDataType = '';
protected $flightType = Flight::class;
protected $flightDataType = '';
/**
* Optional. The source of the emissions data.
*
* @var string
*/
public $source;
/**
* Optional. The significance of contrails warming impact compared to the
* total CO2e emissions impact.
*
* Accepted values: CONTRAILS_IMPACT_UNSPECIFIED, CONTRAILS_IMPACT_NEGLIGIBLE,
* CONTRAILS_IMPACT_MODERATE, CONTRAILS_IMPACT_SEVERE
*
* @param self::CONTRAILS_IMPACT_BUCKET_* $contrailsImpactBucket
*/
public function setContrailsImpactBucket($contrailsImpactBucket)
{
$this->contrailsImpactBucket = $contrailsImpactBucket;
}
/**
* @return self::CONTRAILS_IMPACT_BUCKET_*
*/
public function getContrailsImpactBucket()
{
return $this->contrailsImpactBucket;
}
/**
* Optional. Metadata about the EASA Flight Emissions Label. Only set when the
* emissions data source is EASA.
*
* @param EasaLabelMetadata $easaLabelMetadata
*/
public function setEasaLabelMetadata(EasaLabelMetadata $easaLabelMetadata)
{
$this->easaLabelMetadata = $easaLabelMetadata;
}
/**
* @return EasaLabelMetadata
*/
public function getEasaLabelMetadata()
{
return $this->easaLabelMetadata;
}
/**
* 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.
*
* @param EmissionsGramsPerPax $emissionsGramsPerPax
*/
public function setEmissionsGramsPerPax(EmissionsGramsPerPax $emissionsGramsPerPax)
{
$this->emissionsGramsPerPax = $emissionsGramsPerPax;
}
/**
* @return EmissionsGramsPerPax
*/
public function getEmissionsGramsPerPax()
{
return $this->emissionsGramsPerPax;
}
/**
* Identifier. Matches the flight identifiers in the request. Note: all IATA
* codes are capitalized.
*
* @param Flight $flight
*/
public function setFlight(Flight $flight)
{
$this->flight = $flight;
}
/**
* @return Flight
*/
public function getFlight()
{
return $this->flight;
}
/**
* Optional. The source of the emissions data.
*
* Accepted values: SOURCE_UNSPECIFIED, TIM, EASA
*
* @param self::SOURCE_* $source
*/
public function setSource($source)
{
$this->source = $source;
}
/**
* @return self::SOURCE_*
*/
public function getSource()
{
return $this->source;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(FlightWithEmissions::class, 'Google_Service_TravelImpactModel_FlightWithEmissions');
@@ -0,0 +1,70 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class Market extends \Google\Model
{
/**
* Required. IATA airport code for flight destination, e.g. "JFK".
*
* @var string
*/
public $destination;
/**
* Required. IATA airport code for flight origin, e.g. "LHR".
*
* @var string
*/
public $origin;
/**
* Required. IATA airport code for flight destination, e.g. "JFK".
*
* @param string $destination
*/
public function setDestination($destination)
{
$this->destination = $destination;
}
/**
* @return string
*/
public function getDestination()
{
return $this->destination;
}
/**
* Required. IATA airport code for flight origin, e.g. "LHR".
*
* @param string $origin
*/
public function setOrigin($origin)
{
$this->origin = $origin;
}
/**
* @return string
*/
public function getOrigin()
{
return $this->origin;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Market::class, 'Google_Service_TravelImpactModel_Market');
@@ -0,0 +1,136 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class McpToolDataHandlingProfile extends \Google\Model
{
/**
* The default value. This value is unused.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_UNSPECIFIED = 'DATA_ACCESS_LEVEL_UNSPECIFIED';
/**
* Public data.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_PUBLIC = 'DATA_ACCESS_LEVEL_PUBLIC';
/**
* Confidential data.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_CONFIDENTIAL = 'DATA_ACCESS_LEVEL_CONFIDENTIAL';
/**
* Need-to-know data.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_NEED_TO_KNOW = 'DATA_ACCESS_LEVEL_NEED_TO_KNOW';
/**
* Personally Identifiable Information (PII) data.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_PII = 'DATA_ACCESS_LEVEL_PII';
/**
* User data.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_USER = 'DATA_ACCESS_LEVEL_USER';
/**
* The tool does not access any data.
*/
public const INPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_NO_DATA_ACCESS = 'DATA_ACCESS_LEVEL_NO_DATA_ACCESS';
/**
* The default value. This value is unused.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_UNSPECIFIED = 'DATA_ACCESS_LEVEL_UNSPECIFIED';
/**
* Public data.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_PUBLIC = 'DATA_ACCESS_LEVEL_PUBLIC';
/**
* Confidential data.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_CONFIDENTIAL = 'DATA_ACCESS_LEVEL_CONFIDENTIAL';
/**
* Need-to-know data.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_NEED_TO_KNOW = 'DATA_ACCESS_LEVEL_NEED_TO_KNOW';
/**
* Personally Identifiable Information (PII) data.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_PII = 'DATA_ACCESS_LEVEL_PII';
/**
* User data.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_USER = 'DATA_ACCESS_LEVEL_USER';
/**
* The tool does not access any data.
*/
public const OUTPUT_DATA_ACCESS_LEVEL_DATA_ACCESS_LEVEL_NO_DATA_ACCESS = 'DATA_ACCESS_LEVEL_NO_DATA_ACCESS';
/**
* // The data access level of the tool's inputs.
*
* @var string
*/
public $inputDataAccessLevel;
/**
* The data access level of the tool's outputs.
*
* @var string
*/
public $outputDataAccessLevel;
/**
* // The data access level of the tool's inputs.
*
* Accepted values: DATA_ACCESS_LEVEL_UNSPECIFIED, DATA_ACCESS_LEVEL_PUBLIC,
* DATA_ACCESS_LEVEL_CONFIDENTIAL, DATA_ACCESS_LEVEL_NEED_TO_KNOW,
* DATA_ACCESS_LEVEL_PII, DATA_ACCESS_LEVEL_USER,
* DATA_ACCESS_LEVEL_NO_DATA_ACCESS
*
* @param self::INPUT_DATA_ACCESS_LEVEL_* $inputDataAccessLevel
*/
public function setInputDataAccessLevel($inputDataAccessLevel)
{
$this->inputDataAccessLevel = $inputDataAccessLevel;
}
/**
* @return self::INPUT_DATA_ACCESS_LEVEL_*
*/
public function getInputDataAccessLevel()
{
return $this->inputDataAccessLevel;
}
/**
* The data access level of the tool's outputs.
*
* Accepted values: DATA_ACCESS_LEVEL_UNSPECIFIED, DATA_ACCESS_LEVEL_PUBLIC,
* DATA_ACCESS_LEVEL_CONFIDENTIAL, DATA_ACCESS_LEVEL_NEED_TO_KNOW,
* DATA_ACCESS_LEVEL_PII, DATA_ACCESS_LEVEL_USER,
* DATA_ACCESS_LEVEL_NO_DATA_ACCESS
*
* @param self::OUTPUT_DATA_ACCESS_LEVEL_* $outputDataAccessLevel
*/
public function setOutputDataAccessLevel($outputDataAccessLevel)
{
$this->outputDataAccessLevel = $outputDataAccessLevel;
}
/**
* @return self::OUTPUT_DATA_ACCESS_LEVEL_*
*/
public function getOutputDataAccessLevel()
{
return $this->outputDataAccessLevel;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(McpToolDataHandlingProfile::class, 'Google_Service_TravelImpactModel_McpToolDataHandlingProfile');
@@ -0,0 +1,67 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class McpToolLifecycleProfile extends \Google\Model
{
/**
* The default value. This value is unused.
*/
public const LAUNCH_STATE_LAUNCH_STATE_UNSPECIFIED = 'LAUNCH_STATE_UNSPECIFIED';
/**
* The tool is currently in development.
*/
public const LAUNCH_STATE_LAUNCH_STATE_DEVELOPMENT = 'LAUNCH_STATE_DEVELOPMENT';
/**
* The tool is in production preview.
*/
public const LAUNCH_STATE_LAUNCH_STATE_PRODUCTION_PREVIEW = 'LAUNCH_STATE_PRODUCTION_PREVIEW';
/**
* The tool is generally available.
*/
public const LAUNCH_STATE_LAUNCH_STATE_GENERAL_AVAILABILITY = 'LAUNCH_STATE_GENERAL_AVAILABILITY';
/**
* Output only. The current launch state of the MCP tool.
*
* @var string
*/
public $launchState;
/**
* Output only. The current launch state of the MCP tool.
*
* Accepted values: LAUNCH_STATE_UNSPECIFIED, LAUNCH_STATE_DEVELOPMENT,
* LAUNCH_STATE_PRODUCTION_PREVIEW, LAUNCH_STATE_GENERAL_AVAILABILITY
*
* @param self::LAUNCH_STATE_* $launchState
*/
public function setLaunchState($launchState)
{
$this->launchState = $launchState;
}
/**
* @return self::LAUNCH_STATE_*
*/
public function getLaunchState()
{
return $this->launchState;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(McpToolLifecycleProfile::class, 'Google_Service_TravelImpactModel_McpToolLifecycleProfile');
@@ -0,0 +1,130 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class ModelVersion extends \Google\Model
{
/**
* Dated versions: Model datasets are recreated with refreshed input data but
* no change to the algorithms regularly.
*
* @var string
*/
public $dated;
/**
* 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)
*
* @var int
*/
public $major;
/**
* Minor versions: Changes to the model that, while being consistent across
* schema versions, change the model parameters or implementation.
*
* @var int
*/
public $minor;
/**
* Patch versions: Implementation changes meant to address bugs or
* inaccuracies in the model implementation.
*
* @var int
*/
public $patch;
/**
* Dated versions: Model datasets are recreated with refreshed input data but
* no change to the algorithms regularly.
*
* @param string $dated
*/
public function setDated($dated)
{
$this->dated = $dated;
}
/**
* @return string
*/
public function getDated()
{
return $this->dated;
}
/**
* 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)
*
* @param int $major
*/
public function setMajor($major)
{
$this->major = $major;
}
/**
* @return int
*/
public function getMajor()
{
return $this->major;
}
/**
* Minor versions: Changes to the model that, while being consistent across
* schema versions, change the model parameters or implementation.
*
* @param int $minor
*/
public function setMinor($minor)
{
$this->minor = $minor;
}
/**
* @return int
*/
public function getMinor()
{
return $this->minor;
}
/**
* Patch versions: Implementation changes meant to address bugs or
* inaccuracies in the model implementation.
*
* @param int $patch
*/
public function setPatch($patch)
{
$this->patch = $patch;
}
/**
* @return int
*/
public function getPatch()
{
return $this->patch;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ModelVersion::class, 'Google_Service_TravelImpactModel_ModelVersion');
@@ -0,0 +1,138 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel\Resource;
use Google\Service\TravelImpactModel\ComputeFlightEmissionsRequest;
use Google\Service\TravelImpactModel\ComputeFlightEmissionsResponse;
use Google\Service\TravelImpactModel\ComputeScope3FlightEmissionsRequest;
use Google\Service\TravelImpactModel\ComputeScope3FlightEmissionsResponse;
use Google\Service\TravelImpactModel\ComputeTypicalFlightEmissionsRequest;
use Google\Service\TravelImpactModel\ComputeTypicalFlightEmissionsResponse;
/**
* The "flights" collection of methods.
* Typical usage is:
* <code>
* $travelimpactmodelService = new Google\Service\TravelImpactModel(...);
* $flights = $travelimpactmodelService->flights;
* </code>
*/
class Flights extends \Google\Service\Resource
{
/**
* 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. (flights.computeFlightEmissions)
*
* @param ComputeFlightEmissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return ComputeFlightEmissionsResponse
* @throws \Google\Service\Exception
*/
public function computeFlightEmissions(ComputeFlightEmissionsRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('computeFlightEmissions', [$params], ComputeFlightEmissionsResponse::class);
}
/**
* Stateless method to retrieve GHG emissions estimates for a set of flight
* segments for Scope 3 reporting. The response will contain all entries that
* match the input Scope3FlightSegment flight segments, in the same order
* provided. The estimates will be computed using the following cascading logic
* (using the first one that is available): 1. TIM-based emissions given origin,
* destination, carrier, flightNumber, departureDate, and cabinClass. 2. Typical
* flight emissions given origin, destination, year in departureDate, and
* cabinClass. 3. Distance-based emissions calculated using distanceKm, year in
* departureDate, and cabinClass. If there is a future flight requested in this
* calendar year, we do not support Tier 1 emissions and will fallback to Tier 2
* or 3 emissions. If the requested future flight is in not in this calendar
* year, we will return an empty response. We recommend that for future flights,
* computeFlightEmissions API is used instead. If there are no estimates
* available for a certain flight with any of the three methods, the response
* will return a Scope3FlightEmissions object with empty emission fields. The
* request will still be considered successful. Generally, missing emissions
* estimates occur when the flight is unknown to the server (e.g. no specific
* flight exists, or typical flight emissions are not available for the
* requested pair). The request will fail with an `INVALID_ARGUMENT` error if: *
* The request contains more than 1,000 flight legs. * The input flight leg is
* missing one or more identifiers. For example, missing origin/destination
* without a valid distance for TIM_EMISSIONS or TYPICAL_FLIGHT_EMISSIONS type
* matching, or missing distance for a DISTANCE_BASED_EMISSIONS type matching
* (if you want to fallback to distance-based emissions or want a distance-based
* emissions estimate, you need to specify a distance). * The flight date is
* before 2019 (Scope 3 data is only available for 2019 and after). * The flight
* distance is 0 or lower. * Missing cabin class. Because the request is
* processed with fallback logic, it is possible that misconfigured requests
* return valid emissions estimates using fallback methods. For example, if a
* request has the wrong flight number but specifies the origin and destination,
* the request will still succeed, but the returned emissions will be based
* solely on the typical flight emissions. Similarly, if a request is missing
* the origin for a typical flight emissions request, but specifies a valid
* distance, the request could succeed based solely on the distance-based
* emissions. Consequently, one should check the source of the returned
* emissions (source) to confirm the results are as expected.
* (flights.computeScope3FlightEmissions)
*
* @param ComputeScope3FlightEmissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return ComputeScope3FlightEmissionsResponse
* @throws \Google\Service\Exception
*/
public function computeScope3FlightEmissions(ComputeScope3FlightEmissionsRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('computeScope3FlightEmissions', [$params], ComputeScope3FlightEmissionsResponse::class);
}
/**
* 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.
* (flights.computeTypicalFlightEmissions)
*
* @param ComputeTypicalFlightEmissionsRequest $postBody
* @param array $optParams Optional parameters.
* @return ComputeTypicalFlightEmissionsResponse
* @throws \Google\Service\Exception
*/
public function computeTypicalFlightEmissions(ComputeTypicalFlightEmissionsRequest $postBody, $optParams = [])
{
$params = ['postBody' => $postBody];
$params = array_merge($params, $optParams);
return $this->call('computeTypicalFlightEmissions', [$params], ComputeTypicalFlightEmissionsResponse::class);
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Flights::class, 'Google_Service_TravelImpactModel_Resource_Flights');
@@ -0,0 +1,162 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class Scope3FlightEmissions extends \Google\Model
{
/**
* Unspecified data type.
*/
public const SOURCE_SCOPE3_DATA_TYPE_UNSPECIFIED = 'SCOPE3_DATA_TYPE_UNSPECIFIED';
/**
* TIM-based emissions given origin, destination, carrier, flight number,
* departure date, and year.
*/
public const SOURCE_TIM_EMISSIONS = 'TIM_EMISSIONS';
/**
* Typical flight emissions given origin, destination, and year.
*/
public const SOURCE_TYPICAL_FLIGHT_EMISSIONS = 'TYPICAL_FLIGHT_EMISSIONS';
/**
* Distance-based emissions based on the distance traveled and year.
*/
public const SOURCE_DISTANCE_BASED_EMISSIONS = 'DISTANCE_BASED_EMISSIONS';
protected $flightType = Scope3FlightSegment::class;
protected $flightDataType = '';
/**
* Optional. The source of the emissions data.
*
* @var string
*/
public $source;
/**
* Optional. Tank-to-wake flight emissions per passenger based on the
* requested info.
*
* @var string
*/
public $ttwEmissionsGramsPerPax;
/**
* Optional. Well-to-tank flight emissions per passenger based on the
* requested info.
*
* @var string
*/
public $wttEmissionsGramsPerPax;
/**
* Optional. Total flight emissions (sum of well-to-tank and tank-to-wake) per
* passenger based on the requested info. This is the total emissions and
* unless you have specific reasons for using TTW or WTT emissions, you should
* use this number.
*
* @var string
*/
public $wtwEmissionsGramsPerPax;
/**
* Identifier. Matches the flight identifiers in the request.
*
* @param Scope3FlightSegment $flight
*/
public function setFlight(Scope3FlightSegment $flight)
{
$this->flight = $flight;
}
/**
* @return Scope3FlightSegment
*/
public function getFlight()
{
return $this->flight;
}
/**
* Optional. The source of the emissions data.
*
* Accepted values: SCOPE3_DATA_TYPE_UNSPECIFIED, TIM_EMISSIONS,
* TYPICAL_FLIGHT_EMISSIONS, DISTANCE_BASED_EMISSIONS
*
* @param self::SOURCE_* $source
*/
public function setSource($source)
{
$this->source = $source;
}
/**
* @return self::SOURCE_*
*/
public function getSource()
{
return $this->source;
}
/**
* Optional. Tank-to-wake flight emissions per passenger based on the
* requested info.
*
* @param string $ttwEmissionsGramsPerPax
*/
public function setTtwEmissionsGramsPerPax($ttwEmissionsGramsPerPax)
{
$this->ttwEmissionsGramsPerPax = $ttwEmissionsGramsPerPax;
}
/**
* @return string
*/
public function getTtwEmissionsGramsPerPax()
{
return $this->ttwEmissionsGramsPerPax;
}
/**
* Optional. Well-to-tank flight emissions per passenger based on the
* requested info.
*
* @param string $wttEmissionsGramsPerPax
*/
public function setWttEmissionsGramsPerPax($wttEmissionsGramsPerPax)
{
$this->wttEmissionsGramsPerPax = $wttEmissionsGramsPerPax;
}
/**
* @return string
*/
public function getWttEmissionsGramsPerPax()
{
return $this->wttEmissionsGramsPerPax;
}
/**
* Optional. Total flight emissions (sum of well-to-tank and tank-to-wake) per
* passenger based on the requested info. This is the total emissions and
* unless you have specific reasons for using TTW or WTT emissions, you should
* use this number.
*
* @param string $wtwEmissionsGramsPerPax
*/
public function setWtwEmissionsGramsPerPax($wtwEmissionsGramsPerPax)
{
$this->wtwEmissionsGramsPerPax = $wtwEmissionsGramsPerPax;
}
/**
* @return string
*/
public function getWtwEmissionsGramsPerPax()
{
return $this->wtwEmissionsGramsPerPax;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Scope3FlightEmissions::class, 'Google_Service_TravelImpactModel_Scope3FlightEmissions');
@@ -0,0 +1,256 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class Scope3FlightSegment extends \Google\Model
{
/**
* Unspecified cabin class.
*/
public const CABIN_CLASS_CABIN_CLASS_UNSPECIFIED = 'CABIN_CLASS_UNSPECIFIED';
/**
* Economy class.
*/
public const CABIN_CLASS_ECONOMY = 'ECONOMY';
/**
* Premium economy class.
*/
public const CABIN_CLASS_PREMIUM_ECONOMY = 'PREMIUM_ECONOMY';
/**
* Business class.
*/
public const CABIN_CLASS_BUSINESS = 'BUSINESS';
/**
* First class.
*/
public const CABIN_CLASS_FIRST = 'FIRST';
/**
* Required. The cabin class of the flight.
*
* @var string
*/
public $cabinClass;
/**
* Optional. 2-character [IATA carrier
* code](https://www.iata.org/en/publications/directories/code-search/), e.g.
* `KE`. This is required if specific flight matching is desired. Otherwise,
* this is unused for typical flight and distance-based emissions models. This
* could be both operating and marketing carrier code (i.e. codeshare is
* covered).
*
* @var string
*/
public $carrierCode;
protected $departureDateType = Date::class;
protected $departureDateDataType = '';
/**
* Optional. 3-character [IATA airport
* code](https://www.iata.org/en/publications/directories/code-search/) for
* flight destination, e.g. `ICN`. This is used to match specific flight if
* provided alongside origin, carrier, and flight number. If there is no
* match, we will first try to match the flight to a typical flight between
* the provided origin and destination airports. Otherwise, we will use the
* distance-based emissions model if the flight distance is provided.
*
* @var string
*/
public $destination;
/**
* Optional. Distance in kilometers, e.g. `2423`, from [1, 2.5e16) km. This is
* used to match a flight to distance-based emissions when origin and
* destination are not provided or there are no matching typical flights.
*
* @var string
*/
public $distanceKm;
/**
* Optional. Up to 4-digit [flight
* number](https://en.wikipedia.org/wiki/Flight_number), e.g. `71`, from [1,
* 9999]. This is first used to match a specific flight if a flight number is
* specified alongside origin, destination, and carrier. If a flight number is
* not specified, we will first try to match the flight to a typical flight
* between the provided origin and destination airports. If that fails and/or
* origin & destination are not provided, we will use the distance-based
* emissions model based on the flight distance provided.
*
* @var int
*/
public $flightNumber;
/**
* Optional. 3-character [IATA airport
* code](https://www.iata.org/en/publications/directories/code-search/) for
* flight origin, e.g. `YVR`. This is used to match specific flight if
* provided alongside destination, carrier, and flight number. If there is no
* match, we will first try to match the flight to a typical flight between
* the provided origin and destination airports. Otherwise, we will use the
* distance-based emissions model if the flight distance is provided.
*
* @var string
*/
public $origin;
/**
* Required. The cabin class of the flight.
*
* Accepted values: CABIN_CLASS_UNSPECIFIED, ECONOMY, PREMIUM_ECONOMY,
* BUSINESS, FIRST
*
* @param self::CABIN_CLASS_* $cabinClass
*/
public function setCabinClass($cabinClass)
{
$this->cabinClass = $cabinClass;
}
/**
* @return self::CABIN_CLASS_*
*/
public function getCabinClass()
{
return $this->cabinClass;
}
/**
* Optional. 2-character [IATA carrier
* code](https://www.iata.org/en/publications/directories/code-search/), e.g.
* `KE`. This is required if specific flight matching is desired. Otherwise,
* this is unused for typical flight and distance-based emissions models. This
* could be both operating and marketing carrier code (i.e. codeshare is
* covered).
*
* @param string $carrierCode
*/
public function setCarrierCode($carrierCode)
{
$this->carrierCode = $carrierCode;
}
/**
* @return string
*/
public function getCarrierCode()
{
return $this->carrierCode;
}
/**
* Required. Date of the flight in the time zone of the origin airport. Only
* year is required for typical flight and distance-based emissions models
* (month and day values are ignored and therefore, can be either omitted, set
* to 0, or set to a valid date for those cases). Correspondingly, if a
* specific date is not provided for TIM emissions, we will fallback to
* typical flight (or distance-based) emissions.
*
* @param Date $departureDate
*/
public function setDepartureDate(Date $departureDate)
{
$this->departureDate = $departureDate;
}
/**
* @return Date
*/
public function getDepartureDate()
{
return $this->departureDate;
}
/**
* Optional. 3-character [IATA airport
* code](https://www.iata.org/en/publications/directories/code-search/) for
* flight destination, e.g. `ICN`. This is used to match specific flight if
* provided alongside origin, carrier, and flight number. If there is no
* match, we will first try to match the flight to a typical flight between
* the provided origin and destination airports. Otherwise, we will use the
* distance-based emissions model if the flight distance is provided.
*
* @param string $destination
*/
public function setDestination($destination)
{
$this->destination = $destination;
}
/**
* @return string
*/
public function getDestination()
{
return $this->destination;
}
/**
* Optional. Distance in kilometers, e.g. `2423`, from [1, 2.5e16) km. This is
* used to match a flight to distance-based emissions when origin and
* destination are not provided or there are no matching typical flights.
*
* @param string $distanceKm
*/
public function setDistanceKm($distanceKm)
{
$this->distanceKm = $distanceKm;
}
/**
* @return string
*/
public function getDistanceKm()
{
return $this->distanceKm;
}
/**
* Optional. Up to 4-digit [flight
* number](https://en.wikipedia.org/wiki/Flight_number), e.g. `71`, from [1,
* 9999]. This is first used to match a specific flight if a flight number is
* specified alongside origin, destination, and carrier. If a flight number is
* not specified, we will first try to match the flight to a typical flight
* between the provided origin and destination airports. If that fails and/or
* origin & destination are not provided, we will use the distance-based
* emissions model based on the flight distance provided.
*
* @param int $flightNumber
*/
public function setFlightNumber($flightNumber)
{
$this->flightNumber = $flightNumber;
}
/**
* @return int
*/
public function getFlightNumber()
{
return $this->flightNumber;
}
/**
* Optional. 3-character [IATA airport
* code](https://www.iata.org/en/publications/directories/code-search/) for
* flight origin, e.g. `YVR`. This is used to match specific flight if
* provided alongside destination, carrier, and flight number. If there is no
* match, we will first try to match the flight to a typical flight between
* the provided origin and destination airports. Otherwise, we will use the
* distance-based emissions model if the flight distance is provided.
*
* @param string $origin
*/
public function setOrigin($origin)
{
$this->origin = $origin;
}
/**
* @return string
*/
public function getOrigin()
{
return $this->origin;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Scope3FlightSegment::class, 'Google_Service_TravelImpactModel_Scope3FlightSegment');
@@ -0,0 +1,68 @@
<?php
/*
* Copyright 2014 Google Inc.
*
* 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.
*/
namespace Google\Service\TravelImpactModel;
class TypicalFlightEmissions extends \Google\Model
{
protected $emissionsGramsPerPaxType = EmissionsGramsPerPax::class;
protected $emissionsGramsPerPaxDataType = '';
protected $marketType = Market::class;
protected $marketDataType = '';
/**
* 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).
*
* @param EmissionsGramsPerPax $emissionsGramsPerPax
*/
public function setEmissionsGramsPerPax(EmissionsGramsPerPax $emissionsGramsPerPax)
{
$this->emissionsGramsPerPax = $emissionsGramsPerPax;
}
/**
* @return EmissionsGramsPerPax
*/
public function getEmissionsGramsPerPax()
{
return $this->emissionsGramsPerPax;
}
/**
* Identifier. Matches the flight identifiers in the request. Note: all IATA
* codes are capitalized.
*
* @param Market $market
*/
public function setMarket(Market $market)
{
$this->market = $market;
}
/**
* @return Market
*/
public function getMarket()
{
return $this->market;
}
}
// Adding a class alias for backwards compatibility with the previous class name.
class_alias(TypicalFlightEmissions::class, 'Google_Service_TravelImpactModel_TypicalFlightEmissions');