## Index

- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.RoadsSelection` (interface)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchCreateSelectedRoutesRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchCreateSelectedRoutesResponse` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchDeleteSelectedRoutesRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchUpdateSelectedRoutesRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchUpdateSelectedRoutesResponse` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.CreateSelectedRouteRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.DeleteSelectedRouteRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.GetSelectedRouteRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.ListSelectedRoutesRequest` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.ListSelectedRoutesResponse` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.DynamicRoute` (message)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.State` (enum)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.ValidationError` (enum)
- `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.UpdateSelectedRouteRequest` (message)

## RoadsSelection

Service definition for the Roads Selection API.

| BatchCreateSelectedRoutes |
|---|
| `` rpc BatchCreateSelectedRoutes(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchCreateSelectedRoutesRequest`) returns (`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchCreateSelectedRoutesResponse`) `` Creates multiple `SelectedRoute` resources and starts a schedule to periodically retrieve cache information for each of the routes. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource: - `roads.selectedRoutes.batchCreate` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| BatchDeleteSelectedRoutes |
|---|
| `` rpc BatchDeleteSelectedRoutes(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchDeleteSelectedRoutesRequest`) returns (`https://protobuf.dev/reference/protobuf/google.protobuf#empty`) `` Deletes multiple `SelectedRoute` resources for the specified project. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource: - `roads.selectedRoutes.batchDelete` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| BatchUpdateSelectedRoutes |
|---|
| `` rpc BatchUpdateSelectedRoutes(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchUpdateSelectedRoutesRequest`) returns (`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.BatchUpdateSelectedRoutesResponse`) `` Updates multiple `SelectedRoute` resources as specified by their names. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource: - `roads.selectedRoutes.batchUpdate` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| CreateSelectedRoute |
|---|
| `` rpc CreateSelectedRoute(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.CreateSelectedRouteRequest`) returns (`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute`) `` Creates a SelectedRoute and starts a schedule to periodically retrieve cache information for the route. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource: - `roads.selectedRoutes.create` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| DeleteSelectedRoute |
|---|
| `` rpc DeleteSelectedRoute(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.DeleteSelectedRouteRequest`) returns (`https://protobuf.dev/reference/protobuf/google.protobuf#empty`) `` Deletes the specified SelectedRoute for the specified project. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource: - `roads.selectedRoutes.delete` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| GetSelectedRoute |
|---|
| `` rpc GetSelectedRoute(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.GetSelectedRouteRequest`) returns (`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute`) `` Gets a SelectedRoute as specified by its name. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource: - `roads.selectedRoutes.get` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| ListSelectedRoutes |
|---|
| `` rpc ListSelectedRoutes(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.ListSelectedRoutesRequest`) returns (`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.ListSelectedRoutesResponse`) `` Lists all `SelectedRoute` resources for the specified project with pagination. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource: - `roads.selectedRoutes.list` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

| UpdateSelectedRoute |
|---|
| `` rpc UpdateSelectedRoute(`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.UpdateSelectedRouteRequest`) returns (`https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute`) `` Updates a SelectedRoute as specified by its name. Authorization scopes :   Requires the following OAuth scope: - `https://www.googleapis.com/auth/cloud-platform` IAM Permissions :   Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `name` resource: - `roads.selectedRoutes.update` For more information, see the [IAM documentation](https://cloud.google.com/iam/docs). |

## BatchCreateSelectedRoutesRequest

Request to create multiple `SelectedRoute`s.

| Fields ||
|---|---|
| `parent` | `string` Required. The project resource shared by all selected routes in the batch. It's required because the batch request supports only a single `parent`. Format: projects/{project} |
| `requests[]` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.CreateSelectedRouteRequest` Required. The request message specifying the selected route to create. A maximum of 1,000 selected routes can be created in a batch. The parent resource of each request must either be empty or match the top-level `parent`. |

## BatchCreateSelectedRoutesResponse

Response from creating multiple `SelectedRoute`s.

| Fields ||
|---|---|
| `selected_routes[]` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute` `SelectedRoute` resources created. |

## BatchDeleteSelectedRoutesRequest

Request to delete multiple `SelectedRoute`s.

| Fields ||
|---|---|
| `parent` | `string` Required. The project resource shared by all selected routes to delete. It's required because the batch request supports only a single `parent`. Format: projects/{project} |
| `names[]` | `string` Required. The names of the selected routes to delete. A maximum of 1,000 selected routes can be deleted in a batch. Format: projects/{project}/selectedRoutes/{selected_route} |

## BatchUpdateSelectedRoutesRequest

Request to update multiple `SelectedRoute`s.

| Fields ||
|---|---|
| `parent` | `string` Required. The project resource shared by all selected routes in the batch. It's required because the batch request supports only a single `parent`. Format: projects/{project} |
| `requests[]` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.UpdateSelectedRouteRequest` Required. The request message specifying the selected route to update. A maximum of 1,000 selected routes can be updated in a batch. The parent resource of each request must either be empty or match the top-level `parent`. |
| `update_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` Optional. The list of fields to update shared by all child requests in the batch. Field paths are relative to `SelectedRoute`. You should only update `display_name`, `route_attributes`, `dynamic_routing`, and `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.FIELDS.google.maps.roads.selection.v1.SelectedRoute.DynamicRoute.google.maps.roads.selection.v1.SelectedRoute.dynamic_route` (including `origin`, `destination`, and `intermediates`). Example: `"display_name,route_attributes,dynamic_routing,dynamic_route"`. If set, this `update_mask` applies to any child requests that do not specify their own `update_mask`. If `*` is specified, a full replacement for all updatable fields is performed. If both batch and child request level `update_mask` fields are set, they must match. If omitted, the child request's `update_mask` will take effect. If a child request's `update_mask` is also omitted, all updatable fields that are populated in the child request's `selected_route` are implied to be updated. |

## BatchUpdateSelectedRoutesResponse

Response from updating multiple `SelectedRoute`s.

| Fields ||
|---|---|
| `selected_routes[]` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute` `SelectedRoute` resources updated. |

## CreateSelectedRouteRequest

Request to create a `SelectedRoute`.

| Fields ||
|---|---|
| `parent` | `string` Required. The project that the `SelectedRoute` will be created under. Format: projects/{project} |
| `selected_route` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute` Required. The `SelectedRoute` to create. |
| `selected_route_id` | `string` Optional. The ID to use for the `SelectedRoute`, which will become the final component of the `SelectedRoute`'s resource name. This value should be 4-63 characters, and valid characters are "a-z", "A-Z", "0-9", "-", or "_". If it is not provided or empty, a UUID will be generated after resource creation. |

## DeleteSelectedRouteRequest

Request to delete a `SelectedRoute`.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the SelectedRoute to delete. Format: projects/{project}/selectedRoutes/{selected_route} |

## GetSelectedRouteRequest

Request to get a `SelectedRoute`.

| Fields ||
|---|---|
| `name` | `string` Required. The name of the `SelectedRoute` to retrieve. Format: projects/{project}/selectedRoutes/{selected_route} |

## ListSelectedRoutesRequest

Request to list `SelectedRoute`s.

| Fields ||
|---|---|
| `parent` | `string` Required. The `parent`, which is the project that all `SelectedRoute`s will be queried from. Format: projects/{project}/selectedRoutes |
| `page_size` | `int32` Optional. The number of results that should be returned for a given page. If not set, the default value is 100. When a value of 0 is given, the value is set to the default. The maximum value is 5,000; any value above 5,000 is set to 5,000. |
| `page_token` | `string` Optional. A page token, received from a previous `ListSelectedRoutes` call. |

## ListSelectedRoutesResponse

Response that lists `SelectedRoute`s.

| Fields ||
|---|---|
| `selected_routes[]` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute` A page of `SelectedRoute` resources stored in the project specified in the request. |
| `next_page_token` | `string` Token that can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages. |

## SelectedRoute

A SelectedRoute represents a specific route that a customer wants to periodically retrieve information (e.g. duration) for contracted use cases.

| Fields ||
|---|---|
| `name` | `string` Identifier. Resource name of the `SelectedRoute`. Format: projects/{project}/selectedRoutes/{selected_route} |
| `display_name` | `string` Optional. Display name of the route. This is an optional field that can be used by the customer. It does not have to be unique. The length is limited to 100 characters (counted in Unicode code points). |
| `create_time` | `https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` Output only. Time when the selected route was first created. |
| `state` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.State` Output only. The state of the selected route. |
| `route_attributes` | `map<string, string>` Optional. The custom attributes for the selected route. Adding them allows filtering or grouping of the routes when retrieving historical and real-time routes information. Up to 25 attributes are supported per route. Each key and value should be a non-empty string and can have up to 100 characters (counted in Unicode code points). The keys must not start with `goog`. |
| Union field `route_type`. Only `DynamicRoute` is supported. `route_type` can be only one of the following: ||
| `dynamic_route` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.DynamicRoute` The `SelectedRoute` is a dynamic route. |
| `validation_error` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.ValidationError` Output only. The validation error for the selected route when the state is STATE_INVALID. |
| `dynamic_routing` | `bool` Optional. If set to `true`, the selected route can dynamically reroute based on the live traffic according to the input waypoints. If set to `false`, the selected route will be a fixed route that is agnostic to live traffic and follows the traffic-unaware path computed at creation time. If omitted, the value will be `false` by default indicating it is a fixed route. |

## DynamicRoute

This represents a route with waypoints (origin, destination, and intermediates). The actual route is guaranteed to pass all the waypoints. If `dynamic_routing` is set to `false`, the actual route remains fixed regardless of traffic conditions. Otherwise if `dynamic_routing` is set to `true`, the actual route can change based on the traffic conditions.

| Fields ||
|---|---|
| `origin` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.type#google.type.LatLng` Required. Origin location of the route. |
| `destination` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.type#google.type.LatLng` Required. Ending location of the route. |
| `intermediates[]` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.type#google.type.LatLng` Optional. A set of intermediate waypoints along the route (excluding terminal points). They are always passing-by points. Up to 25 intermediate waypoints are supported. Adding them properly can reduce the variation of actual route from time to time. |

## State

The state of the selected route.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | The state of this route is not set. |
| `STATE_SCHEDULING` | The route has been created and is being scheduled. |
| `STATE_RUNNING` | The route has been created and has an active schedule. |
| `STATE_DELETING` | The route has been marked for deletion. |
| `STATE_VALIDATING` | The route is in the process of being validated. |
| `STATE_INVALID` | The route is invalid based on one of the validation criteria. |

## ValidationError

The validation error for the selected route.

| Enums ||
|---|---|
| `VALIDATION_ERROR_UNSPECIFIED` | The validation error of this route is not set. |
| `VALIDATION_ERROR_ROUTE_OUTSIDE_JURISDICTION` | The route is outside the jurisdiction of the project. |
| `VALIDATION_ERROR_LOW_ROAD_USAGE` | The route has low road usage (very few people pass through it). |

## UpdateSelectedRouteRequest

Request to update a `SelectedRoute`.

| Fields ||
|---|---|
| `selected_route` | `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute` Required. The `SelectedRoute` to update. The route's `name` field is used to identify the route to update. Format: projects/{project}/selectedRoutes/{selected_route} |
| `update_mask` | `https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` Optional. The list of fields to update. Field paths are relative to `SelectedRoute`. You should only update `display_name`, `route_attributes`, `dynamic_routing`, and `https://developers.google.com/maps/documentation/roads-management-insights/reference/rpc/google.maps.roads.selection.v1#google.maps.roads.selection.v1.SelectedRoute.FIELDS.google.maps.roads.selection.v1.SelectedRoute.DynamicRoute.google.maps.roads.selection.v1.SelectedRoute.dynamic_route` (including `origin`, `destination`, and `intermediates`). Example: `"display_name,route_attributes,dynamic_routing,dynamic_route"`. If `*` is specified, a full replacement for all updatable fields is performed. If `update_mask` is omitted, all updatable fields that are populated in `selected_route` are implied to be updated. |