WriteControl
Cho phép kiểm soát cách thực thi các yêu cầu ghi. Khi không được chỉ định, lượt ghi sau cùng sẽ thắng.
Biểu diễn dưới dạng JSON |
{
// Union field control can be only one of the following:
"requiredRevisionId": string
// End of list of possible types for union field control .
} |
Trường |
Trường kết hợp control . Xác định bản sửa đổi của nhãn để ghi và cách yêu cầu hoạt động nếu bản sửa đổi đó không phải là bản sửa đổi hiện tại của nhãn. control chỉ có thể là một trong những trạng thái sau đây: |
requiredRevisionId |
string
[revisionId][google.apps.drive.labels.v1.Label.revision_id] của nhãn sẽ áp dụng yêu cầu ghi. Nếu đây không phải là bản sửa đổi mới nhất của nhãn, thì yêu cầu sẽ không được xử lý và sẽ trả về lỗi 400 Yêu cầu không hợp lệ.
|
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-10-15 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2024-10-15 UTC."],[[["Provides control over how write requests to the label are executed, defaulting to \"last write wins\" if not specified."],["Uses JSON representation to define the write control, focusing on the `control` field."],["Offers the `requiredRevisionId` field within the `control` field to ensure writes are applied to a specific revision of the label, preventing accidental overwrites."],["If `requiredRevisionId` doesn't match the latest revision, the write request will be rejected with a 400 Bad Request error."]]],["The provided content defines how to control write requests for a label, defaulting to a \"last write wins\" approach. It uses a `control` union field, specifically the `requiredRevisionId`, to manage this. The `requiredRevisionId` field is a string representing the label's revision. If a write request targets a non-latest revision ID, the request will fail with a 400 error, ensuring only changes to the current revision are applied.\n"]]