DynamicResourceDefinition 是 Resource 的建構區塊,可包含一或多個 Resource,動態定義 Google Workspace Studio 中步驟提供的輸出變數數量。
僅適用於擴充 Google Workspace Studio 的 Google Workspace 外掛程式。
用法範例:
let dynamicResourceDefinition = AddOnsResponseService.newDynamicResourceDefinition() .setResourceId("resource_definition_1") // The resource ID must match the one defined in the manifest. .addResourceField( AddOnsResponseService.newResourceField() .setSelector("question_1") .setDisplayText("Question 1") );
方法
| 方法 | 傳回類型 | 簡短說明 |
|---|---|---|
add | Dynamic | 在動態資源定義中新增資源欄位。 |
set | Dynamic | 設定動態資源定義的 ID,這個 ID 對應至資訊清單中的 workflow。 |
內容詳盡的說明文件
add Resource Field(resourceField)
在動態資源定義中新增資源欄位。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
resource | Resource | 要新增的資源欄位。 |
回攻員
Dynamic - 這個物件,用於鏈結。
set Resource Id(resourceId)
設定動態資源定義的 ID,這個 ID 對應至資訊清單中的 workflow。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
resource | String | 動態資源定義的專屬 ID。 |
回攻員
Dynamic - 這個物件,用於鏈結。