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/apps/drive/labels/v2beta/field.proto"; 23import "google/apps/drive/labels/v2beta/label.proto"; 24import "google/apps/drive/labels/v2beta/label_lock.proto"; 25import "google/apps/drive/labels/v2beta/label_permission.proto"; 26import "google/protobuf/field_mask.proto"; 27 28option go_package = "google.golang.org/genproto/googleapis/apps/drive/labels/v2beta;labels"; 29option java_multiple_files = true; 30option java_outer_classname = "RequestsProto"; 31option java_package = "com.google.apps.drive.labels.v2beta"; 32option objc_class_prefix = "DLBL"; 33 34// Resource view that can be applied to label responses. The default value 35// `LABEL_VIEW_BASIC` implies the field mask: 36 // `name,id,revision_id,label_type,properties.*`\ 37enum LabelView { 38// Implies the field mask: 39// `name,id,revision_id,label_type,properties.*` 40LABEL_VIEW_BASIC = 0; 41 42// All possible fields. 43LABEL_VIEW_FULL = 1; 44} 45 46// Provides control over how write requests are executed. When not specified, 47// the last write wins. 48message WriteControl { 49 // Determines the revision of the label to write to and how the request 50 // should behave if that revision is not the current revision of the 51 // label. 52 oneof control { 53 // The [revision_id][google.apps.drive.labels.v1.Label.revision_id] of the 54 // label that the write request will be applied to. If this is not the 55 // latest revision of the label, the request will not be processed and will 56 // return a 400 Bad Request error. 57 string required_revision_id = 1; 58 } 59} 60 61// Request to get the capabilities for a user. 62message GetUserCapabilitiesRequest { 63 // Required. The resource name of the user. Only "users/me/capabilities" is 64 // supported. 65 string name = 1 [ 66 (google.api.field_behavior) = REQUIRED, 67 (google.api.resource_reference) = { 68 type: "drivelabels.googleapis.com/UserCapabilities" 69 } 70 ]; 71 72 // The customer to scope this request to. 73 // For example: "customers/abcd1234". 74 // If unset, will return settings within the current customer. 75 string customer = 2 [(google.api.resource_reference) = { 76 type: "cloudidentity.googleapis.com/Customer" 77 }]; 78} 79 80// Request to create a Label. 81message CreateLabelRequest { 82 // Required. The label to create. 83 Label label = 1 [(google.api.field_behavior) = REQUIRED]; 84 85 // Set to `true` in order to use the user's admin privileges. The server 86 // will verify the user is an admin before allowing access. 87 bool use_admin_access = 2; 88 89 // The BCP-47 language code to use for evaluating localized Field labels in 90 // response. When not specified, values in the default configured language 91 // will be used. 92 string language_code = 3; 93} 94 95// Request to get a label by resource name. 96message GetLabelRequest { 97 // Required. Label resource name. 98 // 99 // May be any of: 100 // 101 // * `labels/{id}` (equivalent to labels/{id}@latest) 102 // * `labels/{id}@latest` 103 // * `labels/{id}@published` 104 // * `labels/{id}@{revision_id}` 105 string name = 1 [ 106 (google.api.field_behavior) = REQUIRED, 107 (google.api.resource_reference) = { 108 type: "drivelabels.googleapis.com/Label" 109 } 110 ]; 111 112 // Set to `true` in order to use the user's admin credentials. The server 113 // verifies that the user is an admin for the label before allowing access. 114 bool use_admin_access = 2; 115 116 // The BCP-47 language code to use for evaluating localized field labels. 117 // When not specified, values in the default configured language are used. 118 string language_code = 3; 119 120 // When specified, only certain fields belonging to the indicated view are 121 // returned. 122 LabelView view = 4; 123} 124 125// The set of requests for updating aspects of a Label. If any request is not 126// valid, no requests will be applied. 127message DeltaUpdateLabelRequest { 128 // A single kind of update to apply to a Label. 129 message Request { 130 // The kind of update. Exactly one Field is required. 131 oneof kind { 132 // Updates the Label properties. 133 UpdateLabelPropertiesRequest update_label = 1; 134 135 // Creates a new Field. 136 CreateFieldRequest create_field = 2; 137 138 // Updates basic properties of a Field. 139 UpdateFieldPropertiesRequest update_field = 3; 140 141 // Update Field type and/or type options. 142 UpdateFieldTypeRequest update_field_type = 4; 143 144 // Enables the Field. 145 EnableFieldRequest enable_field = 5; 146 147 // Disables the Field. 148 DisableFieldRequest disable_field = 6; 149 150 // Deletes a Field from the label. 151 DeleteFieldRequest delete_field = 7; 152 153 // Creates Choice within a Selection field. 154 CreateSelectionChoiceRequest create_selection_choice = 8; 155 156 // Update a Choice properties within a Selection Field. 157 UpdateSelectionChoicePropertiesRequest 158 update_selection_choice_properties = 9; 159 160 // Enable a Choice within a Selection Field. 161 EnableSelectionChoiceRequest enable_selection_choice = 10; 162 163 // Disable a Choice within a Selection Field. 164 DisableSelectionChoiceRequest disable_selection_choice = 11; 165 166 // Delete a Choice within a Selection Field. 167 DeleteSelectionChoiceRequest delete_selection_choice = 12; 168 } 169 } 170 171 // Updates basic properties of a Label. 172 message UpdateLabelPropertiesRequest { 173 // The fields that should be updated. At least one field must be specified. 174 // The root `label_properties` is implied and should not be specified. A 175 // single `*` can be used as short-hand for updating every field. 176 google.protobuf.FieldMask update_mask = 1; 177 178 // Required. Label properties to update. 179 Label.Properties properties = 2 [(google.api.field_behavior) = REQUIRED]; 180 } 181 182 // Request to disable the Field. 183 message DisableFieldRequest { 184 // The fields that should be updated. At least one field must be specified. 185 // The root `disabled_policy` is implied and should not be specified. A 186 // single `*` can be used as short-hand for updating every field. 187 google.protobuf.FieldMask update_mask = 1; 188 189 // Required. Key of the Field to disable. 190 string id = 2 [(google.api.field_behavior) = REQUIRED]; 191 192 // Required. Field Disabled Policy. 193 Lifecycle.DisabledPolicy disabled_policy = 3 194 [(google.api.field_behavior) = REQUIRED]; 195 } 196 197 // Request to enable the Field. 198 message EnableFieldRequest { 199 // Required. ID of the Field to enable. 200 string id = 1 [(google.api.field_behavior) = REQUIRED]; 201 } 202 203 // Request to delete the Field. 204 message DeleteFieldRequest { 205 // Required. ID of the Field to delete. 206 string id = 1 [(google.api.field_behavior) = REQUIRED]; 207 } 208 209 // Request to create a Field within a Label. 210 message CreateFieldRequest { 211 // Required. Field to create. 212 Field field = 1 [(google.api.field_behavior) = REQUIRED]; 213 } 214 215 // Request to update Field properties. 216 message UpdateFieldPropertiesRequest { 217 // The fields that should be updated. At least one field must be specified. 218 // The root `properties` is implied and should not be specified. A single 219 // `*` can be used as short-hand for updating every field. 220 google.protobuf.FieldMask update_mask = 1; 221 222 // Required. The Field to update. 223 string id = 2 [(google.api.field_behavior) = REQUIRED]; 224 225 // Required. Basic Field properties. 226 Field.Properties properties = 3 [(google.api.field_behavior) = REQUIRED]; 227 } 228 229 // Request to change the type of a Field. 230 message UpdateFieldTypeRequest { 231 oneof type_options { 232 // Update field to Text. 233 Field.TextOptions text_options = 3; 234 235 // Update field to Integer. 236 Field.IntegerOptions integer_options = 5; 237 238 // Update field to Date. 239 Field.DateOptions date_options = 6; 240 241 // Update field to Selection. 242 Field.SelectionOptions selection_options = 7; 243 244 // Update field to User. 245 Field.UserOptions user_options = 8; 246 } 247 248 // The fields that should be updated. At least one field must be specified. 249 // The root of `type_options` is implied and should not be specified. A 250 // single `*` can be used as short-hand for updating every field. 251 google.protobuf.FieldMask update_mask = 1; 252 253 // Required. The Field to update. 254 string id = 2 [(google.api.field_behavior) = REQUIRED]; 255 } 256 257 // Request to create a Selection Choice. 258 message CreateSelectionChoiceRequest { 259 // Required. The Selection Field in which a Choice will be created. 260 string field_id = 1 [(google.api.field_behavior) = REQUIRED]; 261 262 // Required. The Choice to create. 263 Field.SelectionOptions.Choice choice = 2 264 [(google.api.field_behavior) = REQUIRED]; 265 } 266 267 // Request to update a Choice properties. 268 message UpdateSelectionChoicePropertiesRequest { 269 // The fields that should be updated. At least one field must be specified. 270 // The root `properties` is implied and should not be specified. A single 271 // `*` can be used as short-hand for updating every field. 272 google.protobuf.FieldMask update_mask = 1; 273 274 // Required. The Selection Field to update. 275 string field_id = 2 [(google.api.field_behavior) = REQUIRED]; 276 277 // Required. The Choice to update. 278 string id = 3 [(google.api.field_behavior) = REQUIRED]; 279 280 // Required. The Choice properties to update. 281 Field.SelectionOptions.Choice.Properties properties = 4 282 [(google.api.field_behavior) = REQUIRED]; 283 } 284 285 // Request to delete a Choice. 286 message DeleteSelectionChoiceRequest { 287 // Required. The Selection Field from which a Choice will be deleted. 288 string field_id = 1 [(google.api.field_behavior) = REQUIRED]; 289 290 // Required. Choice to delete. 291 string id = 2 [(google.api.field_behavior) = REQUIRED]; 292 } 293 294 // Request to disable a Choice. 295 message DisableSelectionChoiceRequest { 296 // The fields that should be updated. At least one field must be specified. 297 // The root `disabled_policy` is implied and should not be specified. A 298 // single `*` can be used as short-hand for updating every field. 299 google.protobuf.FieldMask update_mask = 1; 300 301 // Required. The Selection Field in which a Choice will be disabled. 302 string field_id = 2 [(google.api.field_behavior) = REQUIRED]; 303 304 // Required. Choice to disable. 305 string id = 3 [(google.api.field_behavior) = REQUIRED]; 306 307 // Required. The disabled policy to update. 308 Lifecycle.DisabledPolicy disabled_policy = 4 309 [(google.api.field_behavior) = REQUIRED]; 310 } 311 312 // Request to enable a Choice. 313 message EnableSelectionChoiceRequest { 314 // Required. The Selection Field in which a Choice will be enabled. 315 string field_id = 1 [(google.api.field_behavior) = REQUIRED]; 316 317 // Required. Choice to enable. 318 string id = 2 [(google.api.field_behavior) = REQUIRED]; 319 } 320 321 // Required. The resource name of the Label to update. 322 string name = 1 [ 323 (google.api.field_behavior) = REQUIRED, 324 (google.api.resource_reference) = { 325 type: "drivelabels.googleapis.com/Label" 326 } 327 ]; 328 329 // Provides control over how write requests are executed. 330 WriteControl write_control = 2; 331 332 // A list of updates to apply to the Label. 333 // Requests will be applied in the order they are specified. 334 repeated Request requests = 3; 335 336 // Set to `true` in order to use the user's admin credentials. The server 337 // will verify the user is an admin for the Label before allowing access. 338 bool use_admin_access = 4; 339 340 // When specified, only certain fields belonging to the indicated view will be 341 // returned. 342 LabelView view = 5; 343 344 // The BCP-47 language code to use for evaluating localized Field labels when 345 // `include_label_in_response` is `true`. 346 string language_code = 6; 347} 348 349// Response for Label update. 350message DeltaUpdateLabelResponse { 351 // A single response from an update. 352 message Response { 353 // The response for the corresponding request. 354 oneof response { 355 // Updated basic properties of a Label. 356 UpdateLabelPropertiesResponse update_label = 1; 357 358 // Creates a new Field. 359 CreateFieldResponse create_field = 2; 360 361 // Updates basic properties of a Field. 362 UpdateFieldPropertiesResponse update_field = 3; 363 364 // Update Field type and/or type options. 365 UpdateFieldTypeResponse update_field_type = 4; 366 367 // Enables Field. 368 EnableFieldResponse enable_field = 5; 369 370 // Disables Field. 371 DisableFieldResponse disable_field = 6; 372 373 // Deletes a Field from the label. 374 DeleteFieldResponse delete_field = 7; 375 376 // Creates a new selection list option to add to a Selection Field. 377 CreateSelectionChoiceResponse create_selection_choice = 8; 378 379 // Updates a Choice within a Selection Field. 380 UpdateSelectionChoicePropertiesResponse 381 update_selection_choice_properties = 9; 382 383 // Enables a Choice within a Selection Field. 384 EnableSelectionChoiceResponse enable_selection_choice = 10; 385 386 // Disables a Choice within a Selection Field. 387 DisableSelectionChoiceResponse disable_selection_choice = 11; 388 389 // Deletes a Choice from a Selection Field. 390 DeleteSelectionChoiceResponse delete_selection_choice = 12; 391 } 392 } 393 394 // Response following update to Label properties. 395 message UpdateLabelPropertiesResponse {} 396 397 // Response following Field create. 398 message CreateFieldResponse { 399 // The field of the created field. When left blank in a create request, 400 // a key will be autogenerated and can be identified here. 401 string id = 1; 402 403 // The priority of the created field. The priority may change from what 404 // was specified to assure contiguous priorities between fields (1-n). 405 int32 priority = 2; 406 } 407 408 // Response following update to Field properties. 409 message UpdateFieldPropertiesResponse { 410 // The priority of the updated field. The priority may change from what 411 // was specified to assure contiguous priorities between fields (1-n). 412 int32 priority = 1; 413 } 414 415 // Response following update to Field type. 416 message UpdateFieldTypeResponse {} 417 418 // Response following Field enable. 419 message EnableFieldResponse {} 420 421 // Response following Field disable. 422 message DisableFieldResponse {} 423 424 // Response following Field delete. 425 message DeleteFieldResponse {} 426 427 // Response following Selection Choice create. 428 message CreateSelectionChoiceResponse { 429 // The server-generated id of the field. 430 string field_id = 1; 431 432 // The server-generated ID of the created choice within the Field 433 string id = 2; 434 } 435 436 // Response following update to Selection Choice properties. 437 message UpdateSelectionChoicePropertiesResponse { 438 // The priority of the updated choice. The priority may change from what 439 // was specified to assure contiguous priorities between choices (1-n). 440 int32 priority = 1; 441 } 442 443 // Response following Choice enable. 444 message EnableSelectionChoiceResponse {} 445 446 // Response following Choice disable. 447 message DisableSelectionChoiceResponse {} 448 449 // Response following Choice delete. 450 message DeleteSelectionChoiceResponse {} 451 452 // The reply of the updates. This maps 1:1 with the updates, although 453 // responses to some requests may be empty. 454 repeated Response responses = 1; 455 456 // The label after updates were applied. This is only set if 457 // [BatchUpdateLabelResponse2.include_label_in_response] is `true` and there 458 // were no errors. 459 Label updated_label = 6; 460} 461 462// Request to update the `CopyMode` of the given Label. Changes to this policy 463// are not revisioned, do not require publishing, and take effect immediately. 464 // \ 465message UpdateLabelCopyModeRequest { 466// Required. The resource name of the Label to update. 467string name = 1 [ 468 (google.api.field_behavior) = REQUIRED, 469 (google.api.resource_reference) = { type: "drivelabels.googleapis.com/Label" } 470]; 471 472// Required. Indicates how the applied Label, and Field values should be copied 473// when a Drive item is copied. 474Label.AppliedLabelPolicy.CopyMode copy_mode = 2 475 [(google.api.field_behavior) = REQUIRED]; 476 477// Set to `true` in order to use the user's admin credentials. The server 478// will verify the user is an admin for the Label before allowing access. 479bool use_admin_access = 3; 480 481// The BCP-47 language code to use for evaluating localized field labels. 482// When not specified, values in the default configured language will be used. 483string language_code = 4; 484 485// When specified, only certain fields belonging to the indicated view will be 486// returned. 487LabelView view = 5; 488} 489 490// Request to get the limits for a Label. 491message GetLabelLimitsRequest { 492 // Required. Label revision resource name 493 // Must be: "limits/label" 494 string name = 1 [ 495 (google.api.field_behavior) = REQUIRED, 496 (google.api.resource_reference) = { 497 type: "drivelabels.googleapis.com/Label" 498 } 499 ]; 500} 501 502// Request to list labels available to the current user. 503message ListLabelsRequest { 504 oneof access { 505 // Set to `true` in order to use the user's admin credentials. This will 506 // return all Labels within the customer. 507 bool use_admin_access = 3; 508 509 // Specifies the level of access the user must have on the returned Labels. 510 // The minimum role a user must have on a label. 511 // Defaults to `READER`. 512 LabelPermission.LabelRole minimum_role = 4; 513 } 514 515 // Whether to include only published labels in the results. 516 // 517 // * When `true`, only the current published label revisions are returned. 518 // Disabled labels are included. Returned label resource names 519 // reference the published revision (`labels/{id}/{revision_id}`). 520 // * When `false`, the current label revisions are returned, which might not 521 // be published. Returned label resource names don't reference a specific 522 // revision (`labels/{id}`). 523 bool published_only = 1; 524 525 // The customer to scope this list request to. 526 // For example: "customers/abcd1234". 527 // If unset, will return all labels within the current customer. 528 string customer = 2 [(google.api.resource_reference) = { 529 type: "cloudidentity.googleapis.com/Customer" 530 }]; 531 532 // The BCP-47 language code to use for evaluating localized field labels. 533 // When not specified, values in the default configured language are used. 534 string language_code = 5; 535 536 // Maximum number of labels to return per page. Default: 50. Max: 200. 537 int32 page_size = 6; 538 539 // The token of the page to return. 540 string page_token = 7; 541 542 // When specified, only certain fields belonging to the indicated view are 543 // returned. 544 LabelView view = 8; 545} 546 547// Response for listing Labels. 548message ListLabelsResponse { 549 // Labels. 550 repeated Label labels = 1; 551 552 // The token of the next page in the response. 553 string next_page_token = 2; 554} 555 556// Creates or updates a permission on the Label. Permissions affect the Label 557// resource as a whole, are not revisioned, and do not require publishing. 558message CreateLabelPermissionRequest { 559 // Required. The parent Label resource name on the Label Permission is 560 // created. Format: labels/{label} 561 string parent = 1 [ 562 (google.api.field_behavior) = REQUIRED, 563 (google.api.resource_reference) = { 564 type: "drivelabels.googleapis.com/Label" 565 } 566 ]; 567 568 // Required. The permission to create or update on the Label. 569 LabelPermission label_permission = 2 [(google.api.field_behavior) = REQUIRED]; 570 571 // Set to `true` in order to use the user's admin credentials. The server 572 // will verify the user is an admin for the Label before allowing access. 573 bool use_admin_access = 3; 574} 575 576// Request to list the permissions on a Label. 577message ListLabelPermissionsRequest { 578 // Required. The parent Label resource name on which Label Permission are 579 // listed. Format: labels/{label} 580 string parent = 1 [ 581 (google.api.field_behavior) = REQUIRED, 582 (google.api.resource_reference) = { 583 type: "drivelabels.googleapis.com/Label" 584 } 585 ]; 586 587 // Set to `true` in order to use the user's admin credentials. The server will 588 // verify the user is an admin for the Label before allowing access. 589 bool use_admin_access = 2; 590 591 // Maximum number of permissions to return per page. Default: 50. Max: 200. 592 int32 page_size = 3; 593 594 // The token of the page to return. 595 string page_token = 4; 596} 597 598// Response for listing the permissions on a Label. 599message ListLabelPermissionsResponse { 600 // Label permissions. 601 repeated LabelPermission label_permissions = 1; 602 603 // The token of the next page in the response. 604 string next_page_token = 2; 605} 606 607// Updates a Label Permission. Permissions affect the Label resource as a whole, 608// are not revisioned, and do not require publishing. 609message UpdateLabelPermissionRequest { 610 // Required. The parent Label resource name. 611 string parent = 1 [ 612 (google.api.field_behavior) = REQUIRED, 613 (google.api.resource_reference) = { 614 type: "drivelabels.googleapis.com/Label" 615 } 616 ]; 617 618 // Required. The permission to create or update on the Label. 619 LabelPermission label_permission = 2 [(google.api.field_behavior) = REQUIRED]; 620 621 // Set to `true` in order to use the user's admin credentials. The server 622 // will verify the user is an admin for the Label before allowing access. 623 bool use_admin_access = 3; 624} 625 626// Deletes a Label Permission. Permissions affect the Label resource as a whole, 627// are not revisioned, and do not require publishing. 628message DeleteLabelPermissionRequest { 629 // Required. Label Permission resource name. 630 string name = 1 [ 631 (google.api.field_behavior) = REQUIRED, 632 (google.api.resource_reference) = { 633 type: "drivelabels.googleapis.com/LabelPermission" 634 } 635 ]; 636 637 // Set to `true` in order to use the user's admin credentials. The server 638 // will verify the user is an admin for the Label before allowing access. 639 bool use_admin_access = 2; 640} 641 642// Updates one or more Label Permissions. 643message BatchUpdateLabelPermissionsRequest { 644 // Required. The parent Label resource name shared by all permissions being 645 // updated. Format: labels/{label} If this is set, the parent field in the 646 // UpdateLabelPermissionRequest messages must either be empty or match this 647 // field. 648 string parent = 1 [ 649 (google.api.field_behavior) = REQUIRED, 650 (google.api.resource_reference) = { 651 type: "drivelabels.googleapis.com/Label" 652 } 653 ]; 654 655 // Required. The request message specifying the resources to update. 656 repeated UpdateLabelPermissionRequest requests = 2 657 [(google.api.field_behavior) = REQUIRED]; 658 659 // Set to `true` in order to use the user's admin credentials. The server 660 // will verify the user is an admin for the Label before allowing access. 661 // If this is set, the use_admin_access field in the 662 // UpdateLabelPermissionRequest messages must either be empty or match this 663 // field. 664 bool use_admin_access = 3; 665} 666 667// Response for updating one or more Label Permissions. 668message BatchUpdateLabelPermissionsResponse { 669 // Required. Permissions updated. 670 repeated LabelPermission permissions = 1 671 [(google.api.field_behavior) = REQUIRED]; 672} 673 674// Deletes one of more Label Permissions. 675message BatchDeleteLabelPermissionsRequest { 676 // Required. The request message specifying the resources to update. 677 repeated DeleteLabelPermissionRequest requests = 1 678 [(google.api.field_behavior) = REQUIRED]; 679 680 // Set to `true` in order to use the user's admin credentials. The server 681 // will verify the user is an admin for the Label before allowing access. 682 // If this is set, the use_admin_access field in the 683 // DeleteLabelPermissionRequest messages must either be empty or match this 684 // field. 685 bool use_admin_access = 2; 686 687 // Required. The parent Label resource name shared by all permissions being 688 // deleted. Format: labels/{label} If this is set, the parent field in the 689 // UpdateLabelPermissionRequest messages must either be empty or match this 690 // field. 691 string parent = 3 [ 692 (google.api.field_behavior) = REQUIRED, 693 (google.api.resource_reference) = { 694 type: "drivelabels.googleapis.com/Label" 695 } 696 ]; 697} 698 699// Request to deprecate a published Label. 700message DisableLabelRequest { 701 // The fields that should be updated. At least one field must be specified. 702 // The root `disabled_policy` is implied and should not be specified. A 703 // single `*` can be used as short-hand for updating every field. 704 google.protobuf.FieldMask update_mask = 1; 705 706 // Required. Label resource name. 707 string name = 2 [ 708 (google.api.field_behavior) = REQUIRED, 709 (google.api.resource_reference) = { 710 type: "drivelabels.googleapis.com/Label" 711 } 712 ]; 713 714 // Set to `true` in order to use the user's admin credentials. The server 715 // will verify the user is an admin for the Label before allowing access. 716 bool use_admin_access = 3; 717 718 // Provides control over how write requests are executed. Defaults to unset, 719 // which means last write wins. 720 WriteControl write_control = 4; 721 722 // Disabled policy to use. 723 Lifecycle.DisabledPolicy disabled_policy = 5; 724 725 // The BCP-47 language code to use for evaluating localized field labels. 726 // When not specified, values in the default configured language will be used. 727 string language_code = 6; 728} 729 730// Request to publish a label. 731message PublishLabelRequest { 732 // Required. Label resource name. 733 string name = 1 [ 734 (google.api.field_behavior) = REQUIRED, 735 (google.api.resource_reference) = { 736 type: "drivelabels.googleapis.com/Label" 737 } 738 ]; 739 740 // Set to `true` in order to use the user's admin credentials. The server 741 // will verify the user is an admin for the Label before allowing access. 742 bool use_admin_access = 2; 743 744 // Provides control over how write requests are executed. Defaults to unset, 745 // which means last write wins. 746 WriteControl write_control = 3; 747 748 // The BCP-47 language code to use for evaluating localized field labels. 749 // When not specified, values in the default configured language will be used. 750 string language_code = 4; 751} 752 753// Request to enable a label. 754message EnableLabelRequest { 755 // Required. Label resource name. 756 string name = 1 [ 757 (google.api.field_behavior) = REQUIRED, 758 (google.api.resource_reference) = { 759 type: "drivelabels.googleapis.com/Label" 760 } 761 ]; 762 763 // Set to `true` in order to use the user's admin credentials. The server 764 // will verify the user is an admin for the Label before allowing access. 765 bool use_admin_access = 2; 766 767 // Provides control over how write requests are executed. Defaults to unset, 768 // which means last write wins. 769 WriteControl write_control = 3; 770 771 // The BCP-47 language code to use for evaluating localized field labels. 772 // When not specified, values in the default configured language will be used. 773 string language_code = 4; 774} 775 776// Request to delete a label. 777message DeleteLabelRequest { 778 // Required. Label resource name. 779 string name = 1 [ 780 (google.api.field_behavior) = REQUIRED, 781 (google.api.resource_reference) = { 782 type: "drivelabels.googleapis.com/Label" 783 } 784 ]; 785 786 // Set to `true` in order to use the user's admin credentials. The server 787 // will verify the user is an admin for the Label before allowing access. 788 bool use_admin_access = 2; 789 790 // Provides control over how write requests are executed. Defaults to unset, 791 // which means last write wins. 792 WriteControl write_control = 3; 793} 794 795// A request to list the LabelLocks on a Label. 796message ListLabelLocksRequest { 797 // Required. Label on which Locks are applied. 798 // Format: labels/{label} 799 string parent = 1 [ 800 (google.api.field_behavior) = REQUIRED, 801 (google.api.resource_reference) = { 802 type: "drivelabels.googleapis.com/Label" 803 } 804 ]; 805 806 // Maximum number of Locks to return per page. Default: 100. Max: 200. 807 int32 page_size = 2; 808 809 // The token of the page to return. 810 string page_token = 3; 811} 812 813// The response to a ListLabelLocksRequest. 814message ListLabelLocksResponse { 815 // LabelLocks. 816 repeated LabelLock label_locks = 1; 817 818 // The token of the next page in the response. 819 string next_page_token = 2; 820} 821