// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc             (unknown)
// source: global/nextgen/v1/log_redaction_policy.proto

package nextgenv1

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	LogRedactionPolicyService_GetLogRedactionPolicy_FullMethodName    = "/global.nextgen.v1.LogRedactionPolicyService/GetLogRedactionPolicy"
	LogRedactionPolicyService_UpdateLogRedactionPolicy_FullMethodName = "/global.nextgen.v1.LogRedactionPolicyService/UpdateLogRedactionPolicy"
)

// LogRedactionPolicyServiceClient is the client API for LogRedactionPolicyService 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 LogRedactionPolicyServiceClient interface {
	GetLogRedactionPolicy(ctx context.Context, in *GetLogRedactionPolicyRequest, opts ...grpc.CallOption) (*LogRedactionPolicy, error)
	UpdateLogRedactionPolicy(ctx context.Context, in *UpdateLogRedactionPolicyRequest, opts ...grpc.CallOption) (*LogRedactionPolicy, error)
}

type logRedactionPolicyServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewLogRedactionPolicyServiceClient(cc grpc.ClientConnInterface) LogRedactionPolicyServiceClient {
	return &logRedactionPolicyServiceClient{cc}
}

func (c *logRedactionPolicyServiceClient) GetLogRedactionPolicy(ctx context.Context, in *GetLogRedactionPolicyRequest, opts ...grpc.CallOption) (*LogRedactionPolicy, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LogRedactionPolicy)
	err := c.cc.Invoke(ctx, LogRedactionPolicyService_GetLogRedactionPolicy_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *logRedactionPolicyServiceClient) UpdateLogRedactionPolicy(ctx context.Context, in *UpdateLogRedactionPolicyRequest, opts ...grpc.CallOption) (*LogRedactionPolicy, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LogRedactionPolicy)
	err := c.cc.Invoke(ctx, LogRedactionPolicyService_UpdateLogRedactionPolicy_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// LogRedactionPolicyServiceServer is the server API for LogRedactionPolicyService service.
// All implementations should embed UnimplementedLogRedactionPolicyServiceServer
// for forward compatibility
type LogRedactionPolicyServiceServer interface {
	GetLogRedactionPolicy(context.Context, *GetLogRedactionPolicyRequest) (*LogRedactionPolicy, error)
	UpdateLogRedactionPolicy(context.Context, *UpdateLogRedactionPolicyRequest) (*LogRedactionPolicy, error)
}

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

func (UnimplementedLogRedactionPolicyServiceServer) GetLogRedactionPolicy(context.Context, *GetLogRedactionPolicyRequest) (*LogRedactionPolicy, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetLogRedactionPolicy not implemented")
}
func (UnimplementedLogRedactionPolicyServiceServer) UpdateLogRedactionPolicy(context.Context, *UpdateLogRedactionPolicyRequest) (*LogRedactionPolicy, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateLogRedactionPolicy not implemented")
}

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

func RegisterLogRedactionPolicyServiceServer(s grpc.ServiceRegistrar, srv LogRedactionPolicyServiceServer) {
	s.RegisterService(&LogRedactionPolicyService_ServiceDesc, srv)
}

func _LogRedactionPolicyService_GetLogRedactionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetLogRedactionPolicyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LogRedactionPolicyServiceServer).GetLogRedactionPolicy(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: LogRedactionPolicyService_GetLogRedactionPolicy_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LogRedactionPolicyServiceServer).GetLogRedactionPolicy(ctx, req.(*GetLogRedactionPolicyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _LogRedactionPolicyService_UpdateLogRedactionPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateLogRedactionPolicyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(LogRedactionPolicyServiceServer).UpdateLogRedactionPolicy(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: LogRedactionPolicyService_UpdateLogRedactionPolicy_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(LogRedactionPolicyServiceServer).UpdateLogRedactionPolicy(ctx, req.(*UpdateLogRedactionPolicyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// LogRedactionPolicyService_ServiceDesc is the grpc.ServiceDesc for LogRedactionPolicyService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var LogRedactionPolicyService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "global.nextgen.v1.LogRedactionPolicyService",
	HandlerType: (*LogRedactionPolicyServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetLogRedactionPolicy",
			Handler:    _LogRedactionPolicyService_GetLogRedactionPolicy_Handler,
		},
		{
			MethodName: "UpdateLogRedactionPolicy",
			Handler:    _LogRedactionPolicyService_UpdateLogRedactionPolicy_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "global/nextgen/v1/log_redaction_policy.proto",
}
