locations.proto 3.5 KB

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