// Copyright 2020-2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.9
// 	protoc        (unknown)
// source: buf/alpha/registry/v1alpha1/authn.proto

package registryv1alpha1

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	unsafe "unsafe"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

type GetCurrentUserRequest struct {
	state         protoimpl.MessageState `protogen:"opaque.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *GetCurrentUserRequest) Reset() {
	*x = GetCurrentUserRequest{}
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetCurrentUserRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCurrentUserRequest) ProtoMessage() {}

func (x *GetCurrentUserRequest) ProtoReflect() protoreflect.Message {
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

type GetCurrentUserRequest_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

}

func (b0 GetCurrentUserRequest_builder) Build() *GetCurrentUserRequest {
	m0 := &GetCurrentUserRequest{}
	b, x := &b0, m0
	_, _ = b, x
	return m0
}

type GetCurrentUserResponse struct {
	state           protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_User *User                  `protobuf:"bytes,1,opt,name=user,proto3"`
	unknownFields   protoimpl.UnknownFields
	sizeCache       protoimpl.SizeCache
}

func (x *GetCurrentUserResponse) Reset() {
	*x = GetCurrentUserResponse{}
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetCurrentUserResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCurrentUserResponse) ProtoMessage() {}

func (x *GetCurrentUserResponse) ProtoReflect() protoreflect.Message {
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

func (x *GetCurrentUserResponse) GetUser() *User {
	if x != nil {
		return x.xxx_hidden_User
	}
	return nil
}

func (x *GetCurrentUserResponse) SetUser(v *User) {
	x.xxx_hidden_User = v
}

func (x *GetCurrentUserResponse) HasUser() bool {
	if x == nil {
		return false
	}
	return x.xxx_hidden_User != nil
}

func (x *GetCurrentUserResponse) ClearUser() {
	x.xxx_hidden_User = nil
}

type GetCurrentUserResponse_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	User *User
}

func (b0 GetCurrentUserResponse_builder) Build() *GetCurrentUserResponse {
	m0 := &GetCurrentUserResponse{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_User = b.User
	return m0
}

type GetCurrentUserSubjectRequest struct {
	state         protoimpl.MessageState `protogen:"opaque.v1"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *GetCurrentUserSubjectRequest) Reset() {
	*x = GetCurrentUserSubjectRequest{}
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetCurrentUserSubjectRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCurrentUserSubjectRequest) ProtoMessage() {}

func (x *GetCurrentUserSubjectRequest) ProtoReflect() protoreflect.Message {
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

type GetCurrentUserSubjectRequest_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

}

func (b0 GetCurrentUserSubjectRequest_builder) Build() *GetCurrentUserSubjectRequest {
	m0 := &GetCurrentUserSubjectRequest{}
	b, x := &b0, m0
	_, _ = b, x
	return m0
}

type GetCurrentUserSubjectResponse struct {
	state              protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_Subject string                 `protobuf:"bytes,1,opt,name=subject,proto3"`
	unknownFields      protoimpl.UnknownFields
	sizeCache          protoimpl.SizeCache
}

func (x *GetCurrentUserSubjectResponse) Reset() {
	*x = GetCurrentUserSubjectResponse{}
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *GetCurrentUserSubjectResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*GetCurrentUserSubjectResponse) ProtoMessage() {}

func (x *GetCurrentUserSubjectResponse) ProtoReflect() protoreflect.Message {
	mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

func (x *GetCurrentUserSubjectResponse) GetSubject() string {
	if x != nil {
		return x.xxx_hidden_Subject
	}
	return ""
}

func (x *GetCurrentUserSubjectResponse) SetSubject(v string) {
	x.xxx_hidden_Subject = v
}

type GetCurrentUserSubjectResponse_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	// The user's subject for mapping to user in identity provider.
	// Note: we do not want to make it part of the User response as
	// it contains potentially sensitive information and the User
	// response is shared with other users.
	Subject string
}

func (b0 GetCurrentUserSubjectResponse_builder) Build() *GetCurrentUserSubjectResponse {
	m0 := &GetCurrentUserSubjectResponse{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_Subject = b.Subject
	return m0
}

var File_buf_alpha_registry_v1alpha1_authn_proto protoreflect.FileDescriptor

const file_buf_alpha_registry_v1alpha1_authn_proto_rawDesc = "" +
	"\n" +
	"'buf/alpha/registry/v1alpha1/authn.proto\x12\x1bbuf.alpha.registry.v1alpha1\x1a&buf/alpha/registry/v1alpha1/user.proto\"\x17\n" +
	"\x15GetCurrentUserRequest\"O\n" +
	"\x16GetCurrentUserResponse\x125\n" +
	"\x04user\x18\x01 \x01(\v2!.buf.alpha.registry.v1alpha1.UserR\x04user\"\x1e\n" +
	"\x1cGetCurrentUserSubjectRequest\"9\n" +
	"\x1dGetCurrentUserSubjectResponse\x12\x18\n" +
	"\asubject\x18\x01 \x01(\tR\asubject2\xa4\x02\n" +
	"\fAuthnService\x12~\n" +
	"\x0eGetCurrentUser\x122.buf.alpha.registry.v1alpha1.GetCurrentUserRequest\x1a3.buf.alpha.registry.v1alpha1.GetCurrentUserResponse\"\x03\x90\x02\x01\x12\x93\x01\n" +
	"\x15GetCurrentUserSubject\x129.buf.alpha.registry.v1alpha1.GetCurrentUserSubjectRequest\x1a:.buf.alpha.registry.v1alpha1.GetCurrentUserSubjectResponse\"\x03\x90\x02\x01B\x97\x02\n" +
	"\x1fcom.buf.alpha.registry.v1alpha1B\n" +
	"AuthnProtoP\x01ZYgithub.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1;registryv1alpha1\xa2\x02\x03BAR\xaa\x02\x1bBuf.Alpha.Registry.V1alpha1\xca\x02\x1bBuf\\Alpha\\Registry\\V1alpha1\xe2\x02'Buf\\Alpha\\Registry\\V1alpha1\\GPBMetadata\xea\x02\x1eBuf::Alpha::Registry::V1alpha1b\x06proto3"

var file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_buf_alpha_registry_v1alpha1_authn_proto_goTypes = []any{
	(*GetCurrentUserRequest)(nil),         // 0: buf.alpha.registry.v1alpha1.GetCurrentUserRequest
	(*GetCurrentUserResponse)(nil),        // 1: buf.alpha.registry.v1alpha1.GetCurrentUserResponse
	(*GetCurrentUserSubjectRequest)(nil),  // 2: buf.alpha.registry.v1alpha1.GetCurrentUserSubjectRequest
	(*GetCurrentUserSubjectResponse)(nil), // 3: buf.alpha.registry.v1alpha1.GetCurrentUserSubjectResponse
	(*User)(nil),                          // 4: buf.alpha.registry.v1alpha1.User
}
var file_buf_alpha_registry_v1alpha1_authn_proto_depIdxs = []int32{
	4, // 0: buf.alpha.registry.v1alpha1.GetCurrentUserResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
	0, // 1: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUser:input_type -> buf.alpha.registry.v1alpha1.GetCurrentUserRequest
	2, // 2: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUserSubject:input_type -> buf.alpha.registry.v1alpha1.GetCurrentUserSubjectRequest
	1, // 3: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUser:output_type -> buf.alpha.registry.v1alpha1.GetCurrentUserResponse
	3, // 4: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUserSubject:output_type -> buf.alpha.registry.v1alpha1.GetCurrentUserSubjectResponse
	3, // [3:5] is the sub-list for method output_type
	1, // [1:3] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() { file_buf_alpha_registry_v1alpha1_authn_proto_init() }
func file_buf_alpha_registry_v1alpha1_authn_proto_init() {
	if File_buf_alpha_registry_v1alpha1_authn_proto != nil {
		return
	}
	file_buf_alpha_registry_v1alpha1_user_proto_init()
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_alpha_registry_v1alpha1_authn_proto_rawDesc), len(file_buf_alpha_registry_v1alpha1_authn_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_buf_alpha_registry_v1alpha1_authn_proto_goTypes,
		DependencyIndexes: file_buf_alpha_registry_v1alpha1_authn_proto_depIdxs,
		MessageInfos:      file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes,
	}.Build()
	File_buf_alpha_registry_v1alpha1_authn_proto = out.File
	file_buf_alpha_registry_v1alpha1_authn_proto_goTypes = nil
	file_buf_alpha_registry_v1alpha1_authn_proto_depIdxs = nil
}
