REST Resource: projects.locations.corpora.assets.annotations

資源:註解

註解是素材資源中的資源。代表素材資源中內容的鍵/值對應。

JSON 表示法
{
  "name": string,
  "userSpecifiedAnnotation": {
    object (UserSpecifiedAnnotation)
  }
}
欄位
name

string

註解的資源名稱。格式:projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}

userSpecifiedAnnotation

object (UserSpecifiedAnnotation)

使用者提供的註解。

UserSpecifiedAnnotation

使用者提供的註解。

JSON 表示法
{
  "key": string,
  "value": {
    object (AnnotationValue)
  },
  "partition": {
    object (Partition)
  }
}
欄位
key

string

這是必要旗標,註解的鍵。請務必使用 CreateDataSchema 為鍵設定類型。

value

object (AnnotationValue)

註解的值。值必須能夠根據資料結構定義轉換為該類型。

partition

object (Partition)

針對子資產層級註解,在時間和空間上劃分資訊。

AnnotationValue

註解的值,包括資料結構定義中可用的所有類型。

JSON 表示法
{

  // Union field value can be only one of the following:
  "intValue": string,
  "floatValue": number,
  "strValue": string,
  "datetimeValue": string,
  "geoCoordinate": {
    object (GeoCoordinate)
  },
  "protoAnyValue": {
    "@type": string,
    field1: ...,
    ...
  },
  "boolValue": boolean,
  "customizedStructDataValue": {
    object
  },
  "listValue": {
    object (AnnotationList)
  },
  "customizedStructValue": {
    object (AnnotationCustomizedStruct)
  }
  // End of list of possible types for union field value.
}
欄位

聯集欄位 value

value 只能是下列其中一項:

intValue

string (int64 format)

int 類型註解的值。

floatValue

number

浮點型註解的值。

strValue

string

字串類型註解的值。

datetimeValue

string

日期時間類型註解的值。

geoCoordinate

object (GeoCoordinate)

地理座標類型註解的值。

protoAnyValue

object

任何 proto 值的值。

含有任意類型欄位的物件。額外的 "@type" 欄位則包含能辨識類型的 URI。範例:{ "id": 1234, "@type": "types.example.com/standard/id" }

boolValue

boolean

布林型註解的值。

customizedStructDataValue

object (Struct format)

自訂結構定義註解的值。這個欄位不會有任何效果。請改用 customizedStructValue 做為自訂結構體註解。

listValue

object (AnnotationList)

清單類型註解的值。

customizedStructValue

object (AnnotationCustomizedStruct)

自訂結構體類型註解的值。

GeoCoordinate

位置座標表示法

JSON 表示法
{
  "latitude": number,
  "longitude": number
}
欄位
latitude

number

緯度座標。度數 [-90 .. 90]

longitude

number

經度座標。度數 [-180 .. 180]

AnnotationList

註解中的清單表示法。

JSON 表示法
{
  "values": [
    {
      object (AnnotationValue)
    }
  ]
}
欄位
values[]

object (AnnotationValue)

LIST 資料類型註解的值。

AnnotationCustomizedStruct

註解中的自訂結構表示法。

JSON 表示法
{
  "elements": {
    string: {
      object (AnnotationValue)
    },
    ...
  }
}
欄位
elements

map (key: string, value: object (AnnotationValue))

從元素索引鍵到元素註解值的對應。

包含 "key": value 組合清單的物件。範例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

分區

分割區,用於指定子資產層級註解的時間和空間分割區。

JSON 表示法
{
  "temporalPartition": {
    object (TemporalPartition)
  },
  "spatialPartition": {
    object (SpatialPartition)
  },
  "relativeTemporalPartition": {
    object (RelativeTemporalPartition)
  }
}
欄位
temporalPartition

object (TemporalPartition)

時間上的資產區隔。

spatialPartition

object (SpatialPartition)

在聊天室中分割素材資源。

relativeTemporalPartition

object (RelativeTemporalPartition)

時間上的資產區隔。

TemporalPartition

以世界標準時間紀元時間為準的資產區段。此參數支援 STREAM_VIDEO 字詞庫類型。

JSON 表示法
{
  "startTime": string,
  "endTime": string
}
欄位
startTime

string (Timestamp format)

分區的開始時間。

採用 RFC3339 世界標準時間「Zulu」格式的時間戳記,精確度達奈秒單位,最多九個小數位數。例如:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

endTime

string (Timestamp format)

分區結束時間。

採用 RFC3339 世界標準時間「Zulu」格式的時間戳記,精確度達奈秒單位,最多九個小數位數。例如:"2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z"

SpatialPartition

在聊天室中分割素材資源。

JSON 表示法
{
  "xMin": string,
  "yMin": string,
  "xMax": string,
  "yMax": string
}
欄位
xMin

string (int64 format)

最小 X 座標值。

yMin

string (int64 format)

最小 Y 座標值。

xMax

string (int64 format)

最大 X 座標值。

yMax

string (int64 format)

最大 Y 座標值。

RelativeTemporalPartition

以相對時間分割資產。由 VIDEO_ON_DEMAND 字元集類型支援。

JSON 表示法
{
  "startOffset": string,
  "endOffset": string
}
欄位
startOffset

string (Duration format)

分區的開始時間偏移量。

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

endOffset

string (Duration format)

分區的結束時間偏移量。

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

方法

create

在素材資源中建立註解。

delete

刪除素材資源中的註解。

get

讀取資產內的註解。

list

列出資產中的註解清單。

patch

更新資產內的註解。