// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.6 // protoc v6.33.4 // source: file.proto package pluginapiv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) // FileInfo represents metadata about an uploaded file. // This is a standalone definition for use outside of Post context. // Maps to model.FileInfo in Go. // // Note: A FileInfo message is also defined in post.proto as part of PostMetadata. // This file provides the canonical standalone definition for file-related API methods. type FileInfo struct { state protoimpl.MessageState `protogen:"open.v1"` // Unique identifier for the file (26-char ID) Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // ID of the user who uploaded the file CreatorId string `protobuf:"bytes,2,opt,name=creator_id,json=creatorId,proto3" json:"creator_id,omitempty"` // ID of the post this file is attached to (may be empty before attachment) PostId string `protobuf:"bytes,3,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` // ID of the channel this file is in (denormalized from post) ChannelId string `protobuf:"bytes,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // Timestamp when the file was created (milliseconds since epoch) CreateAt int64 `protobuf:"varint,5,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` // Timestamp when the file was last updated (milliseconds since epoch) UpdateAt int64 `protobuf:"varint,6,opt,name=update_at,json=updateAt,proto3" json:"update_at,omitempty"` // Timestamp when the file was deleted (0 if not deleted, milliseconds since epoch) DeleteAt int64 `protobuf:"varint,7,opt,name=delete_at,json=deleteAt,proto3" json:"delete_at,omitempty"` // Original filename as uploaded Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"` // File extension without the leading dot (e.g., "png", "pdf") Extension string `protobuf:"bytes,9,opt,name=extension,proto3" json:"extension,omitempty"` // File size in bytes Size int64 `protobuf:"varint,10,opt,name=size,proto3" json:"size,omitempty"` // MIME type of the file (e.g., "image/png", "application/pdf") MimeType string `protobuf:"bytes,11,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"` // Image width in pixels (0 for non-image files) Width int32 `protobuf:"varint,12,opt,name=width,proto3" json:"width,omitempty"` // Image height in pixels (0 for non-image files) Height int32 `protobuf:"varint,13,opt,name=height,proto3" json:"height,omitempty"` // Whether a preview image was generated for this file HasPreviewImage bool `protobuf:"varint,14,opt,name=has_preview_image,json=hasPreviewImage,proto3" json:"has_preview_image,omitempty"` // Mini preview data (small base64-encoded thumbnail for images) MiniPreview []byte `protobuf:"bytes,15,opt,name=mini_preview,json=miniPreview,proto3,oneof" json:"mini_preview,omitempty"` // Remote cluster ID if this file is from a shared channel RemoteId *string `protobuf:"bytes,16,opt,name=remote_id,json=remoteId,proto3,oneof" json:"remote_id,omitempty"` // Whether the file content has been archived and is no longer accessible Archived bool `protobuf:"varint,17,opt,name=archived,proto3" json:"archived,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FileInfo) Reset() { *x = FileInfo{} mi := &file_file_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *FileInfo) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileInfo) ProtoMessage() {} func (x *FileInfo) ProtoReflect() protoreflect.Message { mi := &file_file_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileInfo.ProtoReflect.Descriptor instead. func (*FileInfo) Descriptor() ([]byte, []int) { return file_file_proto_rawDescGZIP(), []int{0} } func (x *FileInfo) GetId() string { if x != nil { return x.Id } return "" } func (x *FileInfo) GetCreatorId() string { if x != nil { return x.CreatorId } return "" } func (x *FileInfo) GetPostId() string { if x != nil { return x.PostId } return "" } func (x *FileInfo) GetChannelId() string { if x != nil { return x.ChannelId } return "" } func (x *FileInfo) GetCreateAt() int64 { if x != nil { return x.CreateAt } return 0 } func (x *FileInfo) GetUpdateAt() int64 { if x != nil { return x.UpdateAt } return 0 } func (x *FileInfo) GetDeleteAt() int64 { if x != nil { return x.DeleteAt } return 0 } func (x *FileInfo) GetName() string { if x != nil { return x.Name } return "" } func (x *FileInfo) GetExtension() string { if x != nil { return x.Extension } return "" } func (x *FileInfo) GetSize() int64 { if x != nil { return x.Size } return 0 } func (x *FileInfo) GetMimeType() string { if x != nil { return x.MimeType } return "" } func (x *FileInfo) GetWidth() int32 { if x != nil { return x.Width } return 0 } func (x *FileInfo) GetHeight() int32 { if x != nil { return x.Height } return 0 } func (x *FileInfo) GetHasPreviewImage() bool { if x != nil { return x.HasPreviewImage } return false } func (x *FileInfo) GetMiniPreview() []byte { if x != nil { return x.MiniPreview } return nil } func (x *FileInfo) GetRemoteId() string { if x != nil && x.RemoteId != nil { return *x.RemoteId } return "" } func (x *FileInfo) GetArchived() bool { if x != nil { return x.Archived } return false } // FileUploadResponse represents the response from a file upload. type FileUploadResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // The uploaded file info FileInfos []*FileInfo `protobuf:"bytes,1,rep,name=file_infos,json=fileInfos,proto3" json:"file_infos,omitempty"` // Client-provided IDs for tracking uploads ClientIds []string `protobuf:"bytes,2,rep,name=client_ids,json=clientIds,proto3" json:"client_ids,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FileUploadResponse) Reset() { *x = FileUploadResponse{} mi := &file_file_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *FileUploadResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileUploadResponse) ProtoMessage() {} func (x *FileUploadResponse) ProtoReflect() protoreflect.Message { mi := &file_file_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileUploadResponse.ProtoReflect.Descriptor instead. func (*FileUploadResponse) Descriptor() ([]byte, []int) { return file_file_proto_rawDescGZIP(), []int{1} } func (x *FileUploadResponse) GetFileInfos() []*FileInfo { if x != nil { return x.FileInfos } return nil } func (x *FileUploadResponse) GetClientIds() []string { if x != nil { return x.ClientIds } return nil } // FileData represents the raw file content for upload. // Maps to model.FileData in Go. type FileData struct { state protoimpl.MessageState `protogen:"open.v1"` // The filename Filename string `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"` // The raw file content Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *FileData) Reset() { *x = FileData{} mi := &file_file_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *FileData) String() string { return protoimpl.X.MessageStringOf(x) } func (*FileData) ProtoMessage() {} func (x *FileData) ProtoReflect() protoreflect.Message { mi := &file_file_proto_msgTypes[2] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) } // Deprecated: Use FileData.ProtoReflect.Descriptor instead. func (*FileData) Descriptor() ([]byte, []int) { return file_file_proto_rawDescGZIP(), []int{2} } func (x *FileData) GetFilename() string { if x != nil { return x.Filename } return "" } func (x *FileData) GetData() []byte { if x != nil { return x.Data } return nil } var File_file_proto protoreflect.FileDescriptor const file_file_proto_rawDesc = "" + "\n" + "\n" + "file.proto\x12\x17mattermost.pluginapi.v1\"\x8a\x04\n" + "\bFileInfo\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1d\n" + "\n" + "creator_id\x18\x02 \x01(\tR\tcreatorId\x12\x17\n" + "\apost_id\x18\x03 \x01(\tR\x06postId\x12\x1d\n" + "\n" + "channel_id\x18\x04 \x01(\tR\tchannelId\x12\x1b\n" + "\tcreate_at\x18\x05 \x01(\x03R\bcreateAt\x12\x1b\n" + "\tupdate_at\x18\x06 \x01(\x03R\bupdateAt\x12\x1b\n" + "\tdelete_at\x18\a \x01(\x03R\bdeleteAt\x12\x12\n" + "\x04name\x18\b \x01(\tR\x04name\x12\x1c\n" + "\textension\x18\t \x01(\tR\textension\x12\x12\n" + "\x04size\x18\n" + " \x01(\x03R\x04size\x12\x1b\n" + "\tmime_type\x18\v \x01(\tR\bmimeType\x12\x14\n" + "\x05width\x18\f \x01(\x05R\x05width\x12\x16\n" + "\x06height\x18\r \x01(\x05R\x06height\x12*\n" + "\x11has_preview_image\x18\x0e \x01(\bR\x0fhasPreviewImage\x12&\n" + "\fmini_preview\x18\x0f \x01(\fH\x00R\vminiPreview\x88\x01\x01\x12 \n" + "\tremote_id\x18\x10 \x01(\tH\x01R\bremoteId\x88\x01\x01\x12\x1a\n" + "\barchived\x18\x11 \x01(\bR\barchivedB\x0f\n" + "\r_mini_previewB\f\n" + "\n" + "_remote_id\"u\n" + "\x12FileUploadResponse\x12@\n" + "\n" + "file_infos\x18\x01 \x03(\v2!.mattermost.pluginapi.v1.FileInfoR\tfileInfos\x12\x1d\n" + "\n" + "client_ids\x18\x02 \x03(\tR\tclientIds\":\n" + "\bFileData\x12\x1a\n" + "\bfilename\x18\x01 \x01(\tR\bfilename\x12\x12\n" + "\x04data\x18\x02 \x01(\fR\x04dataBXZVgithub.com/mattermost/mattermost/server/public/pluginapi/grpc/generated/go/pluginapiv1b\x06proto3" var ( file_file_proto_rawDescOnce sync.Once file_file_proto_rawDescData []byte ) func file_file_proto_rawDescGZIP() []byte { file_file_proto_rawDescOnce.Do(func() { file_file_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_file_proto_rawDesc), len(file_file_proto_rawDesc))) }) return file_file_proto_rawDescData } var file_file_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_file_proto_goTypes = []any{ (*FileInfo)(nil), // 0: mattermost.pluginapi.v1.FileInfo (*FileUploadResponse)(nil), // 1: mattermost.pluginapi.v1.FileUploadResponse (*FileData)(nil), // 2: mattermost.pluginapi.v1.FileData } var file_file_proto_depIdxs = []int32{ 0, // 0: mattermost.pluginapi.v1.FileUploadResponse.file_infos:type_name -> mattermost.pluginapi.v1.FileInfo 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name } func init() { file_file_proto_init() } func file_file_proto_init() { if File_file_proto != nil { return } file_file_proto_msgTypes[0].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_file_proto_rawDesc), len(file_file_proto_rawDesc)), NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, GoTypes: file_file_proto_goTypes, DependencyIndexes: file_file_proto_depIdxs, MessageInfos: file_file_proto_msgTypes, }.Build() File_file_proto = out.File file_file_proto_goTypes = nil file_file_proto_depIdxs = nil }