// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.21.12
// source: yandex/cloud/smartwebsecurity/v1/waf/waf_profile_service.proto

package smartwebsecurity

import (
	context "context"
	operation "github.com/yandex-cloud/go-genproto/yandex/cloud/operation"
	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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	WafProfileService_Get_FullMethodName    = "/yandex.cloud.smartwebsecurity.v1.waf.WafProfileService/Get"
	WafProfileService_List_FullMethodName   = "/yandex.cloud.smartwebsecurity.v1.waf.WafProfileService/List"
	WafProfileService_Create_FullMethodName = "/yandex.cloud.smartwebsecurity.v1.waf.WafProfileService/Create"
	WafProfileService_Update_FullMethodName = "/yandex.cloud.smartwebsecurity.v1.waf.WafProfileService/Update"
	WafProfileService_Delete_FullMethodName = "/yandex.cloud.smartwebsecurity.v1.waf.WafProfileService/Delete"
)

// WafProfileServiceClient is the client API for WafProfileService 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.
//
// A set of methods for managing WafProfile resources.
type WafProfileServiceClient interface {
	// Returns the specified WafProfile resource.
	Get(ctx context.Context, in *GetWafProfileRequest, opts ...grpc.CallOption) (*WafProfile, error)
	// Retrieves the list of WafProfile resources in the specified folder.
	List(ctx context.Context, in *ListWafProfilesRequest, opts ...grpc.CallOption) (*ListWafProfilesResponse, error)
	// Creates a WAF profile in the specified folder using the data specified in the request.
	Create(ctx context.Context, in *CreateWafProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified WAF profile.
	Update(ctx context.Context, in *UpdateWafProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified WAF profile.
	Delete(ctx context.Context, in *DeleteWafProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type wafProfileServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewWafProfileServiceClient(cc grpc.ClientConnInterface) WafProfileServiceClient {
	return &wafProfileServiceClient{cc}
}

func (c *wafProfileServiceClient) Get(ctx context.Context, in *GetWafProfileRequest, opts ...grpc.CallOption) (*WafProfile, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(WafProfile)
	err := c.cc.Invoke(ctx, WafProfileService_Get_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wafProfileServiceClient) List(ctx context.Context, in *ListWafProfilesRequest, opts ...grpc.CallOption) (*ListWafProfilesResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListWafProfilesResponse)
	err := c.cc.Invoke(ctx, WafProfileService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wafProfileServiceClient) Create(ctx context.Context, in *CreateWafProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, WafProfileService_Create_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wafProfileServiceClient) Update(ctx context.Context, in *UpdateWafProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, WafProfileService_Update_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wafProfileServiceClient) Delete(ctx context.Context, in *DeleteWafProfileRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, WafProfileService_Delete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// WafProfileServiceServer is the server API for WafProfileService service.
// All implementations should embed UnimplementedWafProfileServiceServer
// for forward compatibility.
//
// A set of methods for managing WafProfile resources.
type WafProfileServiceServer interface {
	// Returns the specified WafProfile resource.
	Get(context.Context, *GetWafProfileRequest) (*WafProfile, error)
	// Retrieves the list of WafProfile resources in the specified folder.
	List(context.Context, *ListWafProfilesRequest) (*ListWafProfilesResponse, error)
	// Creates a WAF profile in the specified folder using the data specified in the request.
	Create(context.Context, *CreateWafProfileRequest) (*operation.Operation, error)
	// Updates the specified WAF profile.
	Update(context.Context, *UpdateWafProfileRequest) (*operation.Operation, error)
	// Deletes the specified WAF profile.
	Delete(context.Context, *DeleteWafProfileRequest) (*operation.Operation, error)
}

// UnimplementedWafProfileServiceServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedWafProfileServiceServer struct{}

func (UnimplementedWafProfileServiceServer) Get(context.Context, *GetWafProfileRequest) (*WafProfile, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedWafProfileServiceServer) List(context.Context, *ListWafProfilesRequest) (*ListWafProfilesResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedWafProfileServiceServer) Create(context.Context, *CreateWafProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedWafProfileServiceServer) Update(context.Context, *UpdateWafProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedWafProfileServiceServer) Delete(context.Context, *DeleteWafProfileRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedWafProfileServiceServer) testEmbeddedByValue() {}

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

func RegisterWafProfileServiceServer(s grpc.ServiceRegistrar, srv WafProfileServiceServer) {
	// If the following call panics, it indicates UnimplementedWafProfileServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&WafProfileService_ServiceDesc, srv)
}

func _WafProfileService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetWafProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WafProfileServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WafProfileService_Get_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WafProfileServiceServer).Get(ctx, req.(*GetWafProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WafProfileService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListWafProfilesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WafProfileServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WafProfileService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WafProfileServiceServer).List(ctx, req.(*ListWafProfilesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WafProfileService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateWafProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WafProfileServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WafProfileService_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WafProfileServiceServer).Create(ctx, req.(*CreateWafProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WafProfileService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateWafProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WafProfileServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WafProfileService_Update_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WafProfileServiceServer).Update(ctx, req.(*UpdateWafProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WafProfileService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteWafProfileRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WafProfileServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WafProfileService_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WafProfileServiceServer).Delete(ctx, req.(*DeleteWafProfileRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// WafProfileService_ServiceDesc is the grpc.ServiceDesc for WafProfileService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WafProfileService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.smartwebsecurity.v1.waf.WafProfileService",
	HandlerType: (*WafProfileServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _WafProfileService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _WafProfileService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _WafProfileService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _WafProfileService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _WafProfileService_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/smartwebsecurity/v1/waf/waf_profile_service.proto",
}
