REST Resource: projects.locations.corpora.assets

資源:Asset

資產是語料庫中的資源。它代表文件集內的媒體物件,包含中繼資料和其他資源註解。您可以將不同的功能套用至資產,產生註解。使用者可以指定與目標資產相關的註解。

JSON 表示法
{
  "name": string,
  "ttl": string,
  "assetGcsSource": {
    object (AssetGcsSource)
  }
}
欄位
name

string

資產的資源名稱。表單:projects/{project_number}/locations/{locationId}/corpora/{corpus_id}/assets/{assetId}

ttl

string (Duration format)

所有媒體素材資源、相關中繼資料和搜尋文件的有效時間。如果未設定,系統會使用上層字體庫資源中的預設 ttl。

以秒為單位的時間長度,最多可有 9 個小數位數,結尾為「s」,例如:"3.5s"

assetGcsSource

object (AssetGcsSource)

僅供輸出。與此資產相關聯的原始 Cloud Storage 來源 URI。

AssetGcsSource

資產來源來自 Cloud Storage。

JSON 表示法
{
  "gcsUri": string
}
欄位
gcsUri

string

Cloud Storage URI。

方法

analyze

分析資產,強化搜尋功能。

clip

產生可供下載的短片。

create

在語料庫中建立資產。

delete

刪除語料庫中的資產。

generateHlsUri

為 HLS 資訊清單產生 URI。

generateRetrievalUrl

產生已簽署的網址,用於下載素材資源。

get

讀取語料庫中的資產。

import

從 Cloud Storage 中的中繼檔案匯入資產 (圖片和註解)。

index

為搜尋功能建立一個索引。

list

列出詞彙庫中的資產清單。

patch

更新詞彙庫中的資產。

removeIndex

移除單一素材資源的搜尋索引資料。

upload

指定資產的 Cloud Storage uri 來上傳資產。