Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

57.1 KB
Raw Blame
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.12
// 	protoc        (unknown)
// source: api/attachment_service.proto

package api

import (
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
	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)
)

// MotionMediaFamily is the format of a motion photo.
type MotionMediaFamily int32

const (
	MotionMediaFamily_MOTION_MEDIA_FAMILY_UNSPECIFIED MotionMediaFamily = 0
	// An Apple Live Photo: a still image and a video stored as separate attachments.
	MotionMediaFamily_APPLE_LIVE_PHOTO MotionMediaFamily = 1
	// An Android motion photo: a JPEG with an embedded video.
	MotionMediaFamily_ANDROID_MOTION_PHOTO MotionMediaFamily = 2
)

// Enum value maps for MotionMediaFamily.
var (
	MotionMediaFamily_name = map[int32]string{
		0: "MOTION_MEDIA_FAMILY_UNSPECIFIED",
		1: "APPLE_LIVE_PHOTO",
		2: "ANDROID_MOTION_PHOTO",
	}
	MotionMediaFamily_value = map[string]int32{
		"MOTION_MEDIA_FAMILY_UNSPECIFIED": 0,
		"APPLE_LIVE_PHOTO":                1,
		"ANDROID_MOTION_PHOTO":            2,
	}
)

func (x MotionMediaFamily) Enum() *MotionMediaFamily {
	p := new(MotionMediaFamily)
	*p = x
	return p
}

func (x MotionMediaFamily) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (MotionMediaFamily) Descriptor() protoreflect.EnumDescriptor {
	return file_api_attachment_service_proto_enumTypes[0].Descriptor()
}

func (MotionMediaFamily) Type() protoreflect.EnumType {
	return &file_api_attachment_service_proto_enumTypes[0]
}

func (x MotionMediaFamily) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use MotionMediaFamily.Descriptor instead.
func (MotionMediaFamily) EnumDescriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{0}
}

// MotionMediaRole is the part an attachment plays in a motion photo.
type MotionMediaRole int32

const (
	MotionMediaRole_MOTION_MEDIA_ROLE_UNSPECIFIED MotionMediaRole = 0
	// The still image of an Apple Live Photo.
	MotionMediaRole_STILL MotionMediaRole = 1
	// The video of an Apple Live Photo.
	MotionMediaRole_VIDEO MotionMediaRole = 2
	// A single file holding both the still image and the video.
	MotionMediaRole_CONTAINER MotionMediaRole = 3
)

// Enum value maps for MotionMediaRole.
var (
	MotionMediaRole_name = map[int32]string{
		0: "MOTION_MEDIA_ROLE_UNSPECIFIED",
		1: "STILL",
		2: "VIDEO",
		3: "CONTAINER",
	}
	MotionMediaRole_value = map[string]int32{
		"MOTION_MEDIA_ROLE_UNSPECIFIED": 0,
		"STILL":                         1,
		"VIDEO":                         2,
		"CONTAINER":                     3,
	}
)

func (x MotionMediaRole) Enum() *MotionMediaRole {
	p := new(MotionMediaRole)
	*p = x
	return p
}

func (x MotionMediaRole) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (MotionMediaRole) Descriptor() protoreflect.EnumDescriptor {
	return file_api_attachment_service_proto_enumTypes[1].Descriptor()
}

func (MotionMediaRole) Type() protoreflect.EnumType {
	return &file_api_attachment_service_proto_enumTypes[1]
}

func (x MotionMediaRole) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use MotionMediaRole.Descriptor instead.
func (MotionMediaRole) EnumDescriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{1}
}

// Attachment is a file uploaded by a user, optionally linked to a memo.
type Attachment struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Identifier. The resource name of the attachment.
	// Format: attachments/{attachment}
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Output only. The user who uploaded the attachment, which may differ from the creator of the linked memo.
	// Format: users/{user}
	Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
	// Required. The filename of the attachment.
	Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"`
	// Required. The MIME type of the attachment. If empty on create, the service detects it from the filename and
	// content.
	Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	// Input only. The content of the attachment.
	Content []byte `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
	// Optional. The external link of the attachment. Set only for externally stored attachments; ignored on create.
	ExternalLink string `protobuf:"bytes,6,opt,name=external_link,json=externalLink,proto3" json:"external_link,omitempty"`
	// Optional. Motion photo metadata. Clients may only supply Apple Live Photo metadata; the service detects Android
	// motion photos in JPEG content.
	MotionMedia *MotionMedia `protobuf:"bytes,7,opt,name=motion_media,json=motionMedia,proto3" json:"motion_media,omitempty"`
	// Optional. Normalized media metadata supplied by the client at creation time. Immutable after creation.
	MediaMetadata *MediaMetadata `protobuf:"bytes,8,opt,name=media_metadata,json=mediaMetadata,proto3" json:"media_metadata,omitempty"`
	// Optional. The memo the attachment is linked to. On create, the caller must be able to manage the memo.
	// Format: memos/{memo}
	Memo *string `protobuf:"bytes,9,opt,name=memo,proto3,oneof" json:"memo,omitempty"`
	// Output only. The size of the stored content in bytes.
	Size int64 `protobuf:"varint,10,opt,name=size,proto3" json:"size,omitempty"`
	// Output only. The creation time.
	CreateTime    *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *Attachment) Reset() {
	*x = Attachment{}
	mi := &file_api_attachment_service_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *Attachment) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*Attachment) ProtoMessage() {}

func (x *Attachment) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_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 Attachment.ProtoReflect.Descriptor instead.
func (*Attachment) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{0}
}

func (x *Attachment) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

func (x *Attachment) GetCreator() string {
	if x != nil {
		return x.Creator
	}
	return ""
}

func (x *Attachment) GetFilename() string {
	if x != nil {
		return x.Filename
	}
	return ""
}

func (x *Attachment) GetType() string {
	if x != nil {
		return x.Type
	}
	return ""
}

func (x *Attachment) GetContent() []byte {
	if x != nil {
		return x.Content
	}
	return nil
}

func (x *Attachment) GetExternalLink() string {
	if x != nil {
		return x.ExternalLink
	}
	return ""
}

func (x *Attachment) GetMotionMedia() *MotionMedia {
	if x != nil {
		return x.MotionMedia
	}
	return nil
}

func (x *Attachment) GetMediaMetadata() *MediaMetadata {
	if x != nil {
		return x.MediaMetadata
	}
	return nil
}

func (x *Attachment) GetMemo() string {
	if x != nil && x.Memo != nil {
		return *x.Memo
	}
	return ""
}

func (x *Attachment) GetSize() int64 {
	if x != nil {
		return x.Size
	}
	return 0
}

func (x *Attachment) GetCreateTime() *timestamppb.Timestamp {
	if x != nil {
		return x.CreateTime
	}
	return nil
}

// Request message for AttachmentService.ListAttachments.
type ListAttachmentsRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Optional. The maximum number of attachments to return. The service may return fewer.
	// If unspecified, at most 50 attachments are returned. Values above 1000 are coerced to 1000.
	PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// Optional. A page token from a previous call. Provide it to retrieve the next page.
	PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// Optional. A CEL filter over the results.
	// Example: `mime_type == "image/png"` or `filename.contains("test")`.
	// Supported operators: ==, !=, <, <=, >, >=, : (contains), in.
	// Supported fields: creator, filename, mime_type, create_time, memo_id, space.
	// `creator` is the linked memo's creator, or the uploader for an unlinked attachment. It supports equality with a
	// User resource name.
	// `space` is the linked memo's Space resource name, or null when the attachment is unlinked or its memo has no
	// space. It supports only a non-negated `==` comparison with a Space resource name or null.
	Filter string `protobuf:"bytes,3,opt,name=filter,proto3" json:"filter,omitempty"`
	// Optional. The order to sort results by, such as "create_time desc" or "filename asc". The service does not apply
	// it yet.
	OrderBy       string `protobuf:"bytes,4,opt,name=order_by,json=orderBy,proto3" json:"order_by,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ListAttachmentsRequest) Reset() {
	*x = ListAttachmentsRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ListAttachmentsRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ListAttachmentsRequest) ProtoMessage() {}

func (x *ListAttachmentsRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_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 ListAttachmentsRequest.ProtoReflect.Descriptor instead.
func (*ListAttachmentsRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{1}
}

func (x *ListAttachmentsRequest) GetPageSize() int32 {
	if x != nil {
		return x.PageSize
	}
	return 0
}

func (x *ListAttachmentsRequest) GetPageToken() string {
	if x != nil {
		return x.PageToken
	}
	return ""
}

func (x *ListAttachmentsRequest) GetFilter() string {
	if x != nil {
		return x.Filter
	}
	return ""
}

func (x *ListAttachmentsRequest) GetOrderBy() string {
	if x != nil {
		return x.OrderBy
	}
	return ""
}

// Response message for AttachmentService.ListAttachments.
type ListAttachmentsResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The attachments.
	Attachments []*Attachment `protobuf:"bytes,1,rep,name=attachments,proto3" json:"attachments,omitempty"`
	// A token to retrieve the next page. Empty when there are no more pages.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *ListAttachmentsResponse) Reset() {
	*x = ListAttachmentsResponse{}
	mi := &file_api_attachment_service_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *ListAttachmentsResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*ListAttachmentsResponse) ProtoMessage() {}

func (x *ListAttachmentsResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_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 ListAttachmentsResponse.ProtoReflect.Descriptor instead.
func (*ListAttachmentsResponse) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{2}
}

func (x *ListAttachmentsResponse) GetAttachments() []*Attachment {
	if x != nil {
		return x.Attachments
	}
	return nil
}

func (x *ListAttachmentsResponse) GetNextPageToken() string {
	if x != nil {
		return x.NextPageToken
	}
	return ""
}

// Request message for AttachmentService.GetAttachment.
type GetAttachmentRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The name of the attachment to get.
	// Format: attachments/{attachment}
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *GetAttachmentRequest) Reset() {
	*x = GetAttachmentRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetAttachmentRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetAttachmentRequest) ProtoMessage() {}

func (x *GetAttachmentRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[3]
	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 GetAttachmentRequest.ProtoReflect.Descriptor instead.
func (*GetAttachmentRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{3}
}

func (x *GetAttachmentRequest) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

// Request message for AttachmentService.CreateAttachment.
type CreateAttachmentRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The attachment to create.
	Attachment *Attachment `protobuf:"bytes,1,opt,name=attachment,proto3" json:"attachment,omitempty"`
	// Optional. The ID to use for the attachment. If empty, a unique ID is generated.
	// Format: ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$
	AttachmentId  string `protobuf:"bytes,2,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CreateAttachmentRequest) Reset() {
	*x = CreateAttachmentRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[4]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CreateAttachmentRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CreateAttachmentRequest) ProtoMessage() {}

func (x *CreateAttachmentRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[4]
	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 CreateAttachmentRequest.ProtoReflect.Descriptor instead.
func (*CreateAttachmentRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{4}
}

func (x *CreateAttachmentRequest) GetAttachment() *Attachment {
	if x != nil {
		return x.Attachment
	}
	return nil
}

func (x *CreateAttachmentRequest) GetAttachmentId() string {
	if x != nil {
		return x.AttachmentId
	}
	return ""
}

// Request message for AttachmentService.UpdateAttachment.
type UpdateAttachmentRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The attachment to update. Its `name` identifies the attachment.
	Attachment *Attachment `protobuf:"bytes,1,opt,name=attachment,proto3" json:"attachment,omitempty"`
	// Required. The fields to update. Only `filename` is supported.
	UpdateMask    *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UpdateAttachmentRequest) Reset() {
	*x = UpdateAttachmentRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[5]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *UpdateAttachmentRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UpdateAttachmentRequest) ProtoMessage() {}

func (x *UpdateAttachmentRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[5]
	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 UpdateAttachmentRequest.ProtoReflect.Descriptor instead.
func (*UpdateAttachmentRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{5}
}

func (x *UpdateAttachmentRequest) GetAttachment() *Attachment {
	if x != nil {
		return x.Attachment
	}
	return nil
}

func (x *UpdateAttachmentRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
	if x != nil {
		return x.UpdateMask
	}
	return nil
}

// Request message for AttachmentService.DeleteAttachment.
type DeleteAttachmentRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The name of the attachment to delete.
	// Format: attachments/{attachment}
	Name          string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *DeleteAttachmentRequest) Reset() {
	*x = DeleteAttachmentRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[6]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *DeleteAttachmentRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*DeleteAttachmentRequest) ProtoMessage() {}

func (x *DeleteAttachmentRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[6]
	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 DeleteAttachmentRequest.ProtoReflect.Descriptor instead.
func (*DeleteAttachmentRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{6}
}

func (x *DeleteAttachmentRequest) GetName() string {
	if x != nil {
		return x.Name
	}
	return ""
}

// Request message for AttachmentService.BatchDeleteAttachments.
type BatchDeleteAttachmentsRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. The names of the attachments to delete, at most 100. Duplicate names are ignored.
	// Format: attachments/{attachment}
	Names         []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *BatchDeleteAttachmentsRequest) Reset() {
	*x = BatchDeleteAttachmentsRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[7]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *BatchDeleteAttachmentsRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*BatchDeleteAttachmentsRequest) ProtoMessage() {}

func (x *BatchDeleteAttachmentsRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[7]
	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 BatchDeleteAttachmentsRequest.ProtoReflect.Descriptor instead.
func (*BatchDeleteAttachmentsRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{7}
}

func (x *BatchDeleteAttachmentsRequest) GetNames() []string {
	if x != nil {
		return x.Names
	}
	return nil
}

// Request message for AttachmentService.UploadAttachment.
type UploadAttachmentRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Starts a new upload or continues an existing one. Exactly one must be set.
	//
	// Types that are valid to be assigned to Upload:
	//
	//	*UploadAttachmentRequest_Spec
	//	*UploadAttachmentRequest_UploadId
	Upload isUploadAttachmentRequest_Upload `protobuf_oneof:"upload"`
	// Required. Zero-based byte offset at which data is written. Must equal the committed size, except when retrying
	// the most recently accepted chunk with identical bytes and offset, which is accepted without writing again.
	WriteOffset int64 `protobuf:"varint,3,opt,name=write_offset,json=writeOffset,proto3" json:"write_offset,omitempty"`
	// Optional. File bytes, at most max_chunk_size long. With no data and finish_write false, the call reports
	// progress without writing, and write_offset is ignored.
	Data []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	// Optional. Finalize the upload after writing data. The committed size must then equal total_size. Any later call
	// for the same upload_id returns the created attachment.
	FinishWrite   bool `protobuf:"varint,5,opt,name=finish_write,json=finishWrite,proto3" json:"finish_write,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UploadAttachmentRequest) Reset() {
	*x = UploadAttachmentRequest{}
	mi := &file_api_attachment_service_proto_msgTypes[8]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *UploadAttachmentRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UploadAttachmentRequest) ProtoMessage() {}

func (x *UploadAttachmentRequest) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[8]
	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 UploadAttachmentRequest.ProtoReflect.Descriptor instead.
func (*UploadAttachmentRequest) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{8}
}

func (x *UploadAttachmentRequest) GetUpload() isUploadAttachmentRequest_Upload {
	if x != nil {
		return x.Upload
	}
	return nil
}

func (x *UploadAttachmentRequest) GetSpec() *UploadAttachmentSpec {
	if x != nil {
		if x, ok := x.Upload.(*UploadAttachmentRequest_Spec); ok {
			return x.Spec
		}
	}
	return nil
}

func (x *UploadAttachmentRequest) GetUploadId() string {
	if x != nil {
		if x, ok := x.Upload.(*UploadAttachmentRequest_UploadId); ok {
			return x.UploadId
		}
	}
	return ""
}

func (x *UploadAttachmentRequest) GetWriteOffset() int64 {
	if x != nil {
		return x.WriteOffset
	}
	return 0
}

func (x *UploadAttachmentRequest) GetData() []byte {
	if x != nil {
		return x.Data
	}
	return nil
}

func (x *UploadAttachmentRequest) GetFinishWrite() bool {
	if x != nil {
		return x.FinishWrite
	}
	return false
}

type isUploadAttachmentRequest_Upload interface {
	isUploadAttachmentRequest_Upload()
}

type UploadAttachmentRequest_Spec struct {
	// Starts a new upload. The same call may also carry data and finish_write.
	Spec *UploadAttachmentSpec `protobuf:"bytes,1,opt,name=spec,proto3,oneof"`
}

type UploadAttachmentRequest_UploadId struct {
	// Continues the upload identified by a previous response.
	UploadId string `protobuf:"bytes,2,opt,name=upload_id,json=uploadId,proto3,oneof"`
}

func (*UploadAttachmentRequest_Spec) isUploadAttachmentRequest_Upload() {}

func (*UploadAttachmentRequest_UploadId) isUploadAttachmentRequest_Upload() {}

// Response message for AttachmentService.UploadAttachment.
type UploadAttachmentResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Opaque ID for subsequent calls. This is not a resource name.
	UploadId string `protobuf:"bytes,1,opt,name=upload_id,json=uploadId,proto3" json:"upload_id,omitempty"`
	// Number of file bytes committed so far.
	CommittedSize int64 `protobuf:"varint,2,opt,name=committed_size,json=committedSize,proto3" json:"committed_size,omitempty"`
	// Maximum number of data bytes accepted in one call.
	MaxChunkSize int32 `protobuf:"varint,3,opt,name=max_chunk_size,json=maxChunkSize,proto3" json:"max_chunk_size,omitempty"`
	// The created attachment. Set once the upload has been finalized.
	Attachment    *Attachment `protobuf:"bytes,4,opt,name=attachment,proto3" json:"attachment,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UploadAttachmentResponse) Reset() {
	*x = UploadAttachmentResponse{}
	mi := &file_api_attachment_service_proto_msgTypes[9]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *UploadAttachmentResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UploadAttachmentResponse) ProtoMessage() {}

func (x *UploadAttachmentResponse) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[9]
	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 UploadAttachmentResponse.ProtoReflect.Descriptor instead.
func (*UploadAttachmentResponse) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{9}
}

func (x *UploadAttachmentResponse) GetUploadId() string {
	if x != nil {
		return x.UploadId
	}
	return ""
}

func (x *UploadAttachmentResponse) GetCommittedSize() int64 {
	if x != nil {
		return x.CommittedSize
	}
	return 0
}

func (x *UploadAttachmentResponse) GetMaxChunkSize() int32 {
	if x != nil {
		return x.MaxChunkSize
	}
	return 0
}

func (x *UploadAttachmentResponse) GetAttachment() *Attachment {
	if x != nil {
		return x.Attachment
	}
	return nil
}

// UploadAttachmentSpec describes the attachment that a new upload creates.
type UploadAttachmentSpec struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Required. Metadata for the attachment to create. content must be empty; file bytes are sent in data.
	Attachment *Attachment `protobuf:"bytes,1,opt,name=attachment,proto3" json:"attachment,omitempty"`
	// Optional. The ID to use for the attachment. If empty, a unique ID is generated.
	// Format: ^[a-zA-Z0-9]([a-zA-Z0-9-]{0,34}[a-zA-Z0-9])?$
	AttachmentId string `protobuf:"bytes,2,opt,name=attachment_id,json=attachmentId,proto3" json:"attachment_id,omitempty"`
	// Optional. Total size of the file in bytes before media processing. Zero represents an empty file.
	TotalSize     int64 `protobuf:"varint,3,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UploadAttachmentSpec) Reset() {
	*x = UploadAttachmentSpec{}
	mi := &file_api_attachment_service_proto_msgTypes[10]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *UploadAttachmentSpec) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*UploadAttachmentSpec) ProtoMessage() {}

func (x *UploadAttachmentSpec) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[10]
	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 UploadAttachmentSpec.ProtoReflect.Descriptor instead.
func (*UploadAttachmentSpec) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{10}
}

func (x *UploadAttachmentSpec) GetAttachment() *Attachment {
	if x != nil {
		return x.Attachment
	}
	return nil
}

func (x *UploadAttachmentSpec) GetAttachmentId() string {
	if x != nil {
		return x.AttachmentId
	}
	return ""
}

func (x *UploadAttachmentSpec) GetTotalSize() int64 {
	if x != nil {
		return x.TotalSize
	}
	return 0
}

// MotionMedia links the parts of a motion photo.
type MotionMedia struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The motion photo format.
	Family MotionMediaFamily `protobuf:"varint,1,opt,name=family,proto3,enum=memos.api.MotionMediaFamily" json:"family,omitempty"`
	// The part this attachment plays in the motion photo.
	Role MotionMediaRole `protobuf:"varint,2,opt,name=role,proto3,enum=memos.api.MotionMediaRole" json:"role,omitempty"`
	// Groups the attachments that belong to one motion photo. Required for client-supplied Apple Live Photo metadata;
	// for an Android motion photo it is the attachment's own ID.
	GroupId string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	// Presentation timestamp of the still frame within the video, in microseconds.
	PresentationTimestampUs int64 `protobuf:"varint,4,opt,name=presentation_timestamp_us,json=presentationTimestampUs,proto3" json:"presentation_timestamp_us,omitempty"`
	// Whether the file embeds the motion video, as in an Android motion photo container.
	HasEmbeddedVideo bool `protobuf:"varint,5,opt,name=has_embedded_video,json=hasEmbeddedVideo,proto3" json:"has_embedded_video,omitempty"`
	unknownFields    protoimpl.UnknownFields
	sizeCache        protoimpl.SizeCache
}

func (x *MotionMedia) Reset() {
	*x = MotionMedia{}
	mi := &file_api_attachment_service_proto_msgTypes[11]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MotionMedia) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MotionMedia) ProtoMessage() {}

func (x *MotionMedia) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[11]
	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 MotionMedia.ProtoReflect.Descriptor instead.
func (*MotionMedia) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{11}
}

func (x *MotionMedia) GetFamily() MotionMediaFamily {
	if x != nil {
		return x.Family
	}
	return MotionMediaFamily_MOTION_MEDIA_FAMILY_UNSPECIFIED
}

func (x *MotionMedia) GetRole() MotionMediaRole {
	if x != nil {
		return x.Role
	}
	return MotionMediaRole_MOTION_MEDIA_ROLE_UNSPECIFIED
}

func (x *MotionMedia) GetGroupId() string {
	if x != nil {
		return x.GroupId
	}
	return ""
}

func (x *MotionMedia) GetPresentationTimestampUs() int64 {
	if x != nil {
		return x.PresentationTimestampUs
	}
	return 0
}

func (x *MotionMedia) GetHasEmbeddedVideo() bool {
	if x != nil {
		return x.HasEmbeddedVideo
	}
	return false
}

// MediaMetadata contains normalized metadata explicitly supplied by a client.
// The service validates and stores this data but does not extract it from the media file.
type MediaMetadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Display-oriented width in pixels. Must be provided with height.
	Width *int32 `protobuf:"varint,1,opt,name=width,proto3,oneof" json:"width,omitempty"`
	// Display-oriented height in pixels. Must be provided with width.
	Height *int32 `protobuf:"varint,2,opt,name=height,proto3,oneof" json:"height,omitempty"`
	// Type-specific metadata. Must match the attachment's MIME type.
	//
	// Types that are valid to be assigned to Details:
	//
	//	*MediaMetadata_Photo
	//	*MediaMetadata_Video
	Details       isMediaMetadata_Details `protobuf_oneof:"details"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MediaMetadata) Reset() {
	*x = MediaMetadata{}
	mi := &file_api_attachment_service_proto_msgTypes[12]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MediaMetadata) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MediaMetadata) ProtoMessage() {}

func (x *MediaMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[12]
	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 MediaMetadata.ProtoReflect.Descriptor instead.
func (*MediaMetadata) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{12}
}

func (x *MediaMetadata) GetWidth() int32 {
	if x != nil && x.Width != nil {
		return *x.Width
	}
	return 0
}

func (x *MediaMetadata) GetHeight() int32 {
	if x != nil && x.Height != nil {
		return *x.Height
	}
	return 0
}

func (x *MediaMetadata) GetDetails() isMediaMetadata_Details {
	if x != nil {
		return x.Details
	}
	return nil
}

func (x *MediaMetadata) GetPhoto() *PhotoMetadata {
	if x != nil {
		if x, ok := x.Details.(*MediaMetadata_Photo); ok {
			return x.Photo
		}
	}
	return nil
}

func (x *MediaMetadata) GetVideo() *VideoMetadata {
	if x != nil {
		if x, ok := x.Details.(*MediaMetadata_Video); ok {
			return x.Video
		}
	}
	return nil
}

type isMediaMetadata_Details interface {
	isMediaMetadata_Details()
}

type MediaMetadata_Photo struct {
	// Photo metadata, for image attachments.
	Photo *PhotoMetadata `protobuf:"bytes,3,opt,name=photo,proto3,oneof"`
}

type MediaMetadata_Video struct {
	// Video metadata, for video attachments.
	Video *VideoMetadata `protobuf:"bytes,4,opt,name=video,proto3,oneof"`
}

func (*MediaMetadata_Photo) isMediaMetadata_Details() {}

func (*MediaMetadata_Video) isMediaMetadata_Details() {}

// PhotoMetadata is metadata recorded by the source of a photo.
type PhotoMetadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Capture time as recorded by the source media.
	CaptureTime *MediaCaptureTime `protobuf:"bytes,1,opt,name=capture_time,json=captureTime,proto3" json:"capture_time,omitempty"`
	// Geographic location recorded by the source media.
	Location *MediaLocation `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// EXIF orientation value from 1 through 8 as recorded by the source file.
	// This value is informational and must not be reapplied to the stored attachment;
	// width and height already describe its display-oriented dimensions.
	SourceExifOrientation *int32 `protobuf:"varint,3,opt,name=source_exif_orientation,json=sourceExifOrientation,proto3,oneof" json:"source_exif_orientation,omitempty"`
	// The camera manufacturer.
	CameraMake string `protobuf:"bytes,4,opt,name=camera_make,json=cameraMake,proto3" json:"camera_make,omitempty"`
	// The camera model.
	CameraModel string `protobuf:"bytes,5,opt,name=camera_model,json=cameraModel,proto3" json:"camera_model,omitempty"`
	// The lens model.
	LensModel string `protobuf:"bytes,6,opt,name=lens_model,json=lensModel,proto3" json:"lens_model,omitempty"`
	// The aperture f-number.
	FNumber *float64 `protobuf:"fixed64,7,opt,name=f_number,json=fNumber,proto3,oneof" json:"f_number,omitempty"`
	// The exposure time in seconds.
	ExposureTimeSeconds *float64 `protobuf:"fixed64,8,opt,name=exposure_time_seconds,json=exposureTimeSeconds,proto3,oneof" json:"exposure_time_seconds,omitempty"`
	// The ISO sensitivity.
	Iso *int32 `protobuf:"varint,9,opt,name=iso,proto3,oneof" json:"iso,omitempty"`
	// The focal length in millimeters.
	FocalLengthMm *float64 `protobuf:"fixed64,10,opt,name=focal_length_mm,json=focalLengthMm,proto3,oneof" json:"focal_length_mm,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PhotoMetadata) Reset() {
	*x = PhotoMetadata{}
	mi := &file_api_attachment_service_proto_msgTypes[13]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PhotoMetadata) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PhotoMetadata) ProtoMessage() {}

func (x *PhotoMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[13]
	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 PhotoMetadata.ProtoReflect.Descriptor instead.
func (*PhotoMetadata) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{13}
}

func (x *PhotoMetadata) GetCaptureTime() *MediaCaptureTime {
	if x != nil {
		return x.CaptureTime
	}
	return nil
}

func (x *PhotoMetadata) GetLocation() *MediaLocation {
	if x != nil {
		return x.Location
	}
	return nil
}

func (x *PhotoMetadata) GetSourceExifOrientation() int32 {
	if x != nil && x.SourceExifOrientation != nil {
		return *x.SourceExifOrientation
	}
	return 0
}

func (x *PhotoMetadata) GetCameraMake() string {
	if x != nil {
		return x.CameraMake
	}
	return ""
}

func (x *PhotoMetadata) GetCameraModel() string {
	if x != nil {
		return x.CameraModel
	}
	return ""
}

func (x *PhotoMetadata) GetLensModel() string {
	if x != nil {
		return x.LensModel
	}
	return ""
}

func (x *PhotoMetadata) GetFNumber() float64 {
	if x != nil && x.FNumber != nil {
		return *x.FNumber
	}
	return 0
}

func (x *PhotoMetadata) GetExposureTimeSeconds() float64 {
	if x != nil && x.ExposureTimeSeconds != nil {
		return *x.ExposureTimeSeconds
	}
	return 0
}

func (x *PhotoMetadata) GetIso() int32 {
	if x != nil && x.Iso != nil {
		return *x.Iso
	}
	return 0
}

func (x *PhotoMetadata) GetFocalLengthMm() float64 {
	if x != nil && x.FocalLengthMm != nil {
		return *x.FocalLengthMm
	}
	return 0
}

// MediaCaptureTime is the local time at which media was captured.
type MediaCaptureTime struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Local date and time without a time zone, formatted as YYYY-MM-DDTHH:mm:ss[.fraction].
	LocalDateTime string `protobuf:"bytes,1,opt,name=local_date_time,json=localDateTime,proto3" json:"local_date_time,omitempty"`
	// UTC offset formatted as Z or +/-HH:MM.
	UtcOffset     *string `protobuf:"bytes,2,opt,name=utc_offset,json=utcOffset,proto3,oneof" json:"utc_offset,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *MediaCaptureTime) Reset() {
	*x = MediaCaptureTime{}
	mi := &file_api_attachment_service_proto_msgTypes[14]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MediaCaptureTime) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MediaCaptureTime) ProtoMessage() {}

func (x *MediaCaptureTime) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[14]
	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 MediaCaptureTime.ProtoReflect.Descriptor instead.
func (*MediaCaptureTime) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{14}
}

func (x *MediaCaptureTime) GetLocalDateTime() string {
	if x != nil {
		return x.LocalDateTime
	}
	return ""
}

func (x *MediaCaptureTime) GetUtcOffset() string {
	if x != nil && x.UtcOffset != nil {
		return *x.UtcOffset
	}
	return ""
}

// MediaLocation is the geographic location at which media was captured.
type MediaLocation struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// WGS84 latitude in decimal degrees. Must be provided with longitude.
	Latitude *float64 `protobuf:"fixed64,1,opt,name=latitude,proto3,oneof" json:"latitude,omitempty"`
	// WGS84 longitude in decimal degrees. Must be provided with latitude.
	Longitude *float64 `protobuf:"fixed64,2,opt,name=longitude,proto3,oneof" json:"longitude,omitempty"`
	// Signed altitude in meters relative to sea level.
	AltitudeMeters *float64 `protobuf:"fixed64,3,opt,name=altitude_meters,json=altitudeMeters,proto3,oneof" json:"altitude_meters,omitempty"`
	unknownFields  protoimpl.UnknownFields
	sizeCache      protoimpl.SizeCache
}

func (x *MediaLocation) Reset() {
	*x = MediaLocation{}
	mi := &file_api_attachment_service_proto_msgTypes[15]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *MediaLocation) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*MediaLocation) ProtoMessage() {}

func (x *MediaLocation) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[15]
	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 MediaLocation.ProtoReflect.Descriptor instead.
func (*MediaLocation) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{15}
}

func (x *MediaLocation) GetLatitude() float64 {
	if x != nil && x.Latitude != nil {
		return *x.Latitude
	}
	return 0
}

func (x *MediaLocation) GetLongitude() float64 {
	if x != nil && x.Longitude != nil {
		return *x.Longitude
	}
	return 0
}

func (x *MediaLocation) GetAltitudeMeters() float64 {
	if x != nil && x.AltitudeMeters != nil {
		return *x.AltitudeMeters
	}
	return 0
}

// VideoMetadata is metadata recorded by the source of a video.
type VideoMetadata struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// The duration of the video in seconds.
	DurationSeconds *float64 `protobuf:"fixed64,1,opt,name=duration_seconds,json=durationSeconds,proto3,oneof" json:"duration_seconds,omitempty"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *VideoMetadata) Reset() {
	*x = VideoMetadata{}
	mi := &file_api_attachment_service_proto_msgTypes[16]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *VideoMetadata) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*VideoMetadata) ProtoMessage() {}

func (x *VideoMetadata) ProtoReflect() protoreflect.Message {
	mi := &file_api_attachment_service_proto_msgTypes[16]
	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 VideoMetadata.ProtoReflect.Descriptor instead.
func (*VideoMetadata) Descriptor() ([]byte, []int) {
	return file_api_attachment_service_proto_rawDescGZIP(), []int{16}
}

func (x *VideoMetadata) GetDurationSeconds() float64 {
	if x != nil && x.DurationSeconds != nil {
		return *x.DurationSeconds
	}
	return 0
}

var File_api_attachment_service_proto protoreflect.FileDescriptor

const file_api_attachment_service_proto_rawDesc = "" +
	"\n" +
	"\x1capi/attachment_service.proto\x12\tmemos.api\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb3\x04\n" +
	"\n" +
	"Attachment\x12\x17\n" +
	"\x04name\x18\x01 \x01(\tB\x03\xe0A\bR\x04name\x120\n" +
	"\acreator\x18\x02 \x01(\tB\x16\xe0A\x03\xfaA\x10\n" +
	"\x0ememos.api/UserR\acreator\x12\x1f\n" +
	"\bfilename\x18\x03 \x01(\tB\x03\xe0A\x02R\bfilename\x12\x17\n" +
	"\x04type\x18\x04 \x01(\tB\x03\xe0A\x02R\x04type\x12\x1d\n" +
	"\acontent\x18\x05 \x01(\fB\x03\xe0A\x04R\acontent\x12(\n" +
	"\rexternal_link\x18\x06 \x01(\tB\x03\xe0A\x01R\fexternalLink\x12>\n" +
	"\fmotion_media\x18\a \x01(\v2\x16.memos.api.MotionMediaB\x03\xe0A\x01R\vmotionMedia\x12G\n" +
	"\x0emedia_metadata\x18\b \x01(\v2\x18.memos.api.MediaMetadataB\x06\xe0A\x01\xe0A\x05R\rmediaMetadata\x12\x1c\n" +
	"\x04memo\x18\t \x01(\tB\x03\xe0A\x01H\x00R\x04memo\x88\x01\x01\x12\x17\n" +
	"\x04size\x18\n" +
	" \x01(\x03B\x03\xe0A\x03R\x04size\x12@\n" +
	"\vcreate_time\x18\v \x01(\v2\x1a.google.protobuf.TimestampB\x03\xe0A\x03R\n" +
	"createTime:L\xeaAI\n" +
	"\x14memos.api/Attachment\x12\x18attachments/{attachment}*\vattachments2\n" +
	"attachmentB\a\n" +
	"\x05_memo\"\x9b\x01\n" +
	"\x16ListAttachmentsRequest\x12 \n" +
	"\tpage_size\x18\x01 \x01(\x05B\x03\xe0A\x01R\bpageSize\x12\"\n" +
	"\n" +
	"page_token\x18\x02 \x01(\tB\x03\xe0A\x01R\tpageToken\x12\x1b\n" +
	"\x06filter\x18\x03 \x01(\tB\x03\xe0A\x01R\x06filter\x12\x1e\n" +
	"\border_by\x18\x04 \x01(\tB\x03\xe0A\x01R\aorderBy\"z\n" +
	"\x17ListAttachmentsResponse\x127\n" +
	"\vattachments\x18\x01 \x03(\v2\x15.memos.api.AttachmentR\vattachments\x12&\n" +
	"\x0fnext_page_token\x18\x02 \x01(\tR\rnextPageToken\"H\n" +
	"\x14GetAttachmentRequest\x120\n" +
	"\x04name\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +
	"\x14memos.api/AttachmentR\x04name\"\x7f\n" +
	"\x17CreateAttachmentRequest\x12:\n" +
	"\n" +
	"attachment\x18\x01 \x01(\v2\x15.memos.api.AttachmentB\x03\xe0A\x02R\n" +
	"attachment\x12(\n" +
	"\rattachment_id\x18\x02 \x01(\tB\x03\xe0A\x01R\fattachmentId\"\x97\x01\n" +
	"\x17UpdateAttachmentRequest\x12:\n" +
	"\n" +
	"attachment\x18\x01 \x01(\v2\x15.memos.api.AttachmentB\x03\xe0A\x02R\n" +
	"attachment\x12@\n" +
	"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskB\x03\xe0A\x02R\n" +
	"updateMask\"K\n" +
	"\x17DeleteAttachmentRequest\x120\n" +
	"\x04name\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +
	"\x14memos.api/AttachmentR\x04name\":\n" +
	"\x1dBatchDeleteAttachmentsRequest\x12\x19\n" +
	"\x05names\x18\x01 \x03(\tB\x03\xe0A\x02R\x05names\"\xe2\x01\n" +
	"\x17UploadAttachmentRequest\x125\n" +
	"\x04spec\x18\x01 \x01(\v2\x1f.memos.api.UploadAttachmentSpecH\x00R\x04spec\x12\x1d\n" +
	"\tupload_id\x18\x02 \x01(\tH\x00R\buploadId\x12&\n" +
	"\fwrite_offset\x18\x03 \x01(\x03B\x03\xe0A\x02R\vwriteOffset\x12\x17\n" +
	"\x04data\x18\x04 \x01(\fB\x03\xe0A\x01R\x04data\x12&\n" +
	"\ffinish_write\x18\x05 \x01(\bB\x03\xe0A\x01R\vfinishWriteB\b\n" +
	"\x06upload\"\xbb\x01\n" +
	"\x18UploadAttachmentResponse\x12\x1b\n" +
	"\tupload_id\x18\x01 \x01(\tR\buploadId\x12%\n" +
	"\x0ecommitted_size\x18\x02 \x01(\x03R\rcommittedSize\x12$\n" +
	"\x0emax_chunk_size\x18\x03 \x01(\x05R\fmaxChunkSize\x125\n" +
	"\n" +
	"attachment\x18\x04 \x01(\v2\x15.memos.api.AttachmentR\n" +
	"attachment\"\xa0\x01\n" +
	"\x14UploadAttachmentSpec\x12:\n" +
	"\n" +
	"attachment\x18\x01 \x01(\v2\x15.memos.api.AttachmentB\x03\xe0A\x02R\n" +
	"attachment\x12(\n" +
	"\rattachment_id\x18\x02 \x01(\tB\x03\xe0A\x01R\fattachmentId\x12\"\n" +
	"\n" +
	"total_size\x18\x03 \x01(\x03B\x03\xe0A\x01R\ttotalSize\"\xf8\x01\n" +
	"\vMotionMedia\x124\n" +
	"\x06family\x18\x01 \x01(\x0e2\x1c.memos.api.MotionMediaFamilyR\x06family\x12.\n" +
	"\x04role\x18\x02 \x01(\x0e2\x1a.memos.api.MotionMediaRoleR\x04role\x12\x19\n" +
	"\bgroup_id\x18\x03 \x01(\tR\agroupId\x12:\n" +
	"\x19presentation_timestamp_us\x18\x04 \x01(\x03R\x17presentationTimestampUs\x12,\n" +
	"\x12has_embedded_video\x18\x05 \x01(\bR\x10hasEmbeddedVideo\"\xcb\x01\n" +
	"\rMediaMetadata\x12\x19\n" +
	"\x05width\x18\x01 \x01(\x05H\x01R\x05width\x88\x01\x01\x12\x1b\n" +
	"\x06height\x18\x02 \x01(\x05H\x02R\x06height\x88\x01\x01\x120\n" +
	"\x05photo\x18\x03 \x01(\v2\x18.memos.api.PhotoMetadataH\x00R\x05photo\x120\n" +
	"\x05video\x18\x04 \x01(\v2\x18.memos.api.VideoMetadataH\x00R\x05videoB\t\n" +
	"\adetailsB\b\n" +
	"\x06_widthB\t\n" +
	"\a_height\"\xa1\x04\n" +
	"\rPhotoMetadata\x12>\n" +
	"\fcapture_time\x18\x01 \x01(\v2\x1b.memos.api.MediaCaptureTimeR\vcaptureTime\x124\n" +
	"\blocation\x18\x02 \x01(\v2\x18.memos.api.MediaLocationR\blocation\x12;\n" +
	"\x17source_exif_orientation\x18\x03 \x01(\x05H\x00R\x15sourceExifOrientation\x88\x01\x01\x12\x1f\n" +
	"\vcamera_make\x18\x04 \x01(\tR\n" +
	"cameraMake\x12!\n" +
	"\fcamera_model\x18\x05 \x01(\tR\vcameraModel\x12\x1d\n" +
	"\n" +
	"lens_model\x18\x06 \x01(\tR\tlensModel\x12\x1e\n" +
	"\bf_number\x18\a \x01(\x01H\x01R\afNumber\x88\x01\x01\x127\n" +
	"\x15exposure_time_seconds\x18\b \x01(\x01H\x02R\x13exposureTimeSeconds\x88\x01\x01\x12\x15\n" +
	"\x03iso\x18\t \x01(\x05H\x03R\x03iso\x88\x01\x01\x12+\n" +
	"\x0ffocal_length_mm\x18\n" +
	" \x01(\x01H\x04R\rfocalLengthMm\x88\x01\x01B\x1a\n" +
	"\x18_source_exif_orientationB\v\n" +
	"\t_f_numberB\x18\n" +
	"\x16_exposure_time_secondsB\x06\n" +
	"\x04_isoB\x12\n" +
	"\x10_focal_length_mm\"m\n" +
	"\x10MediaCaptureTime\x12&\n" +
	"\x0flocal_date_time\x18\x01 \x01(\tR\rlocalDateTime\x12\"\n" +
	"\n" +
	"utc_offset\x18\x02 \x01(\tH\x00R\tutcOffset\x88\x01\x01B\r\n" +
	"\v_utc_offset\"\xb0\x01\n" +
	"\rMediaLocation\x12\x1f\n" +
	"\blatitude\x18\x01 \x01(\x01H\x00R\blatitude\x88\x01\x01\x12!\n" +
	"\tlongitude\x18\x02 \x01(\x01H\x01R\tlongitude\x88\x01\x01\x12,\n" +
	"\x0faltitude_meters\x18\x03 \x01(\x01H\x02R\x0ealtitudeMeters\x88\x01\x01B\v\n" +
	"\t_latitudeB\f\n" +
	"\n" +
	"_longitudeB\x12\n" +
	"\x10_altitude_meters\"T\n" +
	"\rVideoMetadata\x12.\n" +
	"\x10duration_seconds\x18\x01 \x01(\x01H\x00R\x0fdurationSeconds\x88\x01\x01B\x13\n" +
	"\x11_duration_seconds*h\n" +
	"\x11MotionMediaFamily\x12#\n" +
	"\x1fMOTION_MEDIA_FAMILY_UNSPECIFIED\x10\x00\x12\x14\n" +
	"\x10APPLE_LIVE_PHOTO\x10\x01\x12\x18\n" +
	"\x14ANDROID_MOTION_PHOTO\x10\x02*Y\n" +
	"\x0fMotionMediaRole\x12!\n" +
	"\x1dMOTION_MEDIA_ROLE_UNSPECIFIED\x10\x00\x12\t\n" +
	"\x05STILL\x10\x01\x12\t\n" +
	"\x05VIDEO\x10\x02\x12\r\n" +
	"\tCONTAINER\x10\x032\xa1\a\n" +
	"\x11AttachmentService\x12r\n" +
	"\x0fListAttachments\x12!.memos.api.ListAttachmentsRequest\x1a\".memos.api.ListAttachmentsResponse\"\x18\x82\xd3\xe4\x93\x02\x12\x12\x10/api/attachments\x12q\n" +
	"\rGetAttachment\x12\x1f.memos.api.GetAttachmentRequest\x1a\x15.memos.api.Attachment\"(\xdaA\x04name\x82\xd3\xe4\x93\x02\x1b\x12\x19/api/{name=attachments/*}\x12\x80\x01\n" +
	"\x10CreateAttachment\x12\".memos.api.CreateAttachmentRequest\x1a\x15.memos.api.Attachment\"1\xdaA\n" +
	"attachment\x82\xd3\xe4\x93\x02\x1e:\n" +
	"attachment\"\x10/api/attachments\x12\xa0\x01\n" +
	"\x10UpdateAttachment\x12\".memos.api.UpdateAttachmentRequest\x1a\x15.memos.api.Attachment\"Q\xdaA\x16attachment,update_mask\x82\xd3\xe4\x93\x022:\n" +
	"attachment2$/api/{attachment.name=attachments/*}\x12x\n" +
	"\x10DeleteAttachment\x12\".memos.api.DeleteAttachmentRequest\x1a\x16.google.protobuf.Empty\"(\xdaA\x04name\x82\xd3\xe4\x93\x02\x1b*\x19/api/{name=attachments/*}\x12\x83\x01\n" +
	"\x16BatchDeleteAttachments\x12(.memos.api.BatchDeleteAttachmentsRequest\x1a\x16.google.protobuf.Empty\"'\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/api/attachments:batchDelete\x12\x7f\n" +
	"\x10UploadAttachment\x12\".memos.api.UploadAttachmentRequest\x1a#.memos.api.UploadAttachmentResponse\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/api/attachments:uploadB\x95\x01\n" +
	"\rcom.memos.apiB\x16AttachmentServiceProtoP\x01Z'github.com/usememos/memos/proto/gen/api\xa2\x02\x03MAX\xaa\x02\tMemos.Api\xca\x02\tMemos\\Api\xe2\x02\x15Memos\\Api\\GPBMetadata\xea\x02\n" +
	"Memos::Apib\x06proto3"

var (
	file_api_attachment_service_proto_rawDescOnce sync.Once
	file_api_attachment_service_proto_rawDescData []byte
)

func file_api_attachment_service_proto_rawDescGZIP() []byte {
	file_api_attachment_service_proto_rawDescOnce.Do(func() {
		file_api_attachment_service_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_api_attachment_service_proto_rawDesc), len(file_api_attachment_service_proto_rawDesc)))
	})
	return file_api_attachment_service_proto_rawDescData
}

var file_api_attachment_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_api_attachment_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17)
var file_api_attachment_service_proto_goTypes = []any{
	(MotionMediaFamily)(0),                // 0: memos.api.MotionMediaFamily
	(MotionMediaRole)(0),                  // 1: memos.api.MotionMediaRole
	(*Attachment)(nil),                    // 2: memos.api.Attachment
	(*ListAttachmentsRequest)(nil),        // 3: memos.api.ListAttachmentsRequest
	(*ListAttachmentsResponse)(nil),       // 4: memos.api.ListAttachmentsResponse
	(*GetAttachmentRequest)(nil),          // 5: memos.api.GetAttachmentRequest
	(*CreateAttachmentRequest)(nil),       // 6: memos.api.CreateAttachmentRequest
	(*UpdateAttachmentRequest)(nil),       // 7: memos.api.UpdateAttachmentRequest
	(*DeleteAttachmentRequest)(nil),       // 8: memos.api.DeleteAttachmentRequest
	(*BatchDeleteAttachmentsRequest)(nil), // 9: memos.api.BatchDeleteAttachmentsRequest
	(*UploadAttachmentRequest)(nil),       // 10: memos.api.UploadAttachmentRequest
	(*UploadAttachmentResponse)(nil),      // 11: memos.api.UploadAttachmentResponse
	(*UploadAttachmentSpec)(nil),          // 12: memos.api.UploadAttachmentSpec
	(*MotionMedia)(nil),                   // 13: memos.api.MotionMedia
	(*MediaMetadata)(nil),                 // 14: memos.api.MediaMetadata
	(*PhotoMetadata)(nil),                 // 15: memos.api.PhotoMetadata
	(*MediaCaptureTime)(nil),              // 16: memos.api.MediaCaptureTime
	(*MediaLocation)(nil),                 // 17: memos.api.MediaLocation
	(*VideoMetadata)(nil),                 // 18: memos.api.VideoMetadata
	(*timestamppb.Timestamp)(nil),         // 19: google.protobuf.Timestamp
	(*fieldmaskpb.FieldMask)(nil),         // 20: google.protobuf.FieldMask
	(*emptypb.Empty)(nil),                 // 21: google.protobuf.Empty
}
var file_api_attachment_service_proto_depIdxs = []int32{
	13, // 0: memos.api.Attachment.motion_media:type_name -> memos.api.MotionMedia
	14, // 1: memos.api.Attachment.media_metadata:type_name -> memos.api.MediaMetadata
	19, // 2: memos.api.Attachment.create_time:type_name -> google.protobuf.Timestamp
	2,  // 3: memos.api.ListAttachmentsResponse.attachments:type_name -> memos.api.Attachment
	2,  // 4: memos.api.CreateAttachmentRequest.attachment:type_name -> memos.api.Attachment
	2,  // 5: memos.api.UpdateAttachmentRequest.attachment:type_name -> memos.api.Attachment
	20, // 6: memos.api.UpdateAttachmentRequest.update_mask:type_name -> google.protobuf.FieldMask
	12, // 7: memos.api.UploadAttachmentRequest.spec:type_name -> memos.api.UploadAttachmentSpec
	2,  // 8: memos.api.UploadAttachmentResponse.attachment:type_name -> memos.api.Attachment
	2,  // 9: memos.api.UploadAttachmentSpec.attachment:type_name -> memos.api.Attachment
	0,  // 10: memos.api.MotionMedia.family:type_name -> memos.api.MotionMediaFamily
	1,  // 11: memos.api.MotionMedia.role:type_name -> memos.api.MotionMediaRole
	15, // 12: memos.api.MediaMetadata.photo:type_name -> memos.api.PhotoMetadata
	18, // 13: memos.api.MediaMetadata.video:type_name -> memos.api.VideoMetadata
	16, // 14: memos.api.PhotoMetadata.capture_time:type_name -> memos.api.MediaCaptureTime
	17, // 15: memos.api.PhotoMetadata.location:type_name -> memos.api.MediaLocation
	3,  // 16: memos.api.AttachmentService.ListAttachments:input_type -> memos.api.ListAttachmentsRequest
	5,  // 17: memos.api.AttachmentService.GetAttachment:input_type -> memos.api.GetAttachmentRequest
	6,  // 18: memos.api.AttachmentService.CreateAttachment:input_type -> memos.api.CreateAttachmentRequest
	7,  // 19: memos.api.AttachmentService.UpdateAttachment:input_type -> memos.api.UpdateAttachmentRequest
	8,  // 20: memos.api.AttachmentService.DeleteAttachment:input_type -> memos.api.DeleteAttachmentRequest
	9,  // 21: memos.api.AttachmentService.BatchDeleteAttachments:input_type -> memos.api.BatchDeleteAttachmentsRequest
	10, // 22: memos.api.AttachmentService.UploadAttachment:input_type -> memos.api.UploadAttachmentRequest
	4,  // 23: memos.api.AttachmentService.ListAttachments:output_type -> memos.api.ListAttachmentsResponse
	2,  // 24: memos.api.AttachmentService.GetAttachment:output_type -> memos.api.Attachment
	2,  // 25: memos.api.AttachmentService.CreateAttachment:output_type -> memos.api.Attachment
	2,  // 26: memos.api.AttachmentService.UpdateAttachment:output_type -> memos.api.Attachment
	21, // 27: memos.api.AttachmentService.DeleteAttachment:output_type -> google.protobuf.Empty
	21, // 28: memos.api.AttachmentService.BatchDeleteAttachments:output_type -> google.protobuf.Empty
	11, // 29: memos.api.AttachmentService.UploadAttachment:output_type -> memos.api.UploadAttachmentResponse
	23, // [23:30] is the sub-list for method output_type
	16, // [16:23] is the sub-list for method input_type
	16, // [16:16] is the sub-list for extension type_name
	16, // [16:16] is the sub-list for extension extendee
	0,  // [0:16] is the sub-list for field type_name
}

func init() { file_api_attachment_service_proto_init() }
func file_api_attachment_service_proto_init() {
	if File_api_attachment_service_proto != nil {
		return
	}
	file_api_attachment_service_proto_msgTypes[0].OneofWrappers = []any{}
	file_api_attachment_service_proto_msgTypes[8].OneofWrappers = []any{
		(*UploadAttachmentRequest_Spec)(nil),
		(*UploadAttachmentRequest_UploadId)(nil),
	}
	file_api_attachment_service_proto_msgTypes[12].OneofWrappers = []any{
		(*MediaMetadata_Photo)(nil),
		(*MediaMetadata_Video)(nil),
	}
	file_api_attachment_service_proto_msgTypes[13].OneofWrappers = []any{}
	file_api_attachment_service_proto_msgTypes[14].OneofWrappers = []any{}
	file_api_attachment_service_proto_msgTypes[15].OneofWrappers = []any{}
	file_api_attachment_service_proto_msgTypes[16].OneofWrappers = []any{}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_api_attachment_service_proto_rawDesc), len(file_api_attachment_service_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   17,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_api_attachment_service_proto_goTypes,
		DependencyIndexes: file_api_attachment_service_proto_depIdxs,
		EnumInfos:         file_api_attachment_service_proto_enumTypes,
		MessageInfos:      file_api_attachment_service_proto_msgTypes,
	}.Build()
	File_api_attachment_service_proto = out.File
	file_api_attachment_service_proto_goTypes = nil
	file_api_attachment_service_proto_depIdxs = nil
}