// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.6
// 	protoc        v3.19.0
// source: external/iam/v2/introspect.proto

package v2

import (
	context "context"
	_ "github.com/chef/automate/api/external/annotations/iam"
	request "github.com/chef/automate/api/external/iam/v2/request"
	response "github.com/chef/automate/api/external/iam/v2/response"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	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)
)

var File_external_iam_v2_introspect_proto protoreflect.FileDescriptor

const file_external_iam_v2_introspect_proto_rawDesc = "" +
	"\n" +
	" external/iam/v2/introspect.proto\x12\x18chef.automate.api.iam.v2\x1a\x1cgoogle/api/annotations.proto\x1a(external/iam/v2/request/introspect.proto\x1a)external/iam/v2/response/introspect.proto\x1a*external/annotations/iam/annotations.proto2\xb0\x04\n" +
	"\rAuthorization\x12\xb1\x01\n" +
	"\rIntrospectAll\x12*.chef.automate.api.iam.v2.IntrospectAllReq\x1a(.chef.automate.api.iam.v2.IntrospectResp\"J\x8a\xb5\x18'\n" +
	"\x0eiam:introspect\x12\x15iam:introspect:getAll\x82\xd3\xe4\x93\x02\x19\x12\x17/apis/iam/v2/introspect\x12\xbc\x01\n" +
	"\x0eIntrospectSome\x12+.chef.automate.api.iam.v2.IntrospectSomeReq\x1a(.chef.automate.api.iam.v2.IntrospectResp\"S\x8a\xb5\x18(\n" +
	"\x0eiam:introspect\x12\x16iam:introspect:getSome\x82\xd3\xe4\x93\x02!:\x01*\"\x1c/apis/iam/v2/introspect_some\x12\xab\x01\n" +
	"\n" +
	"Introspect\x12'.chef.automate.api.iam.v2.IntrospectReq\x1a(.chef.automate.api.iam.v2.IntrospectResp\"J\x8a\xb5\x18$\n" +
	"\x0eiam:introspect\x12\x12iam:introspect:get\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/apis/iam/v2/introspectB.Z,github.com/chef/automate/api/external/iam/v2b\x06proto3"

var file_external_iam_v2_introspect_proto_goTypes = []any{
	(*request.IntrospectAllReq)(nil),  // 0: chef.automate.api.iam.v2.IntrospectAllReq
	(*request.IntrospectSomeReq)(nil), // 1: chef.automate.api.iam.v2.IntrospectSomeReq
	(*request.IntrospectReq)(nil),     // 2: chef.automate.api.iam.v2.IntrospectReq
	(*response.IntrospectResp)(nil),   // 3: chef.automate.api.iam.v2.IntrospectResp
}
var file_external_iam_v2_introspect_proto_depIdxs = []int32{
	0, // 0: chef.automate.api.iam.v2.Authorization.IntrospectAll:input_type -> chef.automate.api.iam.v2.IntrospectAllReq
	1, // 1: chef.automate.api.iam.v2.Authorization.IntrospectSome:input_type -> chef.automate.api.iam.v2.IntrospectSomeReq
	2, // 2: chef.automate.api.iam.v2.Authorization.Introspect:input_type -> chef.automate.api.iam.v2.IntrospectReq
	3, // 3: chef.automate.api.iam.v2.Authorization.IntrospectAll:output_type -> chef.automate.api.iam.v2.IntrospectResp
	3, // 4: chef.automate.api.iam.v2.Authorization.IntrospectSome:output_type -> chef.automate.api.iam.v2.IntrospectResp
	3, // 5: chef.automate.api.iam.v2.Authorization.Introspect:output_type -> chef.automate.api.iam.v2.IntrospectResp
	3, // [3:6] is the sub-list for method output_type
	0, // [0:3] is the sub-list for method input_type
	0, // [0:0] is the sub-list for extension type_name
	0, // [0:0] is the sub-list for extension extendee
	0, // [0:0] is the sub-list for field type_name
}

func init() { file_external_iam_v2_introspect_proto_init() }
func file_external_iam_v2_introspect_proto_init() {
	if File_external_iam_v2_introspect_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_external_iam_v2_introspect_proto_rawDesc), len(file_external_iam_v2_introspect_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   0,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_external_iam_v2_introspect_proto_goTypes,
		DependencyIndexes: file_external_iam_v2_introspect_proto_depIdxs,
	}.Build()
	File_external_iam_v2_introspect_proto = out.File
	file_external_iam_v2_introspect_proto_goTypes = nil
	file_external_iam_v2_introspect_proto_depIdxs = nil
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6

// AuthorizationClient is the client API for Authorization service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AuthorizationClient interface {
	IntrospectAll(ctx context.Context, in *request.IntrospectAllReq, opts ...grpc.CallOption) (*response.IntrospectResp, error)
	IntrospectSome(ctx context.Context, in *request.IntrospectSomeReq, opts ...grpc.CallOption) (*response.IntrospectResp, error)
	Introspect(ctx context.Context, in *request.IntrospectReq, opts ...grpc.CallOption) (*response.IntrospectResp, error)
}

type authorizationClient struct {
	cc grpc.ClientConnInterface
}

func NewAuthorizationClient(cc grpc.ClientConnInterface) AuthorizationClient {
	return &authorizationClient{cc}
}

func (c *authorizationClient) IntrospectAll(ctx context.Context, in *request.IntrospectAllReq, opts ...grpc.CallOption) (*response.IntrospectResp, error) {
	out := new(response.IntrospectResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Authorization/IntrospectAll", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authorizationClient) IntrospectSome(ctx context.Context, in *request.IntrospectSomeReq, opts ...grpc.CallOption) (*response.IntrospectResp, error) {
	out := new(response.IntrospectResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Authorization/IntrospectSome", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *authorizationClient) Introspect(ctx context.Context, in *request.IntrospectReq, opts ...grpc.CallOption) (*response.IntrospectResp, error) {
	out := new(response.IntrospectResp)
	err := c.cc.Invoke(ctx, "/chef.automate.api.iam.v2.Authorization/Introspect", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AuthorizationServer is the server API for Authorization service.
type AuthorizationServer interface {
	IntrospectAll(context.Context, *request.IntrospectAllReq) (*response.IntrospectResp, error)
	IntrospectSome(context.Context, *request.IntrospectSomeReq) (*response.IntrospectResp, error)
	Introspect(context.Context, *request.IntrospectReq) (*response.IntrospectResp, error)
}

// UnimplementedAuthorizationServer can be embedded to have forward compatible implementations.
type UnimplementedAuthorizationServer struct {
}

func (*UnimplementedAuthorizationServer) IntrospectAll(context.Context, *request.IntrospectAllReq) (*response.IntrospectResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method IntrospectAll not implemented")
}
func (*UnimplementedAuthorizationServer) IntrospectSome(context.Context, *request.IntrospectSomeReq) (*response.IntrospectResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method IntrospectSome not implemented")
}
func (*UnimplementedAuthorizationServer) Introspect(context.Context, *request.IntrospectReq) (*response.IntrospectResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Introspect not implemented")
}

func RegisterAuthorizationServer(s *grpc.Server, srv AuthorizationServer) {
	s.RegisterService(&_Authorization_serviceDesc, srv)
}

func _Authorization_IntrospectAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.IntrospectAllReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthorizationServer).IntrospectAll(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Authorization/IntrospectAll",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthorizationServer).IntrospectAll(ctx, req.(*request.IntrospectAllReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Authorization_IntrospectSome_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.IntrospectSomeReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthorizationServer).IntrospectSome(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Authorization/IntrospectSome",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthorizationServer).IntrospectSome(ctx, req.(*request.IntrospectSomeReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _Authorization_Introspect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(request.IntrospectReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AuthorizationServer).Introspect(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/chef.automate.api.iam.v2.Authorization/Introspect",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AuthorizationServer).Introspect(ctx, req.(*request.IntrospectReq))
	}
	return interceptor(ctx, in, info, handler)
}

var _Authorization_serviceDesc = grpc.ServiceDesc{
	ServiceName: "chef.automate.api.iam.v2.Authorization",
	HandlerType: (*AuthorizationServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "IntrospectAll",
			Handler:    _Authorization_IntrospectAll_Handler,
		},
		{
			MethodName: "IntrospectSome",
			Handler:    _Authorization_IntrospectSome_Handler,
		},
		{
			MethodName: "Introspect",
			Handler:    _Authorization_Introspect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "external/iam/v2/introspect.proto",
}
