// @generated by protoc-gen-es v2.11.0 with parameter "target=ts"
// @generated from file api/v1/instance_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 type { User } from "./user_service_pb";
import { file_api_v1_user_service } from "./user_service_pb";
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 { FieldMask } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt";
import type { Color } from "../../google/type/color_pb";
import { file_google_type_color } from "../../google/type/color_pb";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file api/v1/instance_service.proto.
 */
export const file_api_v1_instance_service: GenFile = /*@__PURE__*/
  fileDesc(" ", [file_api_v1_user_service, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask, file_google_type_color]);

/**
 * Instance profile message containing basic instance information.
 *
 * @generated from message memos.api.v1.InstanceProfile
 */
export type InstanceProfile = Message<"memos.api.v1.InstanceProfile"> & {
  /**
   * Version is the current version of instance.
   *
   * @generated from field: string version = 2;
   */
  version: string;

  /**
   * Demo indicates if the instance is in demo mode.
   *
   * @generated from field: bool demo = 3;
   */
  demo: boolean;

  /**
   * Instance URL is the URL of the instance.
   *
   * @generated from field: string instance_url = 6;
   */
  instanceUrl: string;

  /**
   * The first administrator who set up this instance.
   * When null, instance requires initial setup (creating the first admin account).
   *
   * @generated from field: memos.api.v1.User admin = 7;
   */
  admin?: User;
};

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

/**
 * Request for instance profile.
 *
 * @generated from message memos.api.v1.GetInstanceProfileRequest
 */
export type GetInstanceProfileRequest = Message<"memos.api.v1.GetInstanceProfileRequest"> & {
};

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

/**
 * An instance setting resource.
 *
 * @generated from message memos.api.v1.InstanceSetting
 */
export type InstanceSetting = Message<"memos.api.v1.InstanceSetting"> & {
  /**
   * The name of the instance setting.
   * Format: instance/settings/{setting}
   *
   * @generated from field: string name = 1;
   */
  name: string;

  /**
   * @generated from oneof memos.api.v1.InstanceSetting.value
   */
  value: {
    /**
     * @generated from field: memos.api.v1.InstanceSetting.GeneralSetting general_setting = 2;
     */
    value: InstanceSetting_GeneralSetting;
    case: "generalSetting";
  } | {
    /**
     * @generated from field: memos.api.v1.InstanceSetting.StorageSetting storage_setting = 3;
     */
    value: InstanceSetting_StorageSetting;
    case: "storageSetting";
  } | {
    /**
     * @generated from field: memos.api.v1.InstanceSetting.MemoRelatedSetting memo_related_setting = 4;
     */
    value: InstanceSetting_MemoRelatedSetting;
    case: "memoRelatedSetting";
  } | {
    /**
     * @generated from field: memos.api.v1.InstanceSetting.TagsSetting tags_setting = 5;
     */
    value: InstanceSetting_TagsSetting;
    case: "tagsSetting";
  } | {
    /**
     * @generated from field: memos.api.v1.InstanceSetting.NotificationSetting notification_setting = 6;
     */
    value: InstanceSetting_NotificationSetting;
    case: "notificationSetting";
  } | { case: undefined; value?: undefined };
};

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

/**
 * General instance settings configuration.
 *
 * @generated from message memos.api.v1.InstanceSetting.GeneralSetting
 */
export type InstanceSetting_GeneralSetting = Message<"memos.api.v1.InstanceSetting.GeneralSetting"> & {
  /**
   * disallow_user_registration disallows user registration.
   *
   * @generated from field: bool disallow_user_registration = 2;
   */
  disallowUserRegistration: boolean;

  /**
   * disallow_password_auth disallows password authentication.
   *
   * @generated from field: bool disallow_password_auth = 3;
   */
  disallowPasswordAuth: boolean;

  /**
   * additional_script is the additional script.
   *
   * @generated from field: string additional_script = 4;
   */
  additionalScript: string;

  /**
   * additional_style is the additional style.
   *
   * @generated from field: string additional_style = 5;
   */
  additionalStyle: string;

  /**
   * custom_profile is the custom profile.
   *
   * @generated from field: memos.api.v1.InstanceSetting.GeneralSetting.CustomProfile custom_profile = 6;
   */
  customProfile?: InstanceSetting_GeneralSetting_CustomProfile;

  /**
   * week_start_day_offset is the week start day offset from Sunday.
   * 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
   * Default is Sunday.
   *
   * @generated from field: int32 week_start_day_offset = 7;
   */
  weekStartDayOffset: number;

  /**
   * disallow_change_username disallows changing username.
   *
   * @generated from field: bool disallow_change_username = 8;
   */
  disallowChangeUsername: boolean;

  /**
   * disallow_change_nickname disallows changing nickname.
   *
   * @generated from field: bool disallow_change_nickname = 9;
   */
  disallowChangeNickname: boolean;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.GeneralSetting.
 * Use `create(InstanceSetting_GeneralSettingSchema)` to create a new message.
 */
export const InstanceSetting_GeneralSettingSchema: GenMessage<InstanceSetting_GeneralSetting> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 0);

/**
 * Custom profile configuration for instance branding.
 *
 * @generated from message memos.api.v1.InstanceSetting.GeneralSetting.CustomProfile
 */
export type InstanceSetting_GeneralSetting_CustomProfile = Message<"memos.api.v1.InstanceSetting.GeneralSetting.CustomProfile"> & {
  /**
   * @generated from field: string title = 1;
   */
  title: string;

  /**
   * @generated from field: string description = 2;
   */
  description: string;

  /**
   * @generated from field: string logo_url = 3;
   */
  logoUrl: string;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.GeneralSetting.CustomProfile.
 * Use `create(InstanceSetting_GeneralSetting_CustomProfileSchema)` to create a new message.
 */
export const InstanceSetting_GeneralSetting_CustomProfileSchema: GenMessage<InstanceSetting_GeneralSetting_CustomProfile> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 0, 0);

/**
 * Storage configuration settings for instance attachments.
 *
 * @generated from message memos.api.v1.InstanceSetting.StorageSetting
 */
export type InstanceSetting_StorageSetting = Message<"memos.api.v1.InstanceSetting.StorageSetting"> & {
  /**
   * storage_type is the storage type.
   *
   * @generated from field: memos.api.v1.InstanceSetting.StorageSetting.StorageType storage_type = 1;
   */
  storageType: InstanceSetting_StorageSetting_StorageType;

  /**
   * The template of file path.
   * e.g. assets/{timestamp}_{filename}
   *
   * @generated from field: string filepath_template = 2;
   */
  filepathTemplate: string;

  /**
   * The max upload size in megabytes.
   *
   * @generated from field: int64 upload_size_limit_mb = 3;
   */
  uploadSizeLimitMb: bigint;

  /**
   * The S3 config.
   *
   * @generated from field: memos.api.v1.InstanceSetting.StorageSetting.S3Config s3_config = 4;
   */
  s3Config?: InstanceSetting_StorageSetting_S3Config;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.StorageSetting.
 * Use `create(InstanceSetting_StorageSettingSchema)` to create a new message.
 */
export const InstanceSetting_StorageSettingSchema: GenMessage<InstanceSetting_StorageSetting> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 1);

/**
 * S3 configuration for cloud storage backend.
 * Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
 *
 * @generated from message memos.api.v1.InstanceSetting.StorageSetting.S3Config
 */
export type InstanceSetting_StorageSetting_S3Config = Message<"memos.api.v1.InstanceSetting.StorageSetting.S3Config"> & {
  /**
   * @generated from field: string access_key_id = 1;
   */
  accessKeyId: string;

  /**
   * @generated from field: string access_key_secret = 2;
   */
  accessKeySecret: string;

  /**
   * @generated from field: string endpoint = 3;
   */
  endpoint: string;

  /**
   * @generated from field: string region = 4;
   */
  region: string;

  /**
   * @generated from field: string bucket = 5;
   */
  bucket: string;

  /**
   * @generated from field: bool use_path_style = 6;
   */
  usePathStyle: boolean;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.StorageSetting.S3Config.
 * Use `create(InstanceSetting_StorageSetting_S3ConfigSchema)` to create a new message.
 */
export const InstanceSetting_StorageSetting_S3ConfigSchema: GenMessage<InstanceSetting_StorageSetting_S3Config> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 1, 0);

/**
 * Storage type enumeration for different storage backends.
 *
 * @generated from enum memos.api.v1.InstanceSetting.StorageSetting.StorageType
 */
export enum InstanceSetting_StorageSetting_StorageType {
  /**
   * @generated from enum value: STORAGE_TYPE_UNSPECIFIED = 0;
   */
  STORAGE_TYPE_UNSPECIFIED = 0,

  /**
   * DATABASE is the database storage type.
   *
   * @generated from enum value: DATABASE = 1;
   */
  DATABASE = 1,

  /**
   * LOCAL is the local storage type.
   *
   * @generated from enum value: LOCAL = 2;
   */
  LOCAL = 2,

  /**
   * S3 is the S3 storage type.
   *
   * @generated from enum value: S3 = 3;
   */
  S3 = 3,
}

/**
 * Describes the enum memos.api.v1.InstanceSetting.StorageSetting.StorageType.
 */
export const InstanceSetting_StorageSetting_StorageTypeSchema: GenEnum<InstanceSetting_StorageSetting_StorageType> = /*@__PURE__*/
  enumDesc(file_api_v1_instance_service, 2, 1, 0);

/**
 * Memo-related instance settings and policies.
 *
 * @generated from message memos.api.v1.InstanceSetting.MemoRelatedSetting
 */
export type InstanceSetting_MemoRelatedSetting = Message<"memos.api.v1.InstanceSetting.MemoRelatedSetting"> & {
  /**
   * display_with_update_time orders and displays memo with update time.
   *
   * @generated from field: bool display_with_update_time = 2;
   */
  displayWithUpdateTime: boolean;

  /**
   * content_length_limit is the limit of content length. Unit is byte.
   *
   * @generated from field: int32 content_length_limit = 3;
   */
  contentLengthLimit: number;

  /**
   * enable_double_click_edit enables editing on double click.
   *
   * @generated from field: bool enable_double_click_edit = 4;
   */
  enableDoubleClickEdit: boolean;

  /**
   * reactions is the list of reactions.
   *
   * @generated from field: repeated string reactions = 7;
   */
  reactions: string[];
};

/**
 * Describes the message memos.api.v1.InstanceSetting.MemoRelatedSetting.
 * Use `create(InstanceSetting_MemoRelatedSettingSchema)` to create a new message.
 */
export const InstanceSetting_MemoRelatedSettingSchema: GenMessage<InstanceSetting_MemoRelatedSetting> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 2);

/**
 * Metadata for a tag.
 *
 * @generated from message memos.api.v1.InstanceSetting.TagMetadata
 */
export type InstanceSetting_TagMetadata = Message<"memos.api.v1.InstanceSetting.TagMetadata"> & {
  /**
   * Background color for the tag label.
   *
   * @generated from field: google.type.Color background_color = 1;
   */
  backgroundColor?: Color;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.TagMetadata.
 * Use `create(InstanceSetting_TagMetadataSchema)` to create a new message.
 */
export const InstanceSetting_TagMetadataSchema: GenMessage<InstanceSetting_TagMetadata> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 3);

/**
 * Tag metadata configuration.
 *
 * @generated from message memos.api.v1.InstanceSetting.TagsSetting
 */
export type InstanceSetting_TagsSetting = Message<"memos.api.v1.InstanceSetting.TagsSetting"> & {
  /**
   * @generated from field: map<string, memos.api.v1.InstanceSetting.TagMetadata> tags = 1;
   */
  tags: { [key: string]: InstanceSetting_TagMetadata };
};

/**
 * Describes the message memos.api.v1.InstanceSetting.TagsSetting.
 * Use `create(InstanceSetting_TagsSettingSchema)` to create a new message.
 */
export const InstanceSetting_TagsSettingSchema: GenMessage<InstanceSetting_TagsSetting> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 4);

/**
 * Notification transport configuration.
 *
 * @generated from message memos.api.v1.InstanceSetting.NotificationSetting
 */
export type InstanceSetting_NotificationSetting = Message<"memos.api.v1.InstanceSetting.NotificationSetting"> & {
  /**
   * @generated from field: memos.api.v1.InstanceSetting.NotificationSetting.EmailSetting email = 1;
   */
  email?: InstanceSetting_NotificationSetting_EmailSetting;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.NotificationSetting.
 * Use `create(InstanceSetting_NotificationSettingSchema)` to create a new message.
 */
export const InstanceSetting_NotificationSettingSchema: GenMessage<InstanceSetting_NotificationSetting> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 5);

/**
 * Email delivery configuration for notifications.
 *
 * @generated from message memos.api.v1.InstanceSetting.NotificationSetting.EmailSetting
 */
export type InstanceSetting_NotificationSetting_EmailSetting = Message<"memos.api.v1.InstanceSetting.NotificationSetting.EmailSetting"> & {
  /**
   * @generated from field: bool enabled = 1;
   */
  enabled: boolean;

  /**
   * @generated from field: string smtp_host = 2;
   */
  smtpHost: string;

  /**
   * @generated from field: int32 smtp_port = 3;
   */
  smtpPort: number;

  /**
   * @generated from field: string smtp_username = 4;
   */
  smtpUsername: string;

  /**
   * @generated from field: string smtp_password = 5;
   */
  smtpPassword: string;

  /**
   * @generated from field: string from_email = 6;
   */
  fromEmail: string;

  /**
   * @generated from field: string from_name = 7;
   */
  fromName: string;

  /**
   * @generated from field: string reply_to = 8;
   */
  replyTo: string;

  /**
   * @generated from field: bool use_tls = 9;
   */
  useTls: boolean;

  /**
   * @generated from field: bool use_ssl = 10;
   */
  useSsl: boolean;
};

/**
 * Describes the message memos.api.v1.InstanceSetting.NotificationSetting.EmailSetting.
 * Use `create(InstanceSetting_NotificationSetting_EmailSettingSchema)` to create a new message.
 */
export const InstanceSetting_NotificationSetting_EmailSettingSchema: GenMessage<InstanceSetting_NotificationSetting_EmailSetting> = /*@__PURE__*/
  messageDesc(file_api_v1_instance_service, 2, 5, 0);

/**
 * Enumeration of instance setting keys.
 *
 * @generated from enum memos.api.v1.InstanceSetting.Key
 */
export enum InstanceSetting_Key {
  /**
   * @generated from enum value: KEY_UNSPECIFIED = 0;
   */
  KEY_UNSPECIFIED = 0,

  /**
   * GENERAL is the key for general settings.
   *
   * @generated from enum value: GENERAL = 1;
   */
  GENERAL = 1,

  /**
   * STORAGE is the key for storage settings.
   *
   * @generated from enum value: STORAGE = 2;
   */
  STORAGE = 2,

  /**
   * MEMO_RELATED is the key for memo related settings.
   *
   * @generated from enum value: MEMO_RELATED = 3;
   */
  MEMO_RELATED = 3,

  /**
   * TAGS is the key for tag metadata.
   *
   * @generated from enum value: TAGS = 4;
   */
  TAGS = 4,

  /**
   * NOTIFICATION is the key for notification transport settings.
   *
   * @generated from enum value: NOTIFICATION = 5;
   */
  NOTIFICATION = 5,
}

/**
 * Describes the enum memos.api.v1.InstanceSetting.Key.
 */
export const InstanceSetting_KeySchema: GenEnum<InstanceSetting_Key> = /*@__PURE__*/
  enumDesc(file_api_v1_instance_service, 2, 0);

/**
 * Request message for GetInstanceSetting method.
 *
 * @generated from message memos.api.v1.GetInstanceSettingRequest
 */
export type GetInstanceSettingRequest = Message<"memos.api.v1.GetInstanceSettingRequest"> & {
  /**
   * The resource name of the instance setting.
   * Format: instance/settings/{setting}
   *
   * @generated from field: string name = 1;
   */
  name: string;
};

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

/**
 * Request message for UpdateInstanceSetting method.
 *
 * @generated from message memos.api.v1.UpdateInstanceSettingRequest
 */
export type UpdateInstanceSettingRequest = Message<"memos.api.v1.UpdateInstanceSettingRequest"> & {
  /**
   * The instance setting resource which replaces the resource on the server.
   *
   * @generated from field: memos.api.v1.InstanceSetting setting = 1;
   */
  setting?: InstanceSetting;

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

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

/**
 * @generated from service memos.api.v1.InstanceService
 */
export const InstanceService: GenService<{
  /**
   * Gets the instance profile.
   *
   * @generated from rpc memos.api.v1.InstanceService.GetInstanceProfile
   */
  getInstanceProfile: {
    methodKind: "unary";
    input: typeof GetInstanceProfileRequestSchema;
    output: typeof InstanceProfileSchema;
  },
  /**
   * Gets an instance setting.
   *
   * @generated from rpc memos.api.v1.InstanceService.GetInstanceSetting
   */
  getInstanceSetting: {
    methodKind: "unary";
    input: typeof GetInstanceSettingRequestSchema;
    output: typeof InstanceSettingSchema;
  },
  /**
   * Updates an instance setting.
   *
   * @generated from rpc memos.api.v1.InstanceService.UpdateInstanceSetting
   */
  updateInstanceSetting: {
    methodKind: "unary";
    input: typeof UpdateInstanceSettingRequestSchema;
    output: typeof InstanceSettingSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_api_v1_instance_service, 0);

