REST Resource: spreadsheets.developerMetadata

資源:DeveloperMetadata

與試算表中地點或物件相關聯的開發人員中繼資料。開發人員中繼資料可用於將任意資料與試算表的各個部分建立關聯,並在資料移動及試算表編輯時,保留這些關聯。舉例來說,如果開發人員中繼資料與第 5 列建立關聯,而另一個資料列隨後插入第 5 列上方,那麼原始中繼資料仍會與最初關聯的資料列建立關聯 (現在是第 6 列)。如果刪除相關物件,也會一併刪除其中繼資料。

JSON 表示法
{
  "metadataId": integer,
  "metadataKey": string,
  "metadataValue": string,
  "location": {
    object (DeveloperMetadataLocation)
  },
  "visibility": enum (DeveloperMetadataVisibility)
}
欄位
metadataId

integer

用於識別中繼資料的試算表專屬 ID。您可以在建立中繼資料時指定 ID,否則系統會隨機產生並指派 ID。必須為正數。

metadataKey

string

中繼資料鍵。試算表中可能有多個使用相同鍵的中繼資料。開發人員中繼資料一律必須指定鍵。

metadataValue

string

與中繼資料鍵相關聯的資料。

location

object (DeveloperMetadataLocation)

中繼資料的關聯位置。

visibility

enum (DeveloperMetadataVisibility)

中繼資料瀏覽權限。開發人員中繼資料一律必須指定瀏覽權限。

DeveloperMetadataLocation

試算表中可用於關聯中繼資料的位置。

JSON 表示法
{
  "locationType": enum (DeveloperMetadataLocationType),

  // Union field location can be only one of the following:
  "spreadsheet": boolean,
  "sheetId": integer,
  "dimensionRange": {
    object (DimensionRange)
  }
  // End of list of possible types for union field location.
}
欄位
locationType

enum (DeveloperMetadataLocationType)

此物件代表的位置類型。這是唯讀欄位。

聯集欄位 location。中繼資料的關聯位置。location 只能是下列其中一項:
spreadsheet

boolean

如果中繼資料與整個試算表相關聯,則為 True。

sheetId

integer

當中繼資料與整個工作表相關聯時,工作表的 ID。

dimensionRange

object (DimensionRange)

代表中繼資料與維度相關聯時的資料列或資料欄。指定的 DimensionRange 必須代表單列或單欄,且不得無限或橫跨多個列或欄。

DeveloperMetadataLocationType

列舉可連結開發人員中繼資料的位置類型。

列舉
DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED 預設值。
ROW 與整個資料列維度相關聯的開發人員中繼資料。
COLUMN 與整個資料欄維度相關聯的開發人員中繼資料。
SHEET 整個試算表中關聯的開發人員中繼資料。
SPREADSHEET 整個試算表中關聯的開發人員中繼資料。

DeveloperMetadataVisibility

列舉可用的中繼資料可見度。

列舉
DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED 預設值。
DOCUMENT 任何可存取文件的開發人員專案都能存取文件可見中繼資料。
PROJECT 專案可見中繼資料只會向建立中繼資料的開發人員專案顯示,且只有該專案可以存取。

方法

get

傳回含有指定 ID 的開發人員中繼資料。
傳回符合指定 DataFilter 的所有開發人員中繼資料。