label_lock.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.v2beta;
  16. import "google/api/field_behavior.proto";
  17. import "google/api/resource.proto";
  18. import "google/apps/drive/labels/v2beta/common.proto";
  19. import "google/protobuf/timestamp.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/apps/drive/labels/v2beta;labels";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "LabelLockProto";
  23. option java_package = "com.google.apps.drive.labels.v2beta";
  24. option objc_class_prefix = "DLBL";
  25. // A Lock that can be applied to a Label, Field, or Choice.
  26. message LabelLock {
  27. option (google.api.resource) = {
  28. type: "drivelabels.googleapis.com/LabelLock"
  29. pattern: "labels/{label}/locks/{lock}"
  30. };
  31. // A description of a user's capabilities on a LabelLock.
  32. message Capabilities {
  33. // True if the user is authorized to view the policy.
  34. bool can_view_policy = 1;
  35. }
  36. // A description of a LabelLock's state.
  37. enum State {
  38. // Unknown state.
  39. STATE_UNSPECIFIED = 0;
  40. // The LabelLock is active and is being enforced by the server.
  41. ACTIVE = 1;
  42. // The LabelLock is being deleted. The LabelLock will continue to be
  43. // enforced by the server until it has been fully removed.
  44. DELETING = 2;
  45. }
  46. // Output only. Resource name of this LabelLock.
  47. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
  48. // The ID of the Field that should be locked. Empty if the whole
  49. // Label should be locked.
  50. string field_id = 2;
  51. // The ID of the Selection Field Choice that should be locked. If present,
  52. // `field_id` must also be present.
  53. string choice_id = 3;
  54. // Output only. The time this LabelLock was created.
  55. google.protobuf.Timestamp create_time = 4
  56. [(google.api.field_behavior) = OUTPUT_ONLY];
  57. // Output only. The user whose credentials were used to create the LabelLock.
  58. // This will not be present if no user was responsible for creating the
  59. // LabelLock.
  60. UserInfo creator = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  61. // Output only. A timestamp indicating when this LabelLock was scheduled for
  62. // deletion. This will be present only if this LabelLock is in the DELETING
  63. // state.
  64. google.protobuf.Timestamp delete_time = 6
  65. [(google.api.field_behavior) = OUTPUT_ONLY];
  66. // Output only. The user's capabilities on this LabelLock.
  67. Capabilities capabilities = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  68. // Output only. This LabelLock's state.
  69. State state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  70. }