// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
// @generated from file api/v1/attachment_service.proto (package memos.api.v1, syntax proto3)
/* eslint-disable */

import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_google_api_annotations } from "../../google/api/annotations_pb";
import { file_google_api_client } from "../../google/api/client_pb";
import { file_google_api_field_behavior } from "../../google/api/field_behavior_pb";
import { file_google_api_resource } from "../../google/api/resource_pb";
import type { EmptySchema, FieldMask, Timestamp } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file api/v1/attachment_service.proto.
 */
export const file_api_v1_attachment_service: GenFile = /*@__PURE__*/
  fileDesc("Ch9hcGkvdjEvYXR0YWNobWVudF9zZXJ2aWNlLnByb3RvEgxtZW1vcy5hcGkudjEivAEKC01vdGlvbk1lZGlhEi8KBmZhbWlseRgBIAEoDjIfLm1lbW9zLmFwaS52MS5Nb3Rpb25NZWRpYUZhbWlseRIrCgRyb2xlGAIgASgOMh0ubWVtb3MuYXBpLnYxLk1vdGlvbk1lZGlhUm9sZRIQCghncm91cF9pZBgDIAEoCRIhChlwcmVzZW50YXRpb25fdGltZXN0YW1wX3VzGAQgASgDEhoKEmhhc19lbWJlZGRlZF92aWRlbxgFIAEoCCLsAgoKQXR0YWNobWVudBIRCgRuYW1lGAEgASgJQgPgQQgSNAoLY3JlYXRlX3RpbWUYAiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wQgPgQQMSFQoIZmlsZW5hbWUYAyABKAlCA+BBAhIUCgdjb250ZW50GAQgASgMQgPgQQQSGgoNZXh0ZXJuYWxfbGluaxgFIAEoCUID4EEBEhEKBHR5cGUYBiABKAlCA+BBAhIRCgRzaXplGAcgASgDQgPgQQMSFgo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LmFwaS52MS5EZWxldGVBdHRhY2htZW50UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIr2kEEbmFtZYLT5JMCHiocL2FwaS92MS97bmFtZT1hdHRhY2htZW50cy8qfRKJAQoWQmF0Y2hEZWxldGVBdHRhY2htZW50cxIrLm1lbW9zLmFwaS52MS5CYXRjaERlbGV0ZUF0dGFjaG1lbnRzUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIqgtPkkwIkOgEqIh8vYXBpL3YxL2F0dGFjaG1lbnRzOmJhdGNoRGVsZXRlQq4BChBjb20ubWVtb3MuYXBpLnYxQhZBdHRhY2htZW50U2VydmljZVByb3RvUAFaMGdpdGh1Yi5jb20vdXNlbWVtb3MvbWVtb3MvcHJvdG8vZ2VuL2FwaS92MTthcGl2MaICA01BWKoCDE1lbW9zLkFwaS5WMcoCDE1lbW9zXEFwaVxWMeICGE1lbW9zXEFwaVxWMVxHUEJNZXRhZGF0YeoCDk1lbW9zOjpBcGk6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_google_protobuf_timestamp]);

/**
 * @generated from message memos.api.v1.MotionMedia
 */
export type MotionMedia = Message<"memos.api.v1.MotionMedia"> & {
  /**
   * @generated from field: memos.api.v1.MotionMediaFamily family = 1;
   */
  family: MotionMediaFamily;

  /**
   * @generated from field: memos.api.v1.MotionMediaRole role = 2;
   */
  role: MotionMediaRole;

  /**
   * @generated from field: string group_id = 3;
   */
  groupId: string;

  /**
   * @generated from field: int64 presentation_timestamp_us = 4;
   */
  presentationTimestampUs: bigint;

  /**
   * @generated from field: bool has_embedded_video = 5;
   */
  hasEmbeddedVideo: boolean;
};

/**
 * Describes the message memos.api.v1.MotionMedia.
 * Use `create(MotionMediaSchema)` to create a new message.
 */
export const MotionMediaSchema: GenMessage<MotionMedia> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 0);

/**
 * @generated from message memos.api.v1.Attachment
 */
export type Attachment = Message<"memos.api.v1.Attachment"> & {
  /**
   * The name of the attachment.
   * Format: attachments/{attachment}
   *
   * @generated from field: string name = 1;
   */
  name: string;

  /**
   * Output only. The creation timestamp.
   *
   * @generated from field: google.protobuf.Timestamp create_time = 2;
   */
  createTime?: Timestamp;

  /**
   * The filename of the attachment.
   *
   * @generated from field: string filename = 3;
   */
  filename: string;

  /**
   * Input only. The content of the attachment.
   *
   * @generated from field: bytes content = 4;
   */
  content: Uint8Array;

  /**
   * Optional. The external link of the attachment.
   *
   * @generated from field: string external_link = 5;
   */
  externalLink: string;

  /**
   * The MIME type of the attachment.
   *
   * @generated from field: string type = 6;
   */
  type: string;

  /**
   * Output only. The size of the attachment in bytes.
   *
   * @generated from field: int64 size = 7;
   */
  size: bigint;

  /**
   * Optional. The related memo. Refer to `Memo.name`.
   * Format: memos/{memo}
   *
   * @generated from field: optional string memo = 8;
   */
  memo?: string;

  /**
   * Optional. Motion media metadata.
   *
   * @generated from field: memos.api.v1.MotionMedia motion_media = 9;
   */
  motionMedia?: MotionMedia;
};

/**
 * Describes the message memos.api.v1.Attachment.
 * Use `create(AttachmentSchema)` to create a new message.
 */
export const AttachmentSchema: GenMessage<Attachment> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 1);

/**
 * @generated from message memos.api.v1.CreateAttachmentRequest
 */
export type CreateAttachmentRequest = Message<"memos.api.v1.CreateAttachmentRequest"> & {
  /**
   * Required. The attachment to create.
   *
   * @generated from field: memos.api.v1.Attachment attachment = 1;
   */
  attachment?: Attachment;

  /**
   * Optional. The attachment ID to use for this attachment.
   * If empty, a unique ID will be generated.
   *
   * @generated from field: string attachment_id = 2;
   */
  attachmentId: string;
};

/**
 * Describes the message memos.api.v1.CreateAttachmentRequest.
 * Use `create(CreateAttachmentRequestSchema)` to create a new message.
 */
export const CreateAttachmentRequestSchema: GenMessage<CreateAttachmentRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 2);

/**
 * @generated from message memos.api.v1.ListAttachmentsRequest
 */
export type ListAttachmentsRequest = Message<"memos.api.v1.ListAttachmentsRequest"> & {
  /**
   * Optional. The maximum number of attachments to return.
   * The service may return fewer than this value.
   * If unspecified, at most 50 attachments will be returned.
   * The maximum value is 1000; values above 1000 will be coerced to 1000.
   *
   * @generated from field: int32 page_size = 1;
   */
  pageSize: number;

  /**
   * Optional. A page token, received from a previous `ListAttachments` call.
   * Provide this to retrieve the subsequent page.
   *
   * @generated from field: string page_token = 2;
   */
  pageToken: string;

  /**
   * Optional. Filter to apply to the list results.
   * Example: "mime_type==\"image/png\"" or "filename.contains(\"test\")"
   * Supported operators: =, !=, <, <=, >, >=, : (contains), in
   * Supported fields: filename, mime_type, create_time, memo
   *
   * @generated from field: string filter = 3;
   */
  filter: string;

  /**
   * Optional. The order to sort results by.
   * Example: "create_time desc" or "filename asc"
   *
   * @generated from field: string order_by = 4;
   */
  orderBy: string;
};

/**
 * Describes the message memos.api.v1.ListAttachmentsRequest.
 * Use `create(ListAttachmentsRequestSchema)` to create a new message.
 */
export const ListAttachmentsRequestSchema: GenMessage<ListAttachmentsRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 3);

/**
 * @generated from message memos.api.v1.ListAttachmentsResponse
 */
export type ListAttachmentsResponse = Message<"memos.api.v1.ListAttachmentsResponse"> & {
  /**
   * The list of attachments.
   *
   * @generated from field: repeated memos.api.v1.Attachment attachments = 1;
   */
  attachments: Attachment[];

  /**
   * A token that can be sent as `page_token` to retrieve the next page.
   * If this field is omitted, there are no subsequent pages.
   *
   * @generated from field: string next_page_token = 2;
   */
  nextPageToken: string;

  /**
   * The total count of attachments (may be approximate).
   *
   * @generated from field: int32 total_size = 3;
   */
  totalSize: number;
};

/**
 * Describes the message memos.api.v1.ListAttachmentsResponse.
 * Use `create(ListAttachmentsResponseSchema)` to create a new message.
 */
export const ListAttachmentsResponseSchema: GenMessage<ListAttachmentsResponse> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 4);

/**
 * @generated from message memos.api.v1.GetAttachmentRequest
 */
export type GetAttachmentRequest = Message<"memos.api.v1.GetAttachmentRequest"> & {
  /**
   * Required. The attachment name of the attachment to retrieve.
   * Format: attachments/{attachment}
   *
   * @generated from field: string name = 1;
   */
  name: string;
};

/**
 * Describes the message memos.api.v1.GetAttachmentRequest.
 * Use `create(GetAttachmentRequestSchema)` to create a new message.
 */
export const GetAttachmentRequestSchema: GenMessage<GetAttachmentRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 5);

/**
 * @generated from message memos.api.v1.UpdateAttachmentRequest
 */
export type UpdateAttachmentRequest = Message<"memos.api.v1.UpdateAttachmentRequest"> & {
  /**
   * Required. The attachment which replaces the attachment on the server.
   *
   * @generated from field: memos.api.v1.Attachment attachment = 1;
   */
  attachment?: Attachment;

  /**
   * Required. The list of fields to update.
   *
   * @generated from field: google.protobuf.FieldMask update_mask = 2;
   */
  updateMask?: FieldMask;
};

/**
 * Describes the message memos.api.v1.UpdateAttachmentRequest.
 * Use `create(UpdateAttachmentRequestSchema)` to create a new message.
 */
export const UpdateAttachmentRequestSchema: GenMessage<UpdateAttachmentRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 6);

/**
 * @generated from message memos.api.v1.DeleteAttachmentRequest
 */
export type DeleteAttachmentRequest = Message<"memos.api.v1.DeleteAttachmentRequest"> & {
  /**
   * Required. The attachment name of the attachment to delete.
   * Format: attachments/{attachment}
   *
   * @generated from field: string name = 1;
   */
  name: string;
};

/**
 * Describes the message memos.api.v1.DeleteAttachmentRequest.
 * Use `create(DeleteAttachmentRequestSchema)` to create a new message.
 */
export const DeleteAttachmentRequestSchema: GenMessage<DeleteAttachmentRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 7);

/**
 * @generated from message memos.api.v1.BatchDeleteAttachmentsRequest
 */
export type BatchDeleteAttachmentsRequest = Message<"memos.api.v1.BatchDeleteAttachmentsRequest"> & {
  /**
   * @generated from field: repeated string names = 1;
   */
  names: string[];
};

/**
 * Describes the message memos.api.v1.BatchDeleteAttachmentsRequest.
 * Use `create(BatchDeleteAttachmentsRequestSchema)` to create a new message.
 */
export const BatchDeleteAttachmentsRequestSchema: GenMessage<BatchDeleteAttachmentsRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_attachment_service, 8);

/**
 * @generated from enum memos.api.v1.MotionMediaFamily
 */
export enum MotionMediaFamily {
  /**
   * @generated from enum value: MOTION_MEDIA_FAMILY_UNSPECIFIED = 0;
   */
  MOTION_MEDIA_FAMILY_UNSPECIFIED = 0,

  /**
   * @generated from enum value: APPLE_LIVE_PHOTO = 1;
   */
  APPLE_LIVE_PHOTO = 1,

  /**
   * @generated from enum value: ANDROID_MOTION_PHOTO = 2;
   */
  ANDROID_MOTION_PHOTO = 2,
}

/**
 * Describes the enum memos.api.v1.MotionMediaFamily.
 */
export const MotionMediaFamilySchema: GenEnum<MotionMediaFamily> = /*@__PURE__*/
  enumDesc(file_api_v1_attachment_service, 0);

/**
 * @generated from enum memos.api.v1.MotionMediaRole
 */
export enum MotionMediaRole {
  /**
   * @generated from enum value: MOTION_MEDIA_ROLE_UNSPECIFIED = 0;
   */
  MOTION_MEDIA_ROLE_UNSPECIFIED = 0,

  /**
   * @generated from enum value: STILL = 1;
   */
  STILL = 1,

  /**
   * @generated from enum value: VIDEO = 2;
   */
  VIDEO = 2,

  /**
   * @generated from enum value: CONTAINER = 3;
   */
  CONTAINER = 3,
}

/**
 * Describes the enum memos.api.v1.MotionMediaRole.
 */
export const MotionMediaRoleSchema: GenEnum<MotionMediaRole> = /*@__PURE__*/
  enumDesc(file_api_v1_attachment_service, 1);

/**
 * @generated from service memos.api.v1.AttachmentService
 */
export const AttachmentService: GenService<{
  /**
   * CreateAttachment creates a new attachment.
   *
   * @generated from rpc memos.api.v1.AttachmentService.CreateAttachment
   */
  createAttachment: {
    methodKind: "unary";
    input: typeof CreateAttachmentRequestSchema;
    output: typeof AttachmentSchema;
  },
  /**
   * ListAttachments lists all attachments.
   *
   * @generated from rpc memos.api.v1.AttachmentService.ListAttachments
   */
  listAttachments: {
    methodKind: "unary";
    input: typeof ListAttachmentsRequestSchema;
    output: typeof ListAttachmentsResponseSchema;
  },
  /**
   * GetAttachment returns an attachment by name.
   *
   * @generated from rpc memos.api.v1.AttachmentService.GetAttachment
   */
  getAttachment: {
    methodKind: "unary";
    input: typeof GetAttachmentRequestSchema;
    output: typeof AttachmentSchema;
  },
  /**
   * UpdateAttachment updates an attachment.
   *
   * @generated from rpc memos.api.v1.AttachmentService.UpdateAttachment
   */
  updateAttachment: {
    methodKind: "unary";
    input: typeof UpdateAttachmentRequestSchema;
    output: typeof AttachmentSchema;
  },
  /**
   * DeleteAttachment deletes an attachment by name.
   *
   * @generated from rpc memos.api.v1.AttachmentService.DeleteAttachment
   */
  deleteAttachment: {
    methodKind: "unary";
    input: typeof DeleteAttachmentRequestSchema;
    output: typeof EmptySchema;
  },
  /**
   * BatchDeleteAttachments deletes multiple attachments in one request.
   *
   * @generated from rpc memos.api.v1.AttachmentService.BatchDeleteAttachments
   */
  batchDeleteAttachments: {
    methodKind: "unary";
    input: typeof BatchDeleteAttachmentsRequestSchema;
    output: typeof EmptySchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_api_v1_attachment_service, 0);

