REST Resource: spaces.messages.attachments

리소스: Attachment

Google Chat의 첨부파일입니다.

JSON 표현
{
  "name": string,
  "contentName": string,
  "contentType": string,
  "thumbnailUri": string,
  "downloadUri": string,
  "source": enum (Source),

  // Union field data_ref can be only one of the following:
  "attachmentDataRef": {
    object (AttachmentDataRef)
  },
  "driveDataRef": {
    object (DriveDataRef)
  }
  // End of list of possible types for union field data_ref.
}
필드
name

string

첨부파일 형식(spaces/*/messages/*/attachments/* 형식)의 리소스 이름입니다.

contentName

string

출력 전용. 전체 경로가 아닌 콘텐츠의 원본 파일 이름입니다.

contentType

string

출력 전용. 파일의 콘텐츠 유형 (MIME 유형)입니다.

thumbnailUri

string

출력 전용. 첨부파일을 첨부파일로 미리 보는 데 사용할 미리보기 URL입니다. 채팅 앱은 첨부파일 콘텐츠를 다운로드하는 데 이 URL을 사용해서는 안 됩니다.

downloadUri

string

출력 전용. 사람이 첨부파일을 다운로드할 수 있도록 허용하는 다운로드 URL입니다. 채팅 앱은 첨부파일 콘텐츠를 다운로드하는 데 이 URL을 사용해서는 안 됩니다.

source

enum (Source)

출력 전용. 첨부파일의 소스입니다.

통합 필드 data_ref.

data_ref는 다음 중 하나여야 합니다.

attachmentDataRef

object (AttachmentDataRef)

첨부파일 데이터에 대한 참조입니다. 이 필드는 첨부파일 데이터를 다운로드하는 데 Media API와 함께 사용됩니다.

driveDataRef

object (DriveDataRef)

출력 전용. Google Drive 첨부파일에 대한 참조입니다. 이 필드는 Google Drive API와 함께 사용됩니다.

첨부파일 데이터 참조

JSON 표현
{
  "resourceName": string,
  "attachmentUploadToken": string
}
필드
resourceName

string

첨부파일 데이터의 리소스 이름입니다. 이 필드는 첨부파일 데이터를 다운로드하는 데 Media API와 함께 사용됩니다.

attachmentUploadToken

string

업로드된 첨부파일에 대한 참조가 포함된 불투명 토큰입니다. 클라이언트가 불투명 문자열로 처리하며 첨부파일이 있는 Chat 메시지를 만들거나 업데이트하는 데 사용됩니다.

DriveDataRef

드라이브 첨부파일의 데이터에 대한 참조입니다.

JSON 표현
{
  "driveFileId": string
}
필드
driveFileId

string

드라이브 파일의 ID입니다. Drive API와 함께 사용합니다.

소스

열거형
SOURCE_UNSPECIFIED
DRIVE_FILE
UPLOADED_CONTENT

방법

get

메시지 첨부파일의 메타데이터를 가져옵니다.