Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Commit 9a33e56

Browse files
authored
feat: add location proto files. (#84)
* feat: add location proto files. * chore: relabels license header.
1 parent 7b6f917 commit 9a33e56

File tree

2 files changed

+446
-0
lines changed

2 files changed

+446
-0
lines changed

google/cloud/location/locations.proto

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
// Copyright 2022 Google LLC
2+
//
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
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
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.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.location;
18+
19+
import "google/api/annotations.proto";
20+
import "google/protobuf/any.proto";
21+
import "google/api/client.proto";
22+
23+
option cc_enable_arenas = true;
24+
option go_package = "google.golang.org/genproto/googleapis/cloud/location;location";
25+
option java_multiple_files = true;
26+
option java_outer_classname = "LocationsProto";
27+
option java_package = "com.google.cloud.location";
28+
29+
// An abstract interface that provides location-related information for
30+
// a service. Service-specific metadata is provided through the
31+
// [Location.metadata][google.cloud.location.Location.metadata] field.
32+
service Locations {
33+
option (google.api.default_host) = "cloud.googleapis.com";
34+
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
35+
36+
// Lists information about the supported locations for this service.
37+
rpc ListLocations(ListLocationsRequest) returns (ListLocationsResponse) {
38+
option (google.api.http) = {
39+
get: "/v1/{name=locations}"
40+
additional_bindings {
41+
get: "/v1/{name=projects/*}/locations"
42+
}
43+
};
44+
}
45+
46+
// Gets information about a location.
47+
rpc GetLocation(GetLocationRequest) returns (Location) {
48+
option (google.api.http) = {
49+
get: "/v1/{name=locations/*}"
50+
additional_bindings {
51+
get: "/v1/{name=projects/*/locations/*}"
52+
}
53+
};
54+
}
55+
}
56+
57+
// The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
58+
message ListLocationsRequest {
59+
// The resource that owns the locations collection, if applicable.
60+
string name = 1;
61+
62+
// The standard list filter.
63+
string filter = 2;
64+
65+
// The standard list page size.
66+
int32 page_size = 3;
67+
68+
// The standard list page token.
69+
string page_token = 4;
70+
}
71+
72+
// The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
73+
message ListLocationsResponse {
74+
// A list of locations that matches the specified filter in the request.
75+
repeated Location locations = 1;
76+
77+
// The standard List next-page token.
78+
string next_page_token = 2;
79+
}
80+
81+
// The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
82+
message GetLocationRequest {
83+
// Resource name for the location.
84+
string name = 1;
85+
}
86+
87+
// A resource that represents Google Cloud Platform location.
88+
message Location {
89+
// Resource name for the location, which may vary between implementations.
90+
// For example: `"projects/example-project/locations/us-east1"`
91+
string name = 1;
92+
93+
// The canonical id for this location. For example: `"us-east1"`.
94+
string location_id = 4;
95+
96+
// The friendly name for this location, typically a nearby city name.
97+
// For example, "Tokyo".
98+
string display_name = 5;
99+
100+
// Cross-service attributes for the location. For example
101+
//
102+
// {"cloud.googleapis.com/region": "us-east1"}
103+
map<string, string> labels = 2;
104+
105+
// Service-specific metadata. For example the available capacity at the given
106+
// location.
107+
google.protobuf.Any metadata = 3;
108+
}

0 commit comments

Comments
 (0)