文档API 参考

Rust · 0.1.0

UploadAttachmentSpec

应用协议结构。字段名称及继承的描述保留原始语言。

此结构在哪里使用

以下链接根据协议快照中的直接引用生成。认证、可写字段和运行行为应以调用操作为准;可复用资源结构本身并不是完整的写入请求。

被以下组件结构引用:

结构与字段

object

字段类型 / 是否必需描述
attachmentallOf
Attachment
必需
Required. Metadata for the attachment to create. content must be empty; file bytes are sent in data.
attachmentIdstringOptional. The attachment ID to use for this attachment. If empty, a unique ID will be generated. Format: ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$
totalSizestringOptional. Total size of the file in bytes before media processing. Zero represents an empty file.

完整结构

约束与嵌套结构请以这份完整 JSON 定义为准。字段出现在这里,并不意味着每位调用者都能修改它。

{
  "required": [
    "attachment"
  ],
  "type": "object",
  "properties": {
    "attachment": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Attachment"
        }
      ],
      "description": "Required. Metadata for the attachment to create. content must be empty;\n file bytes are sent in data."
    },
    "attachmentId": {
      "type": "string",
      "description": "Optional. The attachment ID to use for this attachment.\n If empty, a unique ID will be generated.\n Format: ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$"
    },
    "totalSize": {
      "type": "string",
      "description": "Optional. Total size of the file in bytes before media processing.\n Zero represents an empty file."
    }
  }
}