# Google Maps FleetEngine V1 Client - Class ListVehiclesRequest (0.5.3)

0.5.3 (latest) 0.5.2 0.4.1 0.3.1 0.2.0 0.1.6 Reference documentation and code samples for the Google Maps FleetEngine V1 Client class ListVehiclesRequest.

`ListVehicles` request message.

Generated from protobuf message `maps.fleetengine.v1.ListVehiclesRequest`

## Namespace

Google \\ Maps \\ FleetEngine \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ header` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/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. |
| `↳ page_size` | `int` The maximum number of vehicles to return. Default value: 100. |
| `↳ page_token` | `string` The value of the `next_page_token` provided by a previous call to `ListVehicles` so that you can paginate through groups of vehicles. The value is undefined if the filter criteria of the request is not the same as the filter criteria for the previous call to `ListVehicles`. |
| `↳ minimum_capacity` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` Specifies the required minimum capacity of the vehicle. All vehicles returned will have a `maximum_capacity` greater than or equal to this value. If set, must be greater or equal to 0. |
| `↳ trip_types` | `int[]` Restricts the response to vehicles that support at least one of the specified trip types. |
| `↳ maximum_staleness` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` Restricts the response to vehicles that have sent location updates to Fleet Engine within the specified duration. Stationary vehicles still transmitting their locations are not considered stale. If present, must be a valid positive duration. |
| `↳ vehicle_type_categories` | `int[]` Required. Restricts the response to vehicles with one of the specified type categories. `UNKNOWN` is not allowed. |
| `↳ required_attributes` | `string[]` 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\">0</xref> OR ...) AND (required_one_of_attributes[1][0] OR required_one_of_attributes<xref uid="\1\">1</xref> OR ...)` Restricts the response to 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. Each repeated string should be of the format "key:value". |
| `↳ required_one_of_attributes` | `string[]` Restricts the response to 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`. Each repeated string should be of the format "key1:value1\|key2:value2\|key3:value3". |
| `↳ required_one_of_attribute_sets` | `string[]` `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\">0</xref> AND ...) OR (required_one_of_attribute_sets[1][0] AND required_one_of_attribute_sets<xref uid="\1\">1</xref> AND ...) )` Restricts the response to vehicles that match 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`. Each repeated string should be of the format "key1:value1\|key2:value2\|key3:value3". |
| `↳ vehicle_state` | `int` Restricts the response to vehicles that have this vehicle state. |
| `↳ on_trip_only` | `bool` Only return the vehicles with current trip(s). |
| `↳ filter` | `string` Optional. A filter query to apply when listing 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 `vehicle_state` or `on_trip_only`. 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"`). |
| `↳ viewport` | `https://docs.cloud.google.com/php/docs/reference/geo-common-protos/latest/Type.Viewport.html` Optional. A filter that limits the vehicles returned to those whose last known location was in the rectangular area defined by the viewport. |

### getHeader

The standard Fleet Engine request header.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/V1.RequestHeader|null` |   |

### hasHeader

### clearHeader

### setHeader

The standard Fleet Engine request header.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/maps-fleetengine/latest/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` |   |

### getPageSize

The maximum number of vehicles to return.

Default value: 100.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setPageSize

The maximum number of vehicles to return.

Default value: 100.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPageToken

The value of the `next_page_token` provided by a previous call to
`ListVehicles` so that you can paginate through groups of vehicles. The
value is undefined if the filter criteria of the request is not the same as
the filter criteria for the previous call to `ListVehicles`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setPageToken

The value of the `next_page_token` provided by a previous call to
`ListVehicles` so that you can paginate through groups of vehicles. The
value is undefined if the filter criteria of the request is not the same as
the filter criteria for the previous call to `ListVehicles`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMinimumCapacity

Specifies the required minimum capacity of the vehicle. All vehicles
returned will have a `maximum_capacity` greater than or equal to this
value. If set, must be greater or equal to 0.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value|null` |   |

### hasMinimumCapacity

### clearMinimumCapacity

### getMinimumCapacityUnwrapped

Returns the unboxed value from `getMinimumCapacity()`

Specifies the required minimum capacity of the vehicle. All vehicles
returned will have a `maximum_capacity` greater than or equal to this
value. If set, must be greater or equal to 0.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int|null` |   |

### setMinimumCapacity

Specifies the required minimum capacity of the vehicle. All vehicles
returned will have a `maximum_capacity` greater than or equal to this
value. If set, must be greater or equal to 0.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Int32Value` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### setMinimumCapacityUnwrapped

Sets the field by wrapping a primitive type in a Google\\Protobuf\\Int32Value object.

Specifies the required minimum capacity of the vehicle. All vehicles
returned will have a `maximum_capacity` greater than or equal to this
value. If set, must be greater or equal to 0.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int|null` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTripTypes

Restricts the response to vehicles that support at least one of the
specified trip types.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setTripTypes

Restricts the response to vehicles that support at least one of the
specified trip types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getMaximumStaleness

Restricts the response to vehicles that have sent location updates to Fleet
Engine within the specified duration. Stationary vehicles still
transmitting their locations are not considered stale. If present, must be
a valid positive duration.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration|null` |   |

### hasMaximumStaleness

### clearMaximumStaleness

### setMaximumStaleness

Restricts the response to vehicles that have sent location updates to Fleet
Engine within the specified duration. Stationary vehicles still
transmitting their locations are not considered stale. If present, must be
a valid positive duration.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Duration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehicleTypeCategories

Required. Restricts the response to vehicles with one of the specified type
categories. `UNKNOWN` is not allowed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setVehicleTypeCategories

Required. Restricts the response to vehicles with one of the specified type
categories. `UNKNOWN` is not allowed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

| **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\">0</xref> OR
    ...)
    AND
    (required_one_of_attributes[1][0] OR required_one_of_attributes<xref uid="\1\">1</xref> OR
    ...)

Restricts the response to 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. Each repeated string should be of the format "key:value".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### 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\">0</xref> OR
    ...)
    AND
    (required_one_of_attributes[1][0] OR required_one_of_attributes<xref uid="\1\">1</xref> OR
    ...)

Restricts the response to 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. Each repeated string should be of the format "key:value".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRequiredOneOfAttributes

Restricts the response to 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`.

Each repeated string should be of the format
"key1:value1\|key2:value2\|key3:value3".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setRequiredOneOfAttributes

Restricts the response to 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`.

Each repeated string should be of the format
"key1:value1\|key2:value2\|key3:value3".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **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\">0</xref> AND
      ...)
      OR
      (required_one_of_attribute_sets[1][0] AND
      required_one_of_attribute_sets<xref uid="\1\">1</xref> AND
      ...)
    )

Restricts the response to vehicles that match 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`. Each repeated string should be of the
format "key1:value1\|key2:value2\|key3:value3".

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### 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\">0</xref> AND
      ...)
      OR
      (required_one_of_attribute_sets[1][0] AND
      required_one_of_attribute_sets<xref uid="\1\">1</xref> AND
      ...)
    )

Restricts the response to vehicles that match 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`. Each repeated string should be of the
format "key1:value1\|key2:value2\|key3:value3".

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string[]` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVehicleState

Restricts the response to vehicles that have this vehicle state.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setVehicleState

Restricts the response to vehicles that have this vehicle state.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getOnTripOnly

Only return the vehicles with current trip(s).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setOnTripOnly

Only return the vehicles with current trip(s).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getFilter

Optional. A filter query to apply when listing 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 `vehicle_state` or `on_trip_only`.
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 listing 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 `vehicle_state` or `on_trip_only`.
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` |   |

### getViewport

Optional. A filter that limits the vehicles returned to those whose last
known location was in the rectangular area defined by the viewport.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/geo-common-protos/latest/Type.Viewport.html|null` |   |

### hasViewport

### clearViewport

### setViewport

Optional. A filter that limits the vehicles returned to those whose last
known location was in the rectangular area defined by the viewport.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/geo-common-protos/latest/Type.Viewport.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |