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/resource.proto"; 20import "google/type/date.proto"; 21 22option go_package = "google.golang.org/genproto/googleapis/apps/drive/labels/v2beta;labels"; 23option java_multiple_files = true; 24option java_outer_classname = "LabelLimitsProto"; 25option java_package = "com.google.apps.drive.labels.v2beta"; 26option objc_class_prefix = "DLBL"; 27 28// Label constraints governing the structure of a Label; such as, the maximum 29// number of Fields allowed and maximum length of the label title. 30message LabelLimits { 31 option (google.api.resource) = { 32 type: "drivelabels.googleapis.com/LabelLimits" 33 pattern: "limits/label" 34 }; 35 36 // Resource name. 37 string name = 1; 38 39 // The maximum number of characters allowed for the title. 40 int32 max_title_length = 2; 41 42 // The maximum number of characters allowed for the description. 43 int32 max_description_length = 3; 44 45 // The maximum number of Fields allowed within the label. 46 int32 max_fields = 4; 47 48 // The maximum number of published Fields that can be deleted. 49 int32 max_deleted_fields = 5; 50 51 // The maximum number of draft revisions that will be kept before deleting 52 // old drafts. 53 int32 max_draft_revisions = 6; 54 55 // The limits for Fields. 56 FieldLimits field_limits = 7; 57} 58 59// Field constants governing the structure of a Field; such as, the maximum 60// title length, minimum and maximum field values or length, etc. 61message FieldLimits { 62 // Max length for the id. 63 int32 max_id_length = 1; 64 65 // Limits for Field title. 66 int32 max_display_name_length = 2; 67 68 // Limits for Field description, also called help text. 69 int32 max_description_length = 3; 70 71 // The relevant limits for the specified Field.Type. 72 // Text Field limits. 73 TextLimits text_limits = 4; 74 75 // Long text Field limits. 76 LongTextLimits long_text_limits = 5; 77 78 // Integer Field limits. 79 IntegerLimits integer_limits = 6; 80 81 // Date Field limits. 82 DateLimits date_limits = 7; 83 84 // User Field limits. 85 UserLimits user_limits = 8; 86 87 // Selection Field limits. 88 SelectionLimits selection_limits = 9; 89} 90 91// Limits for list-variant of a Field type. 92message ListLimits { 93 // Maximum number of values allowed for the Field type. 94 int32 max_entries = 1; 95} 96 97// Limits for text Field type. 98message TextLimits { 99 // Minimum length allowed for a text Field type. 100 int32 min_length = 1; 101 102 // Maximum length allowed for a text Field type. 103 int32 max_length = 2; 104} 105 106// Limits for long text Field type. 107message LongTextLimits { 108 // Minimum length allowed for a long text Field type. 109 int32 min_length = 1; 110 111 // Maximum length allowed for a long text Field type. 112 int32 max_length = 2; 113} 114 115// Limits for integer Field type. 116message IntegerLimits { 117 // Minimum value for an integer Field type. 118 int64 min_value = 1; 119 120 // Maximum value for an integer Field type. 121 int64 max_value = 2; 122} 123 124// Limits for date Field type. 125message DateLimits { 126 // Minimum value for the date Field type. 127 google.type.Date min_value = 1; 128 129 // Maximum value for the date Field type. 130 google.type.Date max_value = 2; 131} 132 133// Limits for selection Field type. 134message SelectionLimits { 135 // Limits for list-variant of a Field type. 136 ListLimits list_limits = 1; 137 138 // Maximum ID length for a selection options. 139 int32 max_id_length = 2; 140 141 // Maximum length for display name. 142 int32 max_display_name_length = 3; 143 144 // The max number of choices. 145 int32 max_choices = 4; 146 147 // Maximum number of deleted choices. 148 int32 max_deleted_choices = 5; 149} 150 151// Limits for Field.Type.USER. 152message UserLimits { 153 // Limits for list-variant of a Field type. 154 ListLimits list_limits = 1; 155} 156