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