label_service.proto 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. syntax = "proto3";
  15. package google.apps.drive.labels.v2;
  16. import "google/api/annotations.proto";
  17. import "google/api/client.proto";
  18. import "google/apps/drive/labels/v2/label.proto";
  19. import "google/apps/drive/labels/v2/requests.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/apps/drive/labels/v2;labels";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "LabelServiceProto";
  23. option java_package = "com.google.apps.drive.labels.v2";
  24. option objc_class_prefix = "DLBL";
  25. // Manage metadata taxonomies based on Labels and Fields that may be used within
  26. // Google Drive to organize and find files using custom metadata.
  27. service LabelService {
  28. option (google.api.default_host) = "drivelabels.googleapis.com";
  29. // List labels.
  30. rpc ListLabels(ListLabelsRequest) returns (ListLabelsResponse) {
  31. option (google.api.http) = {
  32. get: "/v2/labels"
  33. };
  34. }
  35. // Get a label by its resource name.
  36. // Resource name may be any of:
  37. //
  38. // * `labels/{id}` - See `labels/{id}@latest`
  39. // * `labels/{id}@latest` - Gets the latest revision of the label.
  40. // * `labels/{id}@published` - Gets the current published revision of the
  41. // label.
  42. // * `labels/{id}@{revision_id}` - Gets the label at the specified revision
  43. // ID.
  44. rpc GetLabel(GetLabelRequest) returns (Label) {
  45. option (google.api.http) = {
  46. get: "/v2/{name=labels/*}"
  47. };
  48. option (google.api.method_signature) = "name";
  49. }
  50. }