REST Resource: deployments.packages

資源:套件

OTA 設定中的套件。

JSON 表示法
{
  "name": string,
  "title": string,
  "disabled": boolean,
  "deviceBuildRestrictions": [
    {
      object (IncludeExclude)
    }
  ],
  "details": {
    object (PackageDetails)
  }
}
欄位
name

string

僅供輸出。儲存的套件名稱。請注意,這是 Package 物件的專屬 ID,當建立新的 Package 時,伺服器會產生這個 ID。

title

string

檔案包的標題;也就是顯示名稱

disabled

boolean

是否針對指定的部署作業停用套件。

deviceBuildRestrictions[]

object (IncludeExclude)

選用設定。代表僅可套用至完整套件的建構指紋限制。請注意,所有重複的值都必須相同。選擇「全部包含」或「全部排除」這個值可以是版本指紋的子字串,例如「ABC」的限制值會比對任何包含「ABC」字串的版本指紋。

details

object (PackageDetails)

包裹的詳細資料。這是唯讀欄位。

IncludeExclude

加入或排除特定模式。

JSON 表示法
{

  // Union field include_exclude can be only one of the following:
  "include": string,
  "exclude": string
  // End of list of possible types for union field include_exclude.
}
欄位
聯集欄位 include_exclude。包含或排除的規則。include_exclude 只能是下列其中一項:
include

string

包含的模式。

exclude

string

排除模式。

PackageDetails

OTA 套件的詳細資料。

JSON 表示法
{
  "sizeBytes": string,
  "originalFilename": string,
  "preConditions": [
    {
      object (Condition)
    }
  ],
  "postConditions": [
    {
      object (Condition)
    }
  ],
  "properties": {
    object (PackageProperties)
  },
  "webDownloadUrl": string,
  "updateTime": string,
  "uploadState": enum (PackageUploadState),
  "uploadError": string,
  "uploadUser": string,
  "uploadTime": string,
  "approved": boolean,
  "beta": boolean,
  "versionTag": {
    object (VersionTag)
  }
}
欄位
sizeBytes

string (int64 format)

套件大小 (以位元組為單位)。

originalFilename

string

上傳的原始檔案名稱。

preConditions[]

object (Condition)

套件先決條件。

postConditions[]

object (Condition)

包裹送達後

properties

object (PackageProperties)

套件屬性。

webDownloadUrl

string

直接從 Google 下載套件的連結。適用於資訊主頁 / 控制台。

updateTime

string (Timestamp format)

上次修改套件項目的時間。

RFC3339 世界標準時間「Zulu」的時間戳記格式,解析度為奈秒,且最多 9 個小數位數。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

uploadState

enum (PackageUploadState)

套件的上傳狀態。

uploadError

string

上傳套件時發生錯誤。只有在 uploadState 為 FAILURE 時,才會設定這個欄位。

uploadUser

string

上傳套件的使用者電子郵件

uploadTime

string (Timestamp format)

上傳套件的時間。部分套件可能不適用這個做法。

RFC3339 世界標準時間「Zulu」的時間戳記格式,解析度為奈秒,且最多 9 個小數位數。範例:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

approved

boolean

套件是否已在 APFE 中獲得核准。

beta

boolean

套件是否已標示為 Beta 版套件。

versionTag

object (VersionTag)

套件版本。

PackageProperties

OTA 套件的屬性。

JSON 表示法
{
  "type": enum (PackageType),
  "requiredCache": string,
  "downgrade": boolean,
  "wipe": boolean,
  "streamingPropertyFiles": string
}
欄位
type

enum (PackageType)

OTA 套件類型,例如以區塊為基礎。

requiredCache

string (int64 format)

OTA 要求快取大小 (以位元組為單位)。

downgrade

boolean

OTA 套件是否為降級套件。

wipe

boolean

OTA 套件是否會套用抹除動作。

streamingPropertyFiles

string

串流 OTA 中使用的屬性檔案規格。

套件類型

這個 OTA 中的套件類型。

列舉
PACKAGE_TYPE_UNSPECIFIED 未指明
FILE 檔案型 OTA。
BLOCK 封鎖式 OTA。
AB A/B OTA。

PackageUploadState

檔案包上傳狀態。

套件檔案完整傳輸後,系統會建立 package,伺服器也會開始處理檔案,以便從檔案中讀取套件屬性。上傳狀態會設為 IN_PROGRESS,直到處理完畢為止。處理完畢後,上傳狀態會設為 SUCCESSFAILURE

列舉
PACKAGE_UPLOAD_STATE_UNSPECIFIED 未指明
SUCCESS 上傳成功。
FAILURE 上傳失敗,這很可能是因為檔案包無效 (原因有很多,例如無法解壓縮檔案)。
IN_PROGRESS 包裹仍在處理中。

方法

delete

刪除 package

get

可取得 package

list

清單 packages

listBatchGet

列出使用指定套件的所有設定。

update

更新 package