DataFilter

這個篩選器會說明應從要求中選取或傳回哪些資料。

JSON 表示法
{

  // Union field filter can be only one of the following:
  "developerMetadataLookup": {
    object (DeveloperMetadataLookup)
  },
  "a1Range": string,
  "gridRange": {
    object (GridRange)
  }
  // End of list of possible types for union field filter.
}
欄位
聯集欄位 filter。可能會限制選取資料的篩選器種類。filter 只能是下列其中一項:
developerMetadataLookup

object (DeveloperMetadataLookup)

選取與開發人員中繼資料相符的資料,且與這個 DeveloperMetadataLookup 所描述的條件相符。

a1Range

string

選取符合指定 A1 範圍的資料。

gridRange

object (GridRange)

選取符合 GridRange 所描述範圍的資料。

開發人員中繼資料查詢

選取符合所有指定欄位的 DeveloperMetadata。例如,如果只指定中繼資料 ID,則將具有該專屬 ID 的 DeveloperMetadata 納入考量。指定中繼資料鍵後,系統就會將該金鑰的所有開發人員中繼資料納入考量。如果同時指定了鍵、顯示設定和位置類型,系統也會考量與該金鑰位置以及該類型位置相關聯的所有開發人員中繼資料,納入考量。一般而言,這會選取所有與指定欄位的交集相符的 DeveloperMetadata;可指定任何欄位或欄位的組合。

JSON 表示法
{
  "locationType": enum (DeveloperMetadataLocationType),
  "metadataLocation": {
    object (DeveloperMetadataLocation)
  },
  "locationMatchingStrategy": enum (DeveloperMetadataLocationMatchingStrategy),
  "metadataId": integer,
  "metadataKey": string,
  "metadataValue": string,
  "visibility": enum (DeveloperMetadataVisibility)
}
欄位
locationType

enum (DeveloperMetadataLocationType)

將所選開發人員中繼資料限制為與特定指定位置相關的項目。舉例來說,如果將這個欄位指定為 ROW,則這項查詢只會考量與資料列相關聯的開發人員中繼資料。如果不指定這個欄位,系統會考慮所有地區類型。將 locationMatchingStrategy 指定為 INTERSECTING 或將 metadataLocation 指定為非試算表位置時,無法將這個欄位指定為 SPREADSHEET:試算表中繼資料不得與任何其他開發人員中繼資料位置相交。如果將 locationMatchingStrategy 指定為 EXACT,這個欄位也必須留空。

metadataLocation

object (DeveloperMetadataLocation)

將所選開發人員中繼資料限制為與指定位置相關的項目。這個欄位符合指定 locationMatchingStrategy 的確切位置或所有相交位置。

locationMatchingStrategy

enum (DeveloperMetadataLocationMatchingStrategy)

決定此查詢比對位置的方式。如果將這個欄位指定為 EXACT,系統只會比對與指定位置相關聯的開發人員中繼資料。如果將這個欄位指定為 INTERSECTING,則與交集位置相關聯的開發人員中繼資料也會比對成功。如果未指定,這個欄位會採用預設值 INTERSECTING。如果指定此欄位,則必須一併指定 metadataLocation

metadataId

integer

將所選開發人員中繼資料限制為具有相符 DeveloperMetadata.metadata_id 的中繼資料。

metadataKey

string

將所選開發人員中繼資料限制為具有相符 DeveloperMetadata.metadata_key 的中繼資料。

metadataValue

string

將所選開發人員中繼資料限制為具有相符 DeveloperMetadata.metadata_value 的中繼資料。

visibility

enum (DeveloperMetadataVisibility)

將所選開發人員中繼資料限制為具有相符 DeveloperMetadata.visibility 的中繼資料。如未指定,系統會考慮要求專案的所有開發人員中繼資料。

開發人員中繼資料位置比對策略

比對開發人員中繼資料位置的策略列舉。

列舉
DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED 預設值。請勿使用這個值。
EXACT_LOCATION 表示必須完全符合指定的位置。舉例來說,如果將第 3 列指定為位置,則此比對策略只會比對第 3 列的開發人員中繼資料。系統不會考慮與其他地點相關聯的中繼資料。
INTERSECTING_LOCATION 表示指定的位置應與確切位置以及任何相交位置相符。舉例來說,如果將第 3 列指定為位置,則此比對策略會與第 3 列相關的開發人員中繼資料,以及與第 3 列位置相關聯的中繼資料。例如,如果 B 欄上有開發人員中繼資料,這項比對策略也會比對該地區,因為 B 欄與第三列相交。