codekingpro/portable-devtools
114k
1// Copyright 2020 Google LLC2//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 at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// 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 and13// limitations under the License.14 15syntax = "proto3";16 17package google.cloud.location;18 19import "google/api/annotations.proto";20import "google/protobuf/any.proto";21import "google/api/client.proto";22 23option cc_enable_arenas = true;24option go_package = "google.golang.org/genproto/googleapis/cloud/location;location";25option java_multiple_files = true;26option java_outer_classname = "LocationsProto";27option java_package = "com.google.cloud.location";28 29// An abstract interface that provides location-related information for30// a service. Service-specific metadata is provided through the31// [Location.metadata][google.cloud.location.Location.metadata] field.32service 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].58message 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].73message 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].82message GetLocationRequest {83 // Resource name for the location.84 string name = 1;85}86 87// A resource that represents Google Cloud Platform location.88message 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 example101 //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 given106 // location.107 google.protobuf.Any metadata = 3;108}109 