Class DriveItemsSelectedActionResponseBuilder
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מסמכים מפורטים
requestFileScope(itemId)
מציין שהתגובה מבקשת היקף קובץ עבור הפריט הרלוונטי לפי הקשר ב-Drive.
פרמטרים
שם | סוג | תיאור |
itemId | String | המזהה של הפריט ב-Drive שעבורו רוצים לבקש הרשאת גישה ברמת הקובץ. |
חזרה
DriveItemsSelectedActionResponseBuilder
– האובייקט הזה, לצורך קישור.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-26 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eDriveItemsSelectedActionResponseBuilder\u003c/code\u003e helps create responses for actions taken on selected Drive items within Google Workspace add-ons.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to build the response and request specific file access scopes, enhancing the add-on's functionality with Drive.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ebuild()\u003c/code\u003e finalizes the response, while \u003ccode\u003erequestFileScope()\u003c/code\u003e enables the add-on to request access to a specific Drive item, streamlining user interactions.\u003c/p\u003e\n"]]],["The `DriveItemsSelectedActionResponseBuilder` creates `DriveItemsSelectedActionResponse` objects. It offers two primary actions: `build()`, which finalizes and returns the validated response object, and `requestFileScope(itemId)`, which designates a specific Drive item by its ID for which file scope is being requested. The `requestFileScope` method allows chaining, returning the builder object. These are used to specify actions in context to a Drive item.\n"],null,["# Class DriveItemsSelectedActionResponseBuilder\n\nDriveItemsSelectedActionResponseBuilder\n\nA builder for [DriveItemsSelectedActionResponse](/apps-script/reference/card-service/drive-items-selected-action-response) objects. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|\n| [build()](#build()) | [DriveItemsSelectedActionResponse](/apps-script/reference/card-service/drive-items-selected-action-response) | Builds the current Drive action response. |\n| [requestFileScope(itemId)](#requestFileScope(String)) | [DriveItemsSelectedActionResponseBuilder](#) | Specifies that the response requests file scope for the contextually-relevant item in Drive. |\n\nDetailed documentation\n----------------------\n\n### `build()`\n\nBuilds the current Drive action response.\n\n#### Return\n\n\n[DriveItemsSelectedActionResponse](/apps-script/reference/card-service/drive-items-selected-action-response) --- A validated [DriveItemsSelectedActionResponse](/apps-script/reference/card-service/drive-items-selected-action-response).\n\n*** ** * ** ***\n\n### `request``File``Scope(itemId)`\n\nSpecifies that the response requests file scope for the contextually-relevant item in Drive.\n\n#### Parameters\n\n| Name | Type | Description |\n|------------|----------|-------------------------------------------------|\n| `item``Id` | `String` | ID of the Drive item to request file scope for. |\n\n#### Return\n\n\n[DriveItemsSelectedActionResponseBuilder](#) --- This object, for chaining."]]