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/type/color.proto"; 22 23option go_package = "google.golang.org/genproto/googleapis/apps/drive/labels/v2beta;labels"; 24option java_multiple_files = true; 25option java_outer_classname = "CommonProto"; 26option java_package = "com.google.apps.drive.labels.v2beta"; 27option objc_class_prefix = "DLBL"; 28option (google.api.resource_definition) = { 29 type: "people.googleapis.com/Person" 30 pattern: "persons/{person}" 31}; 32 33// The lifecycle state of an object, such as label, field, or choice. The 34// lifecycle enforces the following transitions: 35// 36// * `UNPUBLISHED_DRAFT` (starting state) 37// * `UNPUBLISHED_DRAFT` -> `PUBLISHED` 38// * `UNPUBLISHED_DRAFT` -> (Deleted) 39// * `PUBLISHED` -> `DISABLED` 40// * `DISABLED` -> `PUBLISHED` 41// * `DISABLED` -> (Deleted) 42// 43// The published and disabled states have some distinct characteristics: 44// 45// * Published—Some kinds of changes might be made to an object in this state, 46// in which case `has_unpublished_changes` will be true. Also, some kinds of 47// changes are not permitted. Generally, any change that would invalidate or 48// cause new restrictions on existing metadata related to the label are 49// rejected. 50// * Disabled—When disabled, the configured `DisabledPolicy` takes effect. 51message Lifecycle { 52 // The policy that governs how to treat a disabled label, field, or selection 53 // choice in different contexts. 54 message DisabledPolicy { 55 // Whether to hide this disabled object in the search menu for Drive items. 56 // 57 // * When `false`, the object is generally shown in the UI as disabled but 58 // it appears in the search results when searching for Drive items. 59 // * When `true`, the object is generally hidden in the UI when 60 // searching for Drive items. 61 bool hide_in_search = 1; 62 63 // Whether to show this disabled object in the apply menu on Drive items. 64 // 65 // * When `true`, the object is generally shown in the UI as disabled 66 // and is unselectable. 67 // * When `false`, the object is generally hidden in the UI. 68 bool show_in_apply = 2; 69 } 70 71 // The state of the object associated with this lifecycle. 72 enum State { 73 // Unknown State. 74 STATE_UNSPECIFIED = 0; 75 76 // The initial state of an object. Once published, the object can never 77 // return to this state. Once an object is published, certain kinds of 78 // changes are no longer permitted. 79 UNPUBLISHED_DRAFT = 1; 80 81 // The object has been published. The object might have unpublished draft 82 // changes as indicated by `has_unpublished_changes`. 83 PUBLISHED = 2; 84 85 // The object has been published and has since been disabled. The object 86 // might have unpublished draft changes as indicated by 87 // `has_unpublished_changes`. 88 DISABLED = 3; 89 90 // The object has been deleted. 91 DELETED = 4; 92 } 93 94 // Output only. The state of the object associated with this lifecycle. 95 State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 96 97 // Output only. Whether the object associated with this lifecycle has 98 // unpublished changes. 99 bool has_unpublished_changes = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; 100 101 // The policy that governs how to show a disabled label, field, or selection 102 // choice. 103 DisabledPolicy disabled_policy = 3; 104} 105 106// Information about a user. 107message UserInfo { 108 // The identifier for this user that can be used with the People API to get 109 // more information. 110 // For example, people/12345678. 111 string person = 1 [ 112 (google.api.resource_reference) = { type: "people.googleapis.com/Person" } 113 ]; 114} 115 116// Badge status of the label. 117message BadgeConfig { 118 // The color of the badge. When not specified, no badge is rendered. 119 // The background, foreground, and solo (light and dark mode) colors set here 120 // are changed in the Drive UI into the closest recommended supported color. 121 google.type.Color color = 1; 122 123 // Override the default global priority of this badge. 124 // When set to 0, the default priority heuristic is used. 125 int64 priority_override = 2; 126} 127 128// The color derived from BadgeConfig and changed to the closest recommended 129// supported color. 130message BadgeColors { 131 // Output only. Badge background that pairs with the foreground. 132 google.type.Color background_color = 1 133 [(google.api.field_behavior) = OUTPUT_ONLY]; 134 135 // Output only. Badge foreground that pairs with the background. 136 google.type.Color foreground_color = 2 137 [(google.api.field_behavior) = OUTPUT_ONLY]; 138 139 // Output only. Color that can be used for text without a background. 140 google.type.Color solo_color = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; 141} 142 143// Contains information about whether a label component should be considered 144// locked. 145message LockStatus { 146 // Output only. Indicates whether this label component is the (direct) target 147 // of a LabelLock. A label component can be implicitly locked even if it's 148 // not the direct target of a LabelLock, in which case this field is set to 149 // false. 150 bool locked = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 151} 152