// 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/dns/v1/dns_firewall_service.proto

package dns

import (
	context "context"
	access "github.com/yandex-cloud/go-genproto/yandex/cloud/access"
	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 (
	DnsFirewallService_Get_FullMethodName                  = "/yandex.cloud.dns.v1.DnsFirewallService/Get"
	DnsFirewallService_List_FullMethodName                 = "/yandex.cloud.dns.v1.DnsFirewallService/List"
	DnsFirewallService_Create_FullMethodName               = "/yandex.cloud.dns.v1.DnsFirewallService/Create"
	DnsFirewallService_Update_FullMethodName               = "/yandex.cloud.dns.v1.DnsFirewallService/Update"
	DnsFirewallService_Move_FullMethodName                 = "/yandex.cloud.dns.v1.DnsFirewallService/Move"
	DnsFirewallService_Delete_FullMethodName               = "/yandex.cloud.dns.v1.DnsFirewallService/Delete"
	DnsFirewallService_ListOperations_FullMethodName       = "/yandex.cloud.dns.v1.DnsFirewallService/ListOperations"
	DnsFirewallService_ListAccessBindings_FullMethodName   = "/yandex.cloud.dns.v1.DnsFirewallService/ListAccessBindings"
	DnsFirewallService_SetAccessBindings_FullMethodName    = "/yandex.cloud.dns.v1.DnsFirewallService/SetAccessBindings"
	DnsFirewallService_UpdateAccessBindings_FullMethodName = "/yandex.cloud.dns.v1.DnsFirewallService/UpdateAccessBindings"
)

// DnsFirewallServiceClient is the client API for DnsFirewallService 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 DNS firewalls.
type DnsFirewallServiceClient interface {
	// Returns the specified DNS firewall.
	// To get the list of all available DNS firewalls, make a [List] request.
	Get(ctx context.Context, in *GetDnsFirewallRequest, opts ...grpc.CallOption) (*DnsFirewall, error)
	// Retrieves the list of DNS firewalls in the specified folder.
	List(ctx context.Context, in *ListDnsFirewallsRequest, opts ...grpc.CallOption) (*ListDnsFirewallsResponse, error)
	// Creates a DNS firewall in the specified folder.
	Create(ctx context.Context, in *CreateDnsFirewallRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates the specified DNS firewall.
	Update(ctx context.Context, in *UpdateDnsFirewallRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Moves the specified DNS firewall to another folder.
	Move(ctx context.Context, in *MoveDnsFirewallRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Deletes the specified DNS firewall.
	Delete(ctx context.Context, in *DeleteDnsFirewallRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Lists operations for the specified DNS firewall.
	ListOperations(ctx context.Context, in *ListDnsFirewallOperationsRequest, opts ...grpc.CallOption) (*ListDnsFirewallOperationsResponse, error)
	// Lists existing access bindings for the specified DNS firewall.
	ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the specified DNS firewall.
	SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
	// Updates access bindings for the specified DNS firewall.
	UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error)
}

type dnsFirewallServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDnsFirewallServiceClient(cc grpc.ClientConnInterface) DnsFirewallServiceClient {
	return &dnsFirewallServiceClient{cc}
}

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

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

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

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

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

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

func (c *dnsFirewallServiceClient) ListOperations(ctx context.Context, in *ListDnsFirewallOperationsRequest, opts ...grpc.CallOption) (*ListDnsFirewallOperationsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListDnsFirewallOperationsResponse)
	err := c.cc.Invoke(ctx, DnsFirewallService_ListOperations_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dnsFirewallServiceClient) ListAccessBindings(ctx context.Context, in *access.ListAccessBindingsRequest, opts ...grpc.CallOption) (*access.ListAccessBindingsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(access.ListAccessBindingsResponse)
	err := c.cc.Invoke(ctx, DnsFirewallService_ListAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dnsFirewallServiceClient) SetAccessBindings(ctx context.Context, in *access.SetAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, DnsFirewallService_SetAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dnsFirewallServiceClient) UpdateAccessBindings(ctx context.Context, in *access.UpdateAccessBindingsRequest, opts ...grpc.CallOption) (*operation.Operation, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(operation.Operation)
	err := c.cc.Invoke(ctx, DnsFirewallService_UpdateAccessBindings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DnsFirewallServiceServer is the server API for DnsFirewallService service.
// All implementations should embed UnimplementedDnsFirewallServiceServer
// for forward compatibility.
//
// A set of methods for managing DNS firewalls.
type DnsFirewallServiceServer interface {
	// Returns the specified DNS firewall.
	// To get the list of all available DNS firewalls, make a [List] request.
	Get(context.Context, *GetDnsFirewallRequest) (*DnsFirewall, error)
	// Retrieves the list of DNS firewalls in the specified folder.
	List(context.Context, *ListDnsFirewallsRequest) (*ListDnsFirewallsResponse, error)
	// Creates a DNS firewall in the specified folder.
	Create(context.Context, *CreateDnsFirewallRequest) (*operation.Operation, error)
	// Updates the specified DNS firewall.
	Update(context.Context, *UpdateDnsFirewallRequest) (*operation.Operation, error)
	// Moves the specified DNS firewall to another folder.
	Move(context.Context, *MoveDnsFirewallRequest) (*operation.Operation, error)
	// Deletes the specified DNS firewall.
	Delete(context.Context, *DeleteDnsFirewallRequest) (*operation.Operation, error)
	// Lists operations for the specified DNS firewall.
	ListOperations(context.Context, *ListDnsFirewallOperationsRequest) (*ListDnsFirewallOperationsResponse, error)
	// Lists existing access bindings for the specified DNS firewall.
	ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error)
	// Sets access bindings for the specified DNS firewall.
	SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error)
	// Updates access bindings for the specified DNS firewall.
	UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error)
}

// UnimplementedDnsFirewallServiceServer 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 UnimplementedDnsFirewallServiceServer struct{}

func (UnimplementedDnsFirewallServiceServer) Get(context.Context, *GetDnsFirewallRequest) (*DnsFirewall, error) {
	return nil, status.Error(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedDnsFirewallServiceServer) List(context.Context, *ListDnsFirewallsRequest) (*ListDnsFirewallsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedDnsFirewallServiceServer) Create(context.Context, *CreateDnsFirewallRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedDnsFirewallServiceServer) Update(context.Context, *UpdateDnsFirewallRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedDnsFirewallServiceServer) Move(context.Context, *MoveDnsFirewallRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Move not implemented")
}
func (UnimplementedDnsFirewallServiceServer) Delete(context.Context, *DeleteDnsFirewallRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedDnsFirewallServiceServer) ListOperations(context.Context, *ListDnsFirewallOperationsRequest) (*ListDnsFirewallOperationsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListOperations not implemented")
}
func (UnimplementedDnsFirewallServiceServer) ListAccessBindings(context.Context, *access.ListAccessBindingsRequest) (*access.ListAccessBindingsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListAccessBindings not implemented")
}
func (UnimplementedDnsFirewallServiceServer) SetAccessBindings(context.Context, *access.SetAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method SetAccessBindings not implemented")
}
func (UnimplementedDnsFirewallServiceServer) UpdateAccessBindings(context.Context, *access.UpdateAccessBindingsRequest) (*operation.Operation, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdateAccessBindings not implemented")
}
func (UnimplementedDnsFirewallServiceServer) testEmbeddedByValue() {}

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

func RegisterDnsFirewallServiceServer(s grpc.ServiceRegistrar, srv DnsFirewallServiceServer) {
	// If the following call panics, it indicates UnimplementedDnsFirewallServiceServer 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(&DnsFirewallService_ServiceDesc, srv)
}

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

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

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

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

func _DnsFirewallService_Move_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MoveDnsFirewallRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DnsFirewallServiceServer).Move(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DnsFirewallService_Move_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DnsFirewallServiceServer).Move(ctx, req.(*MoveDnsFirewallRequest))
	}
	return interceptor(ctx, in, info, handler)
}

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

func _DnsFirewallService_ListOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListDnsFirewallOperationsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DnsFirewallServiceServer).ListOperations(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DnsFirewallService_ListOperations_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DnsFirewallServiceServer).ListOperations(ctx, req.(*ListDnsFirewallOperationsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DnsFirewallService_ListAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.ListAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DnsFirewallServiceServer).ListAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DnsFirewallService_ListAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DnsFirewallServiceServer).ListAccessBindings(ctx, req.(*access.ListAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DnsFirewallService_SetAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.SetAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DnsFirewallServiceServer).SetAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DnsFirewallService_SetAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DnsFirewallServiceServer).SetAccessBindings(ctx, req.(*access.SetAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DnsFirewallService_UpdateAccessBindings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(access.UpdateAccessBindingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DnsFirewallServiceServer).UpdateAccessBindings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DnsFirewallService_UpdateAccessBindings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DnsFirewallServiceServer).UpdateAccessBindings(ctx, req.(*access.UpdateAccessBindingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// DnsFirewallService_ServiceDesc is the grpc.ServiceDesc for DnsFirewallService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DnsFirewallService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.dns.v1.DnsFirewallService",
	HandlerType: (*DnsFirewallServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _DnsFirewallService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _DnsFirewallService_List_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _DnsFirewallService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _DnsFirewallService_Update_Handler,
		},
		{
			MethodName: "Move",
			Handler:    _DnsFirewallService_Move_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _DnsFirewallService_Delete_Handler,
		},
		{
			MethodName: "ListOperations",
			Handler:    _DnsFirewallService_ListOperations_Handler,
		},
		{
			MethodName: "ListAccessBindings",
			Handler:    _DnsFirewallService_ListAccessBindings_Handler,
		},
		{
			MethodName: "SetAccessBindings",
			Handler:    _DnsFirewallService_SetAccessBindings_Handler,
		},
		{
			MethodName: "UpdateAccessBindings",
			Handler:    _DnsFirewallService_UpdateAccessBindings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/dns/v1/dns_firewall_service.proto",
}
