label_limits.proto 4.1 KB

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