Package google.maps.roads.selection.v1

索引

RoadsSelection

Roads Selection API 的服務定義。

BatchCreateSelectedRoutes

rpc BatchCreateSelectedRoutes(BatchCreateSelectedRoutesRequest) returns (BatchCreateSelectedRoutesResponse)

建立多個 SelectedRoute,並啟動排程,定期擷取每個路徑的快取資訊。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
CreateSelectedRoute

rpc CreateSelectedRoute(CreateSelectedRouteRequest) returns (SelectedRoute)

建立 SelectedRoute,並啟動排程,定期擷取路線的快取資訊。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
DeleteSelectedRoute

rpc DeleteSelectedRoute(DeleteSelectedRouteRequest) returns (Empty)

刪除指定專案的指定 SelectedRoute。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
GetSelectedRoute

rpc GetSelectedRoute(GetSelectedRouteRequest) returns (SelectedRoute)

取得指定名稱的 SelectedRoute。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
ListSelectedRoutes

rpc ListSelectedRoutes(ListSelectedRoutesRequest) returns (ListSelectedRoutesResponse)

列出指定專案的所有 SelectedRoute,並提供分頁功能。

授權範圍

需要下列 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform

BatchCreateSelectedRoutesRequest

要求建立多個 SelectedRoute

欄位
parent

string

(選用步驟) 所有選定路徑共用的專案資源。格式:projects/{project} 如果設定此值,CreateSelectedRouteRequest 訊息中的父項欄位必須為空白或與此欄位相符。

requests[]

CreateSelectedRouteRequest

必要欄位。要求訊息,指定要建立的所選路徑。批次建立的路線最多可達 1000 條。

BatchCreateSelectedRoutesResponse

建立多個 SelectedRoute 的回應。

欄位
selected_routes[]

SelectedRoute

已建立 SelectedRoutes。

CreateSelectedRouteRequest

建立 SelectedRoute 的要求。

欄位
parent

string

必要欄位。SelectedRoute 的建立專案。格式:projects/{project}

selected_route

SelectedRoute

必要欄位。要建立的 SelectedRoute

selected_route_id

string

(選用步驟) 要用於 SelectedRoute 的 ID,會成為 SelectedRoute 資源名稱的最終元件。

這個值的長度應為 4 至 63 個字元,有效字元為「a-z」、「A-Z」、「0-9」或「-」。如果未提供或為空白,系統會在資源建立後產生 UUID。

DeleteSelectedRouteRequest

要求刪除 SelectedRoute

欄位
name

string

必要欄位。要刪除的 SelectedRoute 名稱。格式:projects/{project}/selectedRoutes/{selected_route}

GetSelectedRouteRequest

要求取得 SelectedRoute

欄位
name

string

必要欄位。要擷取的 SelectedRoute 名稱。格式:projects/{project}/selectedRoutes/{selected_route}

ListSelectedRoutesRequest

要求列出 SelectedRoute

欄位
parent

string

必要欄位。父項,也就是要從中查詢所有 SelectedRoute 的專案。格式:projects/{project}/selectedRoutes

page_size

int32

(選用步驟) 特定頁面應傳回的結果數量。如未設定,預設值為 100。如果值為 0,系統會將值設為預設值。最大值為 5000,任何大於 5000 的值都會設為 5000。

page_token

string

(選用步驟) 屬於接收自前一個 ListSelectedRoutes 呼叫的網頁權杖。

ListSelectedRoutesResponse

列出 SelectedRoute 的回應。

欄位
selected_routes[]

SelectedRoute

儲存在要求中指定專案的 SelectedRoutes 頁面。

next_page_token

string

可做為 page_token 傳送的權杖,用於擷取後續網頁。如果這個欄位留空,表示沒有後續網頁。

SelectedRoute

SelectedRoute 代表客戶想定期擷取資訊 (例如時長) 的特定路線,適用於合約用途。

欄位
name

string

ID。SelectedRoute 的資源名稱。

格式:projects/{project}/selectedRoutes/{selected_route}

display_name

string

(選用步驟) 路徑的顯示名稱。這是選填欄位,顧客可自行填寫。這個名稱不必是專屬名稱。

create_time

Timestamp

僅供輸出。所選路徑的首次建立時間。

state

State

僅供輸出。所選路徑的狀態。

route_attributes

map<string, string>

(選用步驟) 所選路線的自訂屬性。新增這些屬性後,在擷取歷史和即時路線資訊時,即可篩選 / 分組路線。每條路線最多可支援 10 個屬性。每個鍵和值都應為非空白字串,且最多可有 100 個字元。金鑰開頭不得為「goog」。

聯集欄位 route_type。目前僅支援 DynamicRouteroute_type 只能是下列其中一項:
dynamic_route

DynamicRoute

SelectedRoute 是動態路徑。

validation_error

ValidationError

僅供輸出。當狀態為 STATE_INVALID 時,所選路線的驗證錯誤。

DynamicRoute

這代表包含路線控點 (起點、目的地和中途點) 的路線。實際路線保證會經過所有路線控點,但可能會因路況變化而有所不同。

欄位
origin

LatLng

必要欄位。路線的起點位置。

destination

LatLng

必要欄位。路線的終點。

intermediates[]

LatLng

(選用步驟) 路徑上的一組中繼路線控點 (不含終點)。這些點一律是經過的點。最多可新增 25 個中繼路線控點。正確新增這些點可減少實際路線的變異。

所選路徑的狀態。

列舉
STATE_UNSPECIFIED 這條路線的狀態未設定。
STATE_SCHEDULING 路線已建立並排定行程。
STATE_RUNNING 路線已建立並啟用排程。
STATE_DELETING 路線已標示為待刪除。
STATE_VALIDATING 路線正在驗證中。
STATE_INVALID 根據其中一項驗證條件,路線無效。

ValidationError

所選路線的驗證錯誤。

列舉
VALIDATION_ERROR_UNSPECIFIED 未設定這條路徑的驗證錯誤。
VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION 路線不在專案管轄範圍內。
VALIDATION_ERROR_LOW_ROAD_USAGE 路線的道路使用率偏低 (很少人經過)。