// @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 { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { 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("Ch9hcGkvdjEvYXR0YWNobWVudF9zZXJ2aWNlLnByb3RvEgxtZW1vcy5hcGkudjEitgIKCkF0dGFjaG1lbnQSEQoEbmFtZRgBIAEoCUID4EEIEjQKC2NyZWF0ZV90aW1lGAIgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEID4EEDEhUKCGZpbGVuYW1lGAMgASgJQgPgQQISFAoHY29udGVudBgEIAEoDEID4EEEEhoKDWV4dGVybmFsX2xpbmsYBSABKAlCA+BBARIRCgR0eXBlGAYgASgJQgPgQQISEQoEc2l6ZRgHIAEoA0ID4EEDEhYKBG1lbW8YCCABKAlCA+BBAUgAiAEBOk/qQUwKF21lbW9zLmFwaS52MS9BdHRhY2htZW50EhhhdHRhY2htZW50cy97YXR0YWNobWVudH0qC2F0dGFjaG1lbnRzMgphdHRhY2htZW50QgcKBV9tZW1vImgKF0NyZWF0ZUF0dGFjaG1lbnRSZXF1ZXN0EjEKCmF0dGFjaG1lbnQYASABKAsyGC5tZW1vcy5hcGkudjEuQXR0YWNobWVudEID4EECEhoKDWF0dGFjaG1lbn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nRzEnoKDUdldEF0dGFjaG1lbnQSIi5tZW1vcy5hcGkudjEuR2V0QXR0YWNobWVudFJlcXVlc3QaGC5tZW1vcy5hcGkudjEuQXR0YWNobWVudCIr2kEEbmFtZYLT5JMCHhIcL2FwaS92MS97bmFtZT1hdHRhY2htZW50cy8qfRKpAQoQVXBkYXRlQXR0YWNobWVudBIlLm1lbW9zLmFwaS52MS5VcGRhdGVBdHRhY2htZW50UmVxdWVzdBoYLm1lbW9zLmFwaS52MS5BdHRhY2htZW50IlTaQRZhdHRhY2htZW50LHVwZGF0ZV9tYXNrgtPkkwI1OgphdHRhY2htZW50MicvYXBpL3YxL3thdHRhY2htZW50Lm5hbWU9YXR0YWNobWVudHMvKn0SfgoQRGVsZXRlQXR0YWNobWVudBIlLm1lbW9zLmFwaS52MS5EZWxldGVBdHRhY2htZW50UmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSIr2kEEbmFtZYLT5JMCHiocL2FwaS92MS97bmFtZT1hdHRhY2htZW50cy8qfUKuAQoQY29tLm1lbW9zLmFwaS52MUIWQXR0YWNobWVudFNlcnZpY2VQcm90b1ABWjBnaXRodWIuY29tL3VzZW1lbW9zL21lbW9zL3Byb3RvL2dlbi9hcGkvdjE7YXBpdjGiAgNNQViqAgxNZW1vcy5BcGkuVjHKAgxNZW1vc1xBcGlcVjHiAhhNZW1vc1xBcGlcVjFcR1BCTWV0YWRhdGHqAg5NZW1vczo6QXBpOjpWMWIGcHJvdG8z", [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.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;
};

/**
 * 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, 0);

/**
 * @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, 1);

/**
 * @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, 2);

/**
 * @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, 3);

/**
 * @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, 4);

/**
 * @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, 5);

/**
 * @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, 6);

/**
 * @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;
  },
}> = /*@__PURE__*/
  serviceDesc(file_api_v1_attachment_service, 0);

