Method: providers.vehicles.list
リクエストのオプションに一致するプロバイダに関連付けられている車両を、ページ分けされたリストで返します。
HTTP リクエスト
GET https://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
parent |
string
必須。providers/{provider} の形式で指定してください。プロバイダは、この呼び出しを行うサービス アカウントがメンバーになっている Google Cloud プロジェクトのプロジェクト ID(sample-cloud-project など)にする必要があります。
|
クエリ パラメータ
パラメータ |
header |
object (RequestHeader )
標準の Fleet Engine リクエスト ヘッダー。
|
pageSize |
integer
返される車両の最大数。デフォルト値: 100。
|
pageToken |
string
車両のグループをページネーションできるように、前の vehicles.list 呼び出しで提供された nextPageToken の値。リクエストのフィルタ条件が、vehicles.list の前の呼び出しのフィルタ条件と異なる場合、値は未定義です。
|
minimumCapacity |
integer
車両に必要な最小容量を指定します。返されるすべての車両の maximumCapacity は、この値以上になります。設定する場合は 0 以上にする必要があります。
|
tripTypes[] |
enum (TripType )
指定したルートタイプの 1 つ以上をサポートする車両にレスポンスを限定します。
|
maximumStaleness |
string (Duration format)
指定された期間内に Fleet Engine に位置情報の更新を送信した車両へのレスポンスを制限します。位置情報を送信し続けている駐車中の車両は、古い位置情報とは見なされません。指定する場合は、有効な正の期間である必要があります。 s で終わる小数 9 桁までの秒単位の期間。例: "3.5s" 。
|
vehicleTypeCategories[] |
enum (Category )
必須。指定されたタイプカテゴリのいずれかを持つ車両へのレスポンスを制限します。UNKNOWN は許可されていません。
|
requiredAttributes[] |
string
呼び出し元は、requiredAttributes フィールド、requiredOneOfAttributes フィールド、requiredOneOfAttributeSets フィールドの任意の組み合わせを使用して、複雑な論理演算を作成できます。 requiredAttributes はリストです。requiredOneOfAttributes はリストのリストを許可するメッセージを使用します。2 つのフィールドを組み合わせることで、次の式を作成できます。
(requiredAttributes[0] AND requiredAttributes[1] AND ...)
AND
(requiredOneOfAttributes[0][0] OR requiredOneOfAttributes[0][1] OR
...)
AND
(requiredOneOfAttributes[1][0] OR requiredOneOfAttributes[1][1] OR
...)
指定された属性を持つ車両にレスポンスを制限します。このフィールドは論理積(AND)演算です。requiredAttributes は最大 50 個まで指定できます。車両で許可される最大属性数と一致します。繰り返し使用する文字列は、すべて「key:value」形式にする必要があります。
|
requiredOneOfAttributes[] |
string
各 VehicleAttributeList で指定された属性の少なくとも 1 つを持つ車両にレスポンスを制限します。各リスト内で、車両は少なくとも 1 つの属性に一致する必要があります。このフィールドは、各 VehicleAttributeList での包括的な分離/OR 演算と、VehicleAttributeList のコレクション全体の結合/AND 演算です。繰り返される各文字列は、「key1:value1|key2:value2|key3:value3」の形式にする必要があります。
|
requiredOneOfAttributeSets[] |
string
requiredOneOfAttributeSets は追加機能を提供します。
requiredOneOfAttributes と同様に、requiredOneOfAttributeSets はリストのリストを許可するメッセージを使用します。これにより、次のような式を使用できます。
(requiredAttributes[0] AND requiredAttributes[1] AND ...)
AND
(
(requiredOneOfAttributeSets[0][0] AND
requiredOneOfAttributeSets[0][1] AND
...)
OR
(requiredOneOfAttributeSets[1][0] AND
requiredOneOfAttributeSets[1][1] AND
...)
)
レスポンスを、VehicleAttributeList のすべての属性に一致する車両に制限します。各リスト内で、車両はすべての属性に一致する必要があります。このフィールドは、各 VehicleAttributeList の連結演算子(AND)と、VehicleAttributeList のコレクション全体の包含排除演算子(OR)です。繰り返し使用する文字列は、それぞれ「key1:value1|key2:value2|key3:value3」の形式にする必要があります。
|
vehicleState |
enum (VehicleState )
この車両状態を持つ車両へのレスポンスを制限します。
|
onTripOnly |
boolean
現在のルートがある車両のみを返します。
|
filter |
string
省略可。車両をリストするときに適用するフィルタクエリ。フィルタ構文の例については、http://aip.dev/160 をご覧ください。 このフィールドは、requiredAttributes 、requiredOneOfAttributes 、required_one_of_attributes_sets フィールドに代わるものです。ここで空でない値を指定する場合、requiredAttributes 、requiredOneOfAttributes 、required_one_of_attributes_sets の各フィールドは空にする必要があります。 このフィルタは、vehicleState や onTripOnly などの他の制約とともに AND 句として機能します。 サポートされているクエリは、車両属性(attributes.<key> = <value> や attributes.<key1> = <value1> AND
attributes.<key2> = <value2> など)に対するクエリのみです。フィルタクエリで許可される制限の最大数は 50 です。 また、すべての属性は文字列として保存されるため、属性に対してサポートされている比較は文字列比較のみです。数値やブール値と比較するには、値を文字列として扱うために明示的に引用符で囲む必要があります(例: attributes.<key> = "10" 、attributes.<key> = "true" )。
|
viewport |
object (Viewport )
省略可。ビューポートで定義された長方形のエリア内に直近の位置情報がある車両のみを返すフィルタ。
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
vehicles.list
レスポンス メッセージ。
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"vehicles": [
{
object (Vehicle )
}
],
"nextPageToken": string,
"totalSize": string
} |
フィールド |
vehicles[] |
object (Vehicle )
リクエストの条件に一致する車両。返される車両の最大数は、リクエストの pageSize フィールドによって決まります。
|
nextPageToken |
string
車両の次のページを取得するためのトークン。リクエスト条件を満たす車両がこれ以上ない場合は空です。
|
totalSize |
string (int64 format)
必須。すべてのページにわたってリクエスト条件に一致する車両の総数。
|
ビューポート
緯度と経度のビューポート。対角線上の 2 つの low
ポイントと high
ポイントで表されます。ビューポートは閉じた領域、つまりその境界線を含む領域と見なされます。緯度の範囲は -90~90 度、経度の範囲は -180~180 度の範囲内で指定する必要があります。さまざまなケースには次のようなものがあります。
low
= high
の場合、ビューポートは単一のポイントで構成されます。
low.longitude
> high.longitude
の場合、経度の範囲は反転します(ビューポートは 180 度の経度線と交差します)。
low.longitude
= -180 度、high.longitude
= 180 度の場合、ビューポートにはすべての経度が含まれます。
low.longitude
= 180 度、high.longitude
= -180 度の場合、経度の範囲は空になります。
low.latitude
> high.latitude
の場合、緯度範囲は空になります。
low
と high
の両方に値を入力する必要があります。また、(上記の定義で指定されているように)表されるボックスを空にすることはできません。ビューポートが空の場合、エラーが発生します。
たとえば、次のビューポートはニューヨーク市を完全に囲んでいます。
{ "low": { "latitude": 40.477398, "longitude": -74.259087 }, "high": { "latitude": 40.91618, "longitude": -73.70018 } }
JSON 表現 |
{
"low": {
object (LatLng )
},
"high": {
object (LatLng )
}
} |
フィールド |
low |
object (LatLng )
必須。ビューポートの低い部分。
|
high |
object (LatLng )
必須。ビューポートの高さ。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-06 UTC。
[null,null,["最終更新日 2024-11-06 UTC。"],[[["Retrieves a paginated list of vehicles associated with a provider, filtered by various criteria such as capacity, trip types, vehicle state, and attributes."],["Allows filtering by a specified geographic viewport, ensuring vehicles are within a defined rectangular area."],["Supports complex logical operations for filtering based on vehicle attributes, allowing for flexible and specific vehicle selection."],["Returns vehicle details including current state, supported trip types, and attributes, along with pagination information for accessing subsequent result pages."],["Requires specifying the provider (Project ID) in the request path and accepts an optional request header for standard Fleet Engine requests."]]],["This document details how to retrieve a paginated list of vehicles via a `GET` HTTP request to `https://fleetengine.googleapis.com/v1/{parent=providers/*}/vehicles`. The `parent` path parameter is required, defining the provider. Query parameters can filter results by: header, page size/token, minimum capacity, trip types, maximum staleness, vehicle type categories, attributes, state, current trips, and a filter. Optionally, a viewport parameter limits results to vehicles within a geographic area. The empty request body will return a response body that includes a list of vehicles, a next page token, and the total size of vehicles.\n"]]