//
//Сервис управления компаниями

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.23.1
// source: keyapis/vc/v1/keyapis_vc_company_v1.proto

package keyapis_vc_v1

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	CompanyService_PostCompanyImpersonation_FullMethodName = "/keyapis.vc.v1.CompanyService/PostCompanyImpersonation"
)

// CompanyServiceClient is the client API for CompanyService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type CompanyServiceClient interface {
	// Метод генерации имперсонационной ссылки для владельца компании.
	// Возвращает одноразовую ссылку для имперсонации в сервисе inkey-front.
	// Сценарий работы метода: https://confluence.rt.ru/pages/viewpage.action?pageId=1013775798.
	// Метод доступен для: service, bti, admin
	PostCompanyImpersonation(ctx context.Context, in *PostCompanyImpersonationRequest, opts ...grpc.CallOption) (*PostCompanyImpersonationResponse, error)
}

type companyServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCompanyServiceClient(cc grpc.ClientConnInterface) CompanyServiceClient {
	return &companyServiceClient{cc}
}

func (c *companyServiceClient) PostCompanyImpersonation(ctx context.Context, in *PostCompanyImpersonationRequest, opts ...grpc.CallOption) (*PostCompanyImpersonationResponse, error) {
	out := new(PostCompanyImpersonationResponse)
	err := c.cc.Invoke(ctx, CompanyService_PostCompanyImpersonation_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CompanyServiceServer is the server API for CompanyService service.
// All implementations should embed UnimplementedCompanyServiceServer
// for forward compatibility
type CompanyServiceServer interface {
	// Метод генерации имперсонационной ссылки для владельца компании.
	// Возвращает одноразовую ссылку для имперсонации в сервисе inkey-front.
	// Сценарий работы метода: https://confluence.rt.ru/pages/viewpage.action?pageId=1013775798.
	// Метод доступен для: service, bti, admin
	PostCompanyImpersonation(context.Context, *PostCompanyImpersonationRequest) (*PostCompanyImpersonationResponse, error)
}

// UnimplementedCompanyServiceServer should be embedded to have forward compatible implementations.
type UnimplementedCompanyServiceServer struct {
}

func (UnimplementedCompanyServiceServer) PostCompanyImpersonation(context.Context, *PostCompanyImpersonationRequest) (*PostCompanyImpersonationResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method PostCompanyImpersonation not implemented")
}

// UnsafeCompanyServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CompanyServiceServer will
// result in compilation errors.
type UnsafeCompanyServiceServer interface {
	mustEmbedUnimplementedCompanyServiceServer()
}

func RegisterCompanyServiceServer(s grpc.ServiceRegistrar, srv CompanyServiceServer) {
	s.RegisterService(&CompanyService_ServiceDesc, srv)
}

func _CompanyService_PostCompanyImpersonation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PostCompanyImpersonationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CompanyServiceServer).PostCompanyImpersonation(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CompanyService_PostCompanyImpersonation_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CompanyServiceServer).PostCompanyImpersonation(ctx, req.(*PostCompanyImpersonationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CompanyService_ServiceDesc is the grpc.ServiceDesc for CompanyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CompanyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "keyapis.vc.v1.CompanyService",
	HandlerType: (*CompanyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PostCompanyImpersonation",
			Handler:    _CompanyService_PostCompanyImpersonation_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "keyapis/vc/v1/keyapis_vc_company_v1.proto",
}
