1 // Copyright 2018 Google Inc.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
17 package google.cloud.location;
19 import "google/api/annotations.proto";
20 import "google/protobuf/any.proto";
22 option cc_enable_arenas = true;
23 option go_package = "google.golang.org/genproto/googleapis/cloud/location;location";
24 option java_multiple_files = true;
25 option java_outer_classname = "LocationsProto";
26 option java_package = "com.google.cloud.location";
28 // An abstract interface that provides location-related information for
29 // a service. Service-specific metadata is provided through the
30 // [Location.metadata][google.cloud.location.Location.metadata] field.
32 // Lists information about the supported locations for this service.
33 rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) {
34 option (google.api.http) = {
35 get: "/v1/{name=projects/*}/locations"
39 // Gets information about a location.
40 rpc GetLocation(GetLocationRequest) returns (Location) {
41 option (google.api.http) = {
42 get: "/v1/{name=projects/*/locations/*}"
47 // The request message for
48 // [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
49 message ListLocationsRequest {
50 // The resource that owns the locations collection, if applicable.
53 // The standard list filter.
56 // The standard list page size.
59 // The standard list page token.
60 string page_token = 4;
63 // The response message for
64 // [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
65 message ListLocationsResponse {
66 // A list of locations that matches the specified filter in the request.
67 repeated Location locations = 1;
69 // The standard List next-page token.
70 string next_page_token = 2;
73 // The request message for
74 // [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
75 message GetLocationRequest {
76 // Resource name for the location.
80 // A resource that represents Google Cloud Platform location.
82 // Resource name for the location, which may vary between implementations.
83 // For example: `"projects/example-project/locations/us-east1"`
86 // The canonical id for this location. For example: `"us-east1"`.
87 string location_id = 4;
89 // The friendly name for this location, typically a nearby city name.
90 // For example, "Tokyo".
91 string display_name = 5;
93 // Cross-service attributes for the location. For example
95 // {"cloud.googleapis.com/region": "us-east1"}
96 map<string, string> labels = 2;
98 // Service-specific metadata. For example the available capacity at the given
100 google.protobuf.Any metadata = 3;