Google Maps FleetEngine V1 Client - Class SearchVehiclesRequest (0.1.1)

Reference documentation and code samples for the Google Maps FleetEngine V1 Client class SearchVehiclesRequest.

SearchVehicles request message.

Generated from protobuf message maps.fleetengine.v1.SearchVehiclesRequest

Namespace

Google \ Maps \ FleetEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ header Google\Maps\FleetEngine\V1\RequestHeader

The standard Fleet Engine request header.

↳ parent string

Required. Must be in the format providers/{provider}. The provider must be the Project ID (for example, sample-cloud-project) of the Google Cloud Project of which the service account making this call is a member.

↳ pickup_point Google\Maps\FleetEngine\V1\TerminalLocation

Required. The pickup point to search near.

↳ dropoff_point Google\Maps\FleetEngine\V1\TerminalLocation

The customer's intended dropoff location. The field is required if trip_types contains TripType.SHARED.

↳ pickup_radius_meters int

Required. Defines the vehicle search radius around the pickup point. Only vehicles within the search radius will be returned. Value must be between 400 and 10000 meters (inclusive).

↳ count int

Required. Specifies the maximum number of vehicles to return. The value must be between 1 and 50 (inclusive).

↳ minimum_capacity int

Required. Specifies the number of passengers being considered for a trip. The value must be greater than or equal to one. The driver is not considered in the capacity value.

↳ trip_types array

Required. Represents the type of proposed trip. Must include exactly one type. UNKNOWN_TRIP_TYPE is not allowed. Restricts the search to only those vehicles that can support that trip type.

↳ maximum_staleness Google\Protobuf\Duration

Restricts the search to only those vehicles that have sent location updates to Fleet Engine within the specified duration. Stationary vehicles still transmitting their locations are not considered stale. If this field is not set, the server uses five minutes as the default value.

↳ vehicle_types array<Google\Maps\FleetEngine\V1\Vehicle\VehicleType>

Required. Restricts the search to vehicles with one of the specified types. At least one vehicle type must be specified. VehicleTypes with a category of UNKNOWN are not allowed.

↳ required_attributes array<Google\Maps\FleetEngine\V1\VehicleAttribute>

Callers can form complex logical operations using any combination of the required_attributes, required_one_of_attributes, and required_one_of_attribute_sets fields. required_attributes is a list; required_one_of_attributes uses a message which allows a list of lists. In combination, the two fields allow the composition of this expression: (required_attributes[0] AND required_attributes[1] AND ...) AND (required_one_of_attributes[0][0] OR required_one_of_attributes<xref uid="\1\">1\</xref> OR ...) AND (required_one_of_attributes[1][0] OR required_one_of_attributes<xref uid="\1\">1</xref> OR ...) Restricts the search to only those vehicles with the specified attributes. This field is a conjunction/AND operation. A max of 50 required_attributes is allowed. This matches the maximum number of attributes allowed on a vehicle.

↳ required_one_of_attributes array<Google\Maps\FleetEngine\V1\VehicleAttributeList>

Restricts the search to only those vehicles with at least one of the specified attributes in each VehicleAttributeList. Within each list, a vehicle must match at least one of the attributes. This field is an inclusive disjunction/OR operation in each VehicleAttributeList and a conjunction/AND operation across the collection of VehicleAttributeList.

↳ required_one_of_attribute_sets array<Google\Maps\FleetEngine\V1\VehicleAttributeList>

required_one_of_attribute_sets provides additional functionality. Similar to required_one_of_attributes, required_one_of_attribute_sets uses a message which allows a list of lists, allowing expressions such as this one: (required_attributes[0] AND required_attributes[1] AND ...) AND ( (required_one_of_attribute_sets[0][0] AND required_one_of_attribute_sets<xref uid="\1\">1\</xref> AND ...) OR (required_one_of_attribute_sets[1][0] AND required_one_of_attribute_sets<xref uid="\1\">1</xref> AND ...) ) Restricts the search to only those vehicles with all the attributes in a VehicleAttributeList. Within each list, a vehicle must match all of the attributes. This field is a conjunction/AND operation in each VehicleAttributeList and inclusive disjunction/OR operation across the collection of VehicleAttributeList.

↳ order_by int

Required. Specifies the desired ordering criterion for results.

↳ include_back_to_back bool

This indicates if vehicles with a single active trip are eligible for this search. This field is only used when current_trips_present is unspecified. When current_trips_present is unspecified and this field is false, vehicles with assigned trips are excluded from the search results. When current_trips_present is unspecified and this field is true, search results can include vehicles with one active trip that has a status of ENROUTE_TO_DROPOFF. When current_trips_present is specified, this field cannot be set to true. The default value is false.

↳ trip_id string

Indicates the trip associated with this SearchVehicleRequest.

↳ current_trips_present int

This indicates if vehicles with active trips are eligible for this search. This must be set to something other than CURRENT_TRIPS_PRESENT_UNSPECIFIED if trip_type includes SHARED.

↳ filter string

Optional. A filter query to apply when searching vehicles. See http://aip.dev/160 for examples of the filter syntax. This field is designed to replace the required_attributes, required_one_of_attributes, and required_one_of_attributes_sets fields. If a non-empty value is specified here, the following fields must be empty: required_attributes, required_one_of_attributes, and required_one_of_attributes_sets. This filter functions as an AND clause with other constraints, such as minimum_capacity or vehicle_types. Note that the only queries supported are on vehicle attributes (for example, attributes.<key> = <value> or attributes.<key1> = <value1> AND attributes.<key2> = <value2>). The maximum number of restrictions allowed in a filter query is 50. Also, all attributes are stored as strings, so the only supported comparisons against attributes are string comparisons. In order to compare against number or boolean values, the values must be explicitly quoted to be treated as strings (for example, attributes.<key> = "10" or attributes.<key> = "true").

getHeader

The standard Fleet Engine request header.

Returns
Type Description
Google\Maps\FleetEngine\V1\RequestHeader|null

hasHeader

clearHeader

setHeader

The standard Fleet Engine request header.

Parameter
Name Description
var Google\Maps\FleetEngine\V1\RequestHeader
Returns
Type Description
$this

getParent

Required. Must be in the format providers/{provider}.

The provider must be the Project ID (for example, sample-cloud-project) of the Google Cloud Project of which the service account making this call is a member.

Returns
Type Description
string

setParent

Required. Must be in the format providers/{provider}.

The provider must be the Project ID (for example, sample-cloud-project) of the Google Cloud Project of which the service account making this call is a member.

Parameter
Name Description
var string
Returns
Type Description
$this

getPickupPoint

Required. The pickup point to search near.

Returns
Type Description
Google\Maps\FleetEngine\V1\TerminalLocation|null

hasPickupPoint

clearPickupPoint

setPickupPoint

Required. The pickup point to search near.

Parameter
Name Description
var Google\Maps\FleetEngine\V1\TerminalLocation
Returns
Type Description
$this

getDropoffPoint

The customer's intended dropoff location. The field is required if trip_types contains TripType.SHARED.

Returns
Type Description
Google\Maps\FleetEngine\V1\TerminalLocation|null

hasDropoffPoint

clearDropoffPoint

setDropoffPoint

The customer's intended dropoff location. The field is required if trip_types contains TripType.SHARED.

Parameter
Name Description
var Google\Maps\FleetEngine\V1\TerminalLocation
Returns
Type Description
$this

getPickupRadiusMeters

Required. Defines the vehicle search radius around the pickup point. Only vehicles within the search radius will be returned. Value must be between 400 and 10000 meters (inclusive).

Returns
Type Description
int

setPickupRadiusMeters

Required. Defines the vehicle search radius around the pickup point. Only vehicles within the search radius will be returned. Value must be between 400 and 10000 meters (inclusive).

Parameter
Name Description
var int
Returns
Type Description
$this

getCount

Required. Specifies the maximum number of vehicles to return. The value must be between 1 and 50 (inclusive).

Returns
Type Description
int

setCount

Required. Specifies the maximum number of vehicles to return. The value must be between 1 and 50 (inclusive).

Parameter
Name Description
var int
Returns
Type Description
$this

getMinimumCapacity

Required. Specifies the number of passengers being considered for a trip.

The value must be greater than or equal to one. The driver is not considered in the capacity value.

Returns
Type Description
int

setMinimumCapacity

Required. Specifies the number of passengers being considered for a trip.

The value must be greater than or equal to one. The driver is not considered in the capacity value.

Parameter
Name Description
var int
Returns
Type Description
$this

getTripTypes

Required. Represents the type of proposed trip. Must include exactly one type. UNKNOWN_TRIP_TYPE is not allowed. Restricts the search to only those vehicles that can support that trip type.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setTripTypes

Required. Represents the type of proposed trip. Must include exactly one type. UNKNOWN_TRIP_TYPE is not allowed. Restricts the search to only those vehicles that can support that trip type.

Parameter
Name Description
var int[]
Returns
Type Description
$this

getMaximumStaleness

Restricts the search to only those vehicles that have sent location updates to Fleet Engine within the specified duration. Stationary vehicles still transmitting their locations are not considered stale. If this field is not set, the server uses five minutes as the default value.

Returns
Type Description
Google\Protobuf\Duration|null

hasMaximumStaleness

clearMaximumStaleness

setMaximumStaleness

Restricts the search to only those vehicles that have sent location updates to Fleet Engine within the specified duration. Stationary vehicles still transmitting their locations are not considered stale. If this field is not set, the server uses five minutes as the default value.

Parameter
Name Description
var Google\Protobuf\Duration
Returns
Type Description
$this

getVehicleTypes

Required. Restricts the search to vehicles with one of the specified types.

At least one vehicle type must be specified. VehicleTypes with a category of UNKNOWN are not allowed.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setVehicleTypes

Required. Restricts the search to vehicles with one of the specified types.

At least one vehicle type must be specified. VehicleTypes with a category of UNKNOWN are not allowed.

Parameter
Name Description
var array<Google\Maps\FleetEngine\V1\Vehicle\VehicleType>
Returns
Type Description
$this

getRequiredAttributes

Callers can form complex logical operations using any combination of the required_attributes, required_one_of_attributes, and required_one_of_attribute_sets fields.

required_attributes is a list; required_one_of_attributes uses a message which allows a list of lists. In combination, the two fields allow the composition of this expression:

(required_attributes[0] AND required_attributes[1] AND ...)
AND
(required_one_of_attributes[0][0] OR required_one_of_attributes<xref uid="\1\">1\</xref> OR
...)
AND
(required_one_of_attributes[1][0] OR required_one_of_attributes<xref uid="\1\">1</xref> OR
...)

Restricts the search to only those vehicles with the specified attributes. This field is a conjunction/AND operation. A max of 50 required_attributes is allowed. This matches the maximum number of attributes allowed on a vehicle.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRequiredAttributes

Callers can form complex logical operations using any combination of the required_attributes, required_one_of_attributes, and required_one_of_attribute_sets fields.

required_attributes is a list; required_one_of_attributes uses a message which allows a list of lists. In combination, the two fields allow the composition of this expression:

(required_attributes[0] AND required_attributes[1] AND ...)
AND
(required_one_of_attributes[0][0] OR required_one_of_attributes<xref uid="\1\">1\</xref> OR
...)
AND
(required_one_of_attributes[1][0] OR required_one_of_attributes<xref uid="\1\">1</xref> OR
...)

Restricts the search to only those vehicles with the specified attributes. This field is a conjunction/AND operation. A max of 50 required_attributes is allowed. This matches the maximum number of attributes allowed on a vehicle.

Parameter
Name Description
var array<Google\Maps\FleetEngine\V1\VehicleAttribute>
Returns
Type Description
$this

getRequiredOneOfAttributes

Restricts the search to only those vehicles with at least one of the specified attributes in each VehicleAttributeList. Within each list, a vehicle must match at least one of the attributes. This field is an inclusive disjunction/OR operation in each VehicleAttributeList and a conjunction/AND operation across the collection of VehicleAttributeList.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRequiredOneOfAttributes

Restricts the search to only those vehicles with at least one of the specified attributes in each VehicleAttributeList. Within each list, a vehicle must match at least one of the attributes. This field is an inclusive disjunction/OR operation in each VehicleAttributeList and a conjunction/AND operation across the collection of VehicleAttributeList.

Parameter
Name Description
var array<Google\Maps\FleetEngine\V1\VehicleAttributeList>
Returns
Type Description
$this

getRequiredOneOfAttributeSets

required_one_of_attribute_sets provides additional functionality.

Similar to required_one_of_attributes, required_one_of_attribute_sets uses a message which allows a list of lists, allowing expressions such as this one:

(required_attributes[0] AND required_attributes[1] AND ...)
AND
(
  (required_one_of_attribute_sets[0][0] AND
  required_one_of_attribute_sets<xref uid="\1\">1\</xref> AND
  ...)
  OR
  (required_one_of_attribute_sets[1][0] AND
  required_one_of_attribute_sets<xref uid="\1\">1</xref> AND
  ...)
)

Restricts the search to only those vehicles with all the attributes in a VehicleAttributeList. Within each list, a vehicle must match all of the attributes. This field is a conjunction/AND operation in each VehicleAttributeList and inclusive disjunction/OR operation across the collection of VehicleAttributeList.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setRequiredOneOfAttributeSets

required_one_of_attribute_sets provides additional functionality.

Similar to required_one_of_attributes, required_one_of_attribute_sets uses a message which allows a list of lists, allowing expressions such as this one:

(required_attributes[0] AND required_attributes[1] AND ...)
AND
(
  (required_one_of_attribute_sets[0][0] AND
  required_one_of_attribute_sets<xref uid="\1\">1\</xref> AND
  ...)
  OR
  (required_one_of_attribute_sets[1][0] AND
  required_one_of_attribute_sets<xref uid="\1\">1</xref> AND
  ...)
)

Restricts the search to only those vehicles with all the attributes in a VehicleAttributeList. Within each list, a vehicle must match all of the attributes. This field is a conjunction/AND operation in each VehicleAttributeList and inclusive disjunction/OR operation across the collection of VehicleAttributeList.

Parameter
Name Description
var array<Google\Maps\FleetEngine\V1\VehicleAttributeList>
Returns
Type Description
$this

getOrderBy

Required. Specifies the desired ordering criterion for results.

Returns
Type Description
int

setOrderBy

Required. Specifies the desired ordering criterion for results.

Parameter
Name Description
var int
Returns
Type Description
$this

getIncludeBackToBack

This indicates if vehicles with a single active trip are eligible for this search. This field is only used when current_trips_present is unspecified. When current_trips_present is unspecified and this field is false, vehicles with assigned trips are excluded from the search results. When current_trips_present is unspecified and this field is true, search results can include vehicles with one active trip that has a status of ENROUTE_TO_DROPOFF. When current_trips_present is specified, this field cannot be set to true.

The default value is false.

Returns
Type Description
bool

setIncludeBackToBack

This indicates if vehicles with a single active trip are eligible for this search. This field is only used when current_trips_present is unspecified. When current_trips_present is unspecified and this field is false, vehicles with assigned trips are excluded from the search results. When current_trips_present is unspecified and this field is true, search results can include vehicles with one active trip that has a status of ENROUTE_TO_DROPOFF. When current_trips_present is specified, this field cannot be set to true.

The default value is false.

Parameter
Name Description
var bool
Returns
Type Description
$this

getTripId

Indicates the trip associated with this SearchVehicleRequest.

Returns
Type Description
string

setTripId

Indicates the trip associated with this SearchVehicleRequest.

Parameter
Name Description
var string
Returns
Type Description
$this

getCurrentTripsPresent

This indicates if vehicles with active trips are eligible for this search.

This must be set to something other than CURRENT_TRIPS_PRESENT_UNSPECIFIED if trip_type includes SHARED.

Returns
Type Description
int

setCurrentTripsPresent

This indicates if vehicles with active trips are eligible for this search.

This must be set to something other than CURRENT_TRIPS_PRESENT_UNSPECIFIED if trip_type includes SHARED.

Parameter
Name Description
var int
Returns
Type Description
$this

getFilter

Optional. A filter query to apply when searching vehicles. See http://aip.dev/160 for examples of the filter syntax.

This field is designed to replace the required_attributes, required_one_of_attributes, and required_one_of_attributes_sets fields. If a non-empty value is specified here, the following fields must be empty: required_attributes, required_one_of_attributes, and required_one_of_attributes_sets. This filter functions as an AND clause with other constraints, such as minimum_capacity or vehicle_types. Note that the only queries supported are on vehicle attributes (for example, attributes.<key> = <value> or attributes.<key1> = <value1> AND attributes.<key2> = <value2>). The maximum number of restrictions allowed in a filter query is 50. Also, all attributes are stored as strings, so the only supported comparisons against attributes are string comparisons. In order to compare against number or boolean values, the values must be explicitly quoted to be treated as strings (for example, attributes.<key> = "10" or attributes.<key> = "true").

Returns
Type Description
string

setFilter

Optional. A filter query to apply when searching vehicles. See http://aip.dev/160 for examples of the filter syntax.

This field is designed to replace the required_attributes, required_one_of_attributes, and required_one_of_attributes_sets fields. If a non-empty value is specified here, the following fields must be empty: required_attributes, required_one_of_attributes, and required_one_of_attributes_sets. This filter functions as an AND clause with other constraints, such as minimum_capacity or vehicle_types. Note that the only queries supported are on vehicle attributes (for example, attributes.<key> = <value> or attributes.<key1> = <value1> AND attributes.<key2> = <value2>). The maximum number of restrictions allowed in a filter query is 50. Also, all attributes are stored as strings, so the only supported comparisons against attributes are string comparisons. In order to compare against number or boolean values, the values must be explicitly quoted to be treated as strings (for example, attributes.<key> = "10" or attributes.<key> = "true").

Parameter
Name Description
var string
Returns
Type Description
$this