// @generated by protoc-gen-es v2.10.2 with parameter "target=ts"
// @generated from file api/v1/idp_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 } from "@bufbuild/protobuf/wkt";
import { file_google_protobuf_empty, file_google_protobuf_field_mask } from "@bufbuild/protobuf/wkt";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file api/v1/idp_service.proto.
 */
export const file_api_v1_idp_service: GenFile = /*@__PURE__*/
  fileDesc("ChhhcGkvdjEvaWRwX3NlcnZpY2UucHJvdG8SDG1lbW9zLmFwaS52MSLfAgoQSWRlbnRpdHlQcm92aWRlchIRCgRuYW1lGAEgASgJQgPgQQgSNgoEdHlwZRgCIAEoDjIjLm1lbW9zLmFwaS52MS5JZGVudGl0eVByb3ZpZGVyLlR5cGVCA+BBAhISCgV0aXRsZRgDIAEoCUID4EECEh4KEWlkZW50aWZpZXJfZmlsdGVyGAQgASgJQgPgQQESOQoGY29uZmlnGAUgASgLMiQubWVtb3MuYXBpLnYxLklkZW50aXR5UHJvdmlkZXJDb25maWdCA+BBAiIoCgRUeXBlEhQKEFRZUEVfVU5TUEVDSUZJRUQQABIKCgZPQVVUSDIQATpn6kFkCh1tZW1vcy5hcGkudjEvSWRlbnRpdHlQcm92aWRlchIYaWRlbnRpdHktcHJvdmlkZXJzL3tpZHB9GgRuYW1lKhFpZGVudGl0eVByb3ZpZGVyczIQaWRlbnRpdHlQcm92aWRlciJXChZJZGVudGl0eVByb3ZpZGVyQ29uZmlnEjMKDW9hdXRoMl9jb25maWcYASABKAsyGi5tZW1vcy5hcGkudjEuT0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l0eVByb3ZpZGVyEisubWVtb3MuYXBpLnYxLkRlbGV0ZUlkZW50aXR5UHJvdmlkZXJSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5IjLaQQRuYW1lgtPkkwIlKiMvYXBpL3YxL3tuYW1lPWlkZW50aXR5LXByb3ZpZGVycy8qfUKnAQoQY29tLm1lbW9zLmFwaS52MUIPSWRwU2VydmljZVByb3RvUAFaMGdpdGh1Yi5jb20vdXNlbWVtb3MvbWVtb3MvcHJvdG8vZ2VuL2FwaS92MTthcGl2MaICA01BWKoCDE1lbW9zLkFwaS5WMcoCDE1lbW9zXEFwaVxWMeICGE1lbW9zXEFwaVxWMVxHUEJNZXRhZGF0YeoCDk1lbW9zOjpBcGk6OlYxYgZwcm90bzM", [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]);

/**
 * @generated from message memos.api.v1.IdentityProvider
 */
export type IdentityProvider = Message<"memos.api.v1.IdentityProvider"> & {
  /**
   * The resource name of the identity provider.
   * Format: identity-providers/{idp}
   *
   * @generated from field: string name = 1;
   */
  name: string;

  /**
   * Required. The type of the identity provider.
   *
   * @generated from field: memos.api.v1.IdentityProvider.Type type = 2;
   */
  type: IdentityProvider_Type;

  /**
   * Required. The display title of the identity provider.
   *
   * @generated from field: string title = 3;
   */
  title: string;

  /**
   * Optional. Filter applied to user identifiers.
   *
   * @generated from field: string identifier_filter = 4;
   */
  identifierFilter: string;

  /**
   * Required. Configuration for the identity provider.
   *
   * @generated from field: memos.api.v1.IdentityProviderConfig config = 5;
   */
  config?: IdentityProviderConfig;
};

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

/**
 * @generated from enum memos.api.v1.IdentityProvider.Type
 */
export enum IdentityProvider_Type {
  /**
   * @generated from enum value: TYPE_UNSPECIFIED = 0;
   */
  TYPE_UNSPECIFIED = 0,

  /**
   * OAuth2 identity provider.
   *
   * @generated from enum value: OAUTH2 = 1;
   */
  OAUTH2 = 1,
}

/**
 * Describes the enum memos.api.v1.IdentityProvider.Type.
 */
export const IdentityProvider_TypeSchema: GenEnum<IdentityProvider_Type> = /*@__PURE__*/
  enumDesc(file_api_v1_idp_service, 0, 0);

/**
 * @generated from message memos.api.v1.IdentityProviderConfig
 */
export type IdentityProviderConfig = Message<"memos.api.v1.IdentityProviderConfig"> & {
  /**
   * @generated from oneof memos.api.v1.IdentityProviderConfig.config
   */
  config: {
    /**
     * @generated from field: memos.api.v1.OAuth2Config oauth2_config = 1;
     */
    value: OAuth2Config;
    case: "oauth2Config";
  } | { case: undefined; value?: undefined };
};

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

/**
 * @generated from message memos.api.v1.FieldMapping
 */
export type FieldMapping = Message<"memos.api.v1.FieldMapping"> & {
  /**
   * @generated from field: string identifier = 1;
   */
  identifier: string;

  /**
   * @generated from field: string display_name = 2;
   */
  displayName: string;

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

  /**
   * @generated from field: string avatar_url = 4;
   */
  avatarUrl: string;
};

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

/**
 * @generated from message memos.api.v1.OAuth2Config
 */
export type OAuth2Config = Message<"memos.api.v1.OAuth2Config"> & {
  /**
   * @generated from field: string client_id = 1;
   */
  clientId: string;

  /**
   * @generated from field: string client_secret = 2;
   */
  clientSecret: string;

  /**
   * @generated from field: string auth_url = 3;
   */
  authUrl: string;

  /**
   * @generated from field: string token_url = 4;
   */
  tokenUrl: string;

  /**
   * @generated from field: string user_info_url = 5;
   */
  userInfoUrl: string;

  /**
   * @generated from field: repeated string scopes = 6;
   */
  scopes: string[];

  /**
   * @generated from field: memos.api.v1.FieldMapping field_mapping = 7;
   */
  fieldMapping?: FieldMapping;
};

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

/**
 * @generated from message memos.api.v1.ListIdentityProvidersRequest
 */
export type ListIdentityProvidersRequest = Message<"memos.api.v1.ListIdentityProvidersRequest"> & {
};

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

/**
 * @generated from message memos.api.v1.ListIdentityProvidersResponse
 */
export type ListIdentityProvidersResponse = Message<"memos.api.v1.ListIdentityProvidersResponse"> & {
  /**
   * The list of identity providers.
   *
   * @generated from field: repeated memos.api.v1.IdentityProvider identity_providers = 1;
   */
  identityProviders: IdentityProvider[];
};

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

/**
 * @generated from message memos.api.v1.GetIdentityProviderRequest
 */
export type GetIdentityProviderRequest = Message<"memos.api.v1.GetIdentityProviderRequest"> & {
  /**
   * Required. The resource name of the identity provider to get.
   * Format: identity-providers/{idp}
   *
   * @generated from field: string name = 1;
   */
  name: string;
};

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

/**
 * @generated from message memos.api.v1.CreateIdentityProviderRequest
 */
export type CreateIdentityProviderRequest = Message<"memos.api.v1.CreateIdentityProviderRequest"> & {
  /**
   * Required. The identity provider to create.
   *
   * @generated from field: memos.api.v1.IdentityProvider identity_provider = 1;
   */
  identityProvider?: IdentityProvider;

  /**
   * Optional. The ID to use for the identity provider, which will become the final component of the resource name.
   * If not provided, the system will generate one.
   *
   * @generated from field: string identity_provider_id = 2;
   */
  identityProviderId: string;
};

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

/**
 * @generated from message memos.api.v1.UpdateIdentityProviderRequest
 */
export type UpdateIdentityProviderRequest = Message<"memos.api.v1.UpdateIdentityProviderRequest"> & {
  /**
   * Required. The identity provider to update.
   *
   * @generated from field: memos.api.v1.IdentityProvider identity_provider = 1;
   */
  identityProvider?: IdentityProvider;

  /**
   * Required. The update mask applies to the resource. Only the top level fields of
   * IdentityProvider are supported.
   *
   * @generated from field: google.protobuf.FieldMask update_mask = 2;
   */
  updateMask?: FieldMask;
};

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

/**
 * @generated from message memos.api.v1.DeleteIdentityProviderRequest
 */
export type DeleteIdentityProviderRequest = Message<"memos.api.v1.DeleteIdentityProviderRequest"> & {
  /**
   * Required. The resource name of the identity provider to delete.
   * Format: identity-providers/{idp}
   *
   * @generated from field: string name = 1;
   */
  name: string;
};

/**
 * Describes the message memos.api.v1.DeleteIdentityProviderRequest.
 * Use `create(DeleteIdentityProviderRequestSchema)` to create a new message.
 */
export const DeleteIdentityProviderRequestSchema: GenMessage<DeleteIdentityProviderRequest> = /*@__PURE__*/
  messageDesc(file_api_v1_idp_service, 9);

/**
 * @generated from service memos.api.v1.IdentityProviderService
 */
export const IdentityProviderService: GenService<{
  /**
   * ListIdentityProviders lists identity providers.
   *
   * @generated from rpc memos.api.v1.IdentityProviderService.ListIdentityProviders
   */
  listIdentityProviders: {
    methodKind: "unary";
    input: typeof ListIdentityProvidersRequestSchema;
    output: typeof ListIdentityProvidersResponseSchema;
  },
  /**
   * GetIdentityProvider gets an identity provider.
   *
   * @generated from rpc memos.api.v1.IdentityProviderService.GetIdentityProvider
   */
  getIdentityProvider: {
    methodKind: "unary";
    input: typeof GetIdentityProviderRequestSchema;
    output: typeof IdentityProviderSchema;
  },
  /**
   * CreateIdentityProvider creates an identity provider.
   *
   * @generated from rpc memos.api.v1.IdentityProviderService.CreateIdentityProvider
   */
  createIdentityProvider: {
    methodKind: "unary";
    input: typeof CreateIdentityProviderRequestSchema;
    output: typeof IdentityProviderSchema;
  },
  /**
   * UpdateIdentityProvider updates an identity provider.
   *
   * @generated from rpc memos.api.v1.IdentityProviderService.UpdateIdentityProvider
   */
  updateIdentityProvider: {
    methodKind: "unary";
    input: typeof UpdateIdentityProviderRequestSchema;
    output: typeof IdentityProviderSchema;
  },
  /**
   * DeleteIdentityProvider deletes an identity provider.
   *
   * @generated from rpc memos.api.v1.IdentityProviderService.DeleteIdentityProvider
   */
  deleteIdentityProvider: {
    methodKind: "unary";
    input: typeof DeleteIdentityProviderRequestSchema;
    output: typeof EmptySchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_api_v1_idp_service, 0);

