// @generated by protoc-gen-es v2.10.2 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 { 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 { Message } from "@bufbuild/protobuf";

/**
 * Describes the file api/v1/instance_service.proto.
 */
export const file_api_v1_instance_service: GenFile = /*@__PURE__*/
  fileDesc("Ch1hcGkvdjEvaW5zdGFuY2Vfc2VydmljZS5wcm90bxIMbWVtb3MuYXBpLnYxIlUKD0luc3RhbmNlUHJvZmlsZRINCgVvd25lchgBIAEoCRIPCgd2ZXJzaW9uGAIgASgJEgwKBG1vZGUYAyABKAkSFAoMaW5zdGFuY2VfdXJsGAYgASgJIhsKGUdldEluc3RhbmNlUHJvZmlsZVJlcXVlc3Qi6AsKD0luc3RhbmNlU2V0dGluZxIRCgRuYW1lGAEgASgJQgPgQQgSRwoPZ2VuZXJhbF9zZXR0aW5nGAIgASgLMiwubWVtb3MuYXBpLnYxLkluc3RhbmNlU2V0dGluZy5HZW5lcmFsU2V0dGluZ0gAEkcKD3N0b3JhZ2Vfc2V0dGluZxgDIAEoCzIsLm1lbW9zLmFwaS52MS5JbnN0YW5jZVNldHRpbmcuU3RvcmFnZVNldHRpbmdIABJQChRtZW1vX3JlbGF0ZWRfc2V0dGluZxgEIAEoCzIwLm1lbW9zLmFwaS52MS5JbnN0YW5jZVNldHRpbmcuTWVtb1JlbGF0ZWRTZXR0aW5nSAAahwMKDkdlbmVyYWxTZXR0aW5nEiIKGmRpc2FsbG93X3VzZ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mNlU2V0dGluZxInLm1lbW9zLmFwaS52MS5HZXRJbnN0YW5jZVNldHRpbmdSZXF1ZXN0Gh0ubWVtb3MuYXBpLnYxLkluc3RhbmNlU2V0dGluZyIx2kEEbmFtZYLT5JMCJBIiL2FwaS92MS97bmFtZT1pbnN0YW5jZS9zZXR0aW5ncy8qfRK1AQoVVXBkYXRlSW5zdGFuY2VTZXR0aW5nEioubWVtb3MuYXBpLnYxLlVwZGF0ZUluc3RhbmNlU2V0dGluZ1JlcXVlc3QaHS5tZW1vcy5hcGkudjEuSW5zdGFuY2VTZXR0aW5nIlHaQRNzZXR0aW5nLHVwZGF0ZV9tYXNrgtPkkwI1OgdzZXR0aW5nMiovYXBpL3YxL3tzZXR0aW5nLm5hbWU9aW5zdGFuY2Uvc2V0dGluZ3MvKn1CrAEKEGNvbS5tZW1vcy5hcGkudjFCFEluc3RhbmNlU2VydmljZVByb3RvUAFaMGdpdGh1Yi5jb20vdXNlbWVtb3MvbWVtb3MvcHJvdG8vZ2VuL2FwaS92MTthcGl2MaICA01BWKoCDE1lbW9zLkFwaS5WMcoCDE1lbW9zXEFwaVxWMeICGE1lbW9zXEFwaVxWMVxHUEJNZXRhZGF0YeoCDk1lbW9zOjpBcGk6OlYxYgZwcm90bzM", [file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_field_mask]);

/**
 * Instance profile message containing basic instance information.
 *
 * @generated from message memos.api.v1.InstanceProfile
 */
export type InstanceProfile = Message<"memos.api.v1.InstanceProfile"> & {
  /**
   * The name of instance owner.
   * Format: users/{user}
   *
   * @generated from field: string owner = 1;
   */
  owner: string;

  /**
   * Version is the current version of instance.
   *
   * @generated from field: string version = 2;
   */
  version: string;

  /**
   * Mode is the instance mode (e.g. "prod", "dev" or "demo").
   *
   * @generated from field: string mode = 3;
   */
  mode: string;

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

/**
 * 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";
  } | { 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"> & {
  /**
   * disallow_public_visibility disallows set memo as public visibility.
   *
   * @generated from field: bool disallow_public_visibility = 1;
   */
  disallowPublicVisibility: boolean;

  /**
   * 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[];

  /**
   * enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
   *
   * @generated from field: bool enable_blur_nsfw_content = 9;
   */
  enableBlurNsfwContent: boolean;

  /**
   * nsfw_tags is the list of tags that mark content as NSFW for blurring.
   *
   * @generated from field: repeated string nsfw_tags = 10;
   */
  nsfwTags: 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);

/**
 * 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,
}

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

