// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.32.0
// source: dns.proto

package backendpb

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

// 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 (
	DNSService_GetDNSProfiles_FullMethodName         = "/DNSService/getDNSProfiles"
	DNSService_SaveDevicesBillingStat_FullMethodName = "/DNSService/saveDevicesBillingStat"
	DNSService_CreateDeviceByHumanId_FullMethodName  = "/DNSService/createDeviceByHumanId"
)

// DNSServiceClient is the client API for DNSService 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 DNSServiceClient interface {
	// Gets DNS profiles.
	//
	// Field "sync_time" in DNSProfilesRequest - pass to return the latest updates after this time moment.
	//
	// The trailers headers will include a "sync_time", given in milliseconds,
	// that should be used for subsequent incremental DNS profile synchronization requests.
	//
	// This method may return the following errors:
	// - RateLimitedError: If too many "full sync" concurrent requests are made.
	// - AuthenticationFailedError: If the authentication failed.
	GetDNSProfiles(ctx context.Context, in *DNSProfilesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DNSProfile], error)
	// Stores devices activity.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	SaveDevicesBillingStat(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[DeviceBillingStat, emptypb.Empty], error)
	// Create device by "human_id".
	//
	// This method may return the following errors:
	// - RateLimitedError: If the request was made too frequently and the client must wait before retrying.
	// - DeviceQuotaExceededError: If the client has exceeded its quota for creating devices.
	// - BadRequestError: If the request is invalid: DNS server does not exist, creation of auto-devices is disabled or human_id validation failed.
	// - AuthenticationFailedError: If the authentication failed.
	CreateDeviceByHumanId(ctx context.Context, in *CreateDeviceRequest, opts ...grpc.CallOption) (*CreateDeviceResponse, error)
}

type dNSServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDNSServiceClient(cc grpc.ClientConnInterface) DNSServiceClient {
	return &dNSServiceClient{cc}
}

func (c *dNSServiceClient) GetDNSProfiles(ctx context.Context, in *DNSProfilesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[DNSProfile], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &DNSService_ServiceDesc.Streams[0], DNSService_GetDNSProfiles_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[DNSProfilesRequest, DNSProfile]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DNSService_GetDNSProfilesClient = grpc.ServerStreamingClient[DNSProfile]

func (c *dNSServiceClient) SaveDevicesBillingStat(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[DeviceBillingStat, emptypb.Empty], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &DNSService_ServiceDesc.Streams[1], DNSService_SaveDevicesBillingStat_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[DeviceBillingStat, emptypb.Empty]{ClientStream: stream}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DNSService_SaveDevicesBillingStatClient = grpc.ClientStreamingClient[DeviceBillingStat, emptypb.Empty]

func (c *dNSServiceClient) CreateDeviceByHumanId(ctx context.Context, in *CreateDeviceRequest, opts ...grpc.CallOption) (*CreateDeviceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateDeviceResponse)
	err := c.cc.Invoke(ctx, DNSService_CreateDeviceByHumanId_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DNSServiceServer is the server API for DNSService service.
// All implementations must embed UnimplementedDNSServiceServer
// for forward compatibility.
type DNSServiceServer interface {
	// Gets DNS profiles.
	//
	// Field "sync_time" in DNSProfilesRequest - pass to return the latest updates after this time moment.
	//
	// The trailers headers will include a "sync_time", given in milliseconds,
	// that should be used for subsequent incremental DNS profile synchronization requests.
	//
	// This method may return the following errors:
	// - RateLimitedError: If too many "full sync" concurrent requests are made.
	// - AuthenticationFailedError: If the authentication failed.
	GetDNSProfiles(*DNSProfilesRequest, grpc.ServerStreamingServer[DNSProfile]) error
	// Stores devices activity.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	SaveDevicesBillingStat(grpc.ClientStreamingServer[DeviceBillingStat, emptypb.Empty]) error
	// Create device by "human_id".
	//
	// This method may return the following errors:
	// - RateLimitedError: If the request was made too frequently and the client must wait before retrying.
	// - DeviceQuotaExceededError: If the client has exceeded its quota for creating devices.
	// - BadRequestError: If the request is invalid: DNS server does not exist, creation of auto-devices is disabled or human_id validation failed.
	// - AuthenticationFailedError: If the authentication failed.
	CreateDeviceByHumanId(context.Context, *CreateDeviceRequest) (*CreateDeviceResponse, error)
	mustEmbedUnimplementedDNSServiceServer()
}

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

func (UnimplementedDNSServiceServer) GetDNSProfiles(*DNSProfilesRequest, grpc.ServerStreamingServer[DNSProfile]) error {
	return status.Errorf(codes.Unimplemented, "method GetDNSProfiles not implemented")
}
func (UnimplementedDNSServiceServer) SaveDevicesBillingStat(grpc.ClientStreamingServer[DeviceBillingStat, emptypb.Empty]) error {
	return status.Errorf(codes.Unimplemented, "method SaveDevicesBillingStat not implemented")
}
func (UnimplementedDNSServiceServer) CreateDeviceByHumanId(context.Context, *CreateDeviceRequest) (*CreateDeviceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateDeviceByHumanId not implemented")
}
func (UnimplementedDNSServiceServer) mustEmbedUnimplementedDNSServiceServer() {}
func (UnimplementedDNSServiceServer) testEmbeddedByValue()                    {}

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

func RegisterDNSServiceServer(s grpc.ServiceRegistrar, srv DNSServiceServer) {
	// If the following call pancis, it indicates UnimplementedDNSServiceServer 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(&DNSService_ServiceDesc, srv)
}

func _DNSService_GetDNSProfiles_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(DNSProfilesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(DNSServiceServer).GetDNSProfiles(m, &grpc.GenericServerStream[DNSProfilesRequest, DNSProfile]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DNSService_GetDNSProfilesServer = grpc.ServerStreamingServer[DNSProfile]

func _DNSService_SaveDevicesBillingStat_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(DNSServiceServer).SaveDevicesBillingStat(&grpc.GenericServerStream[DeviceBillingStat, emptypb.Empty]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type DNSService_SaveDevicesBillingStatServer = grpc.ClientStreamingServer[DeviceBillingStat, emptypb.Empty]

func _DNSService_CreateDeviceByHumanId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateDeviceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DNSServiceServer).CreateDeviceByHumanId(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DNSService_CreateDeviceByHumanId_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DNSServiceServer).CreateDeviceByHumanId(ctx, req.(*CreateDeviceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// DNSService_ServiceDesc is the grpc.ServiceDesc for DNSService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DNSService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "DNSService",
	HandlerType: (*DNSServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "createDeviceByHumanId",
			Handler:    _DNSService_CreateDeviceByHumanId_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "getDNSProfiles",
			Handler:       _DNSService_GetDNSProfiles_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "saveDevicesBillingStat",
			Handler:       _DNSService_SaveDevicesBillingStat_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "dns.proto",
}

const (
	RateLimitService_GetRateLimitSettings_FullMethodName    = "/RateLimitService/getRateLimitSettings"
	RateLimitService_GetGlobalAccessSettings_FullMethodName = "/RateLimitService/getGlobalAccessSettings"
)

// RateLimitServiceClient is the client API for RateLimitService 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 RateLimitServiceClient interface {
	// Gets rate limit settings.
	GetRateLimitSettings(ctx context.Context, in *RateLimitSettingsRequest, opts ...grpc.CallOption) (*RateLimitSettingsResponse, error)
	// Gets global access settings.
	GetGlobalAccessSettings(ctx context.Context, in *GlobalAccessSettingsRequest, opts ...grpc.CallOption) (*GlobalAccessSettingsResponse, error)
}

type rateLimitServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient {
	return &rateLimitServiceClient{cc}
}

func (c *rateLimitServiceClient) GetRateLimitSettings(ctx context.Context, in *RateLimitSettingsRequest, opts ...grpc.CallOption) (*RateLimitSettingsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RateLimitSettingsResponse)
	err := c.cc.Invoke(ctx, RateLimitService_GetRateLimitSettings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *rateLimitServiceClient) GetGlobalAccessSettings(ctx context.Context, in *GlobalAccessSettingsRequest, opts ...grpc.CallOption) (*GlobalAccessSettingsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GlobalAccessSettingsResponse)
	err := c.cc.Invoke(ctx, RateLimitService_GetGlobalAccessSettings_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RateLimitServiceServer is the server API for RateLimitService service.
// All implementations must embed UnimplementedRateLimitServiceServer
// for forward compatibility.
type RateLimitServiceServer interface {
	// Gets rate limit settings.
	GetRateLimitSettings(context.Context, *RateLimitSettingsRequest) (*RateLimitSettingsResponse, error)
	// Gets global access settings.
	GetGlobalAccessSettings(context.Context, *GlobalAccessSettingsRequest) (*GlobalAccessSettingsResponse, error)
	mustEmbedUnimplementedRateLimitServiceServer()
}

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

func (UnimplementedRateLimitServiceServer) GetRateLimitSettings(context.Context, *RateLimitSettingsRequest) (*RateLimitSettingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRateLimitSettings not implemented")
}
func (UnimplementedRateLimitServiceServer) GetGlobalAccessSettings(context.Context, *GlobalAccessSettingsRequest) (*GlobalAccessSettingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetGlobalAccessSettings not implemented")
}
func (UnimplementedRateLimitServiceServer) mustEmbedUnimplementedRateLimitServiceServer() {}
func (UnimplementedRateLimitServiceServer) testEmbeddedByValue()                          {}

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

func RegisterRateLimitServiceServer(s grpc.ServiceRegistrar, srv RateLimitServiceServer) {
	// If the following call pancis, it indicates UnimplementedRateLimitServiceServer 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(&RateLimitService_ServiceDesc, srv)
}

func _RateLimitService_GetRateLimitSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RateLimitSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RateLimitServiceServer).GetRateLimitSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RateLimitService_GetRateLimitSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RateLimitServiceServer).GetRateLimitSettings(ctx, req.(*RateLimitSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RateLimitService_GetGlobalAccessSettings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GlobalAccessSettingsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RateLimitServiceServer).GetGlobalAccessSettings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RateLimitService_GetGlobalAccessSettings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RateLimitServiceServer).GetGlobalAccessSettings(ctx, req.(*GlobalAccessSettingsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RateLimitService_ServiceDesc is the grpc.ServiceDesc for RateLimitService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RateLimitService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "RateLimitService",
	HandlerType: (*RateLimitServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "getRateLimitSettings",
			Handler:    _RateLimitService_GetRateLimitSettings_Handler,
		},
		{
			MethodName: "getGlobalAccessSettings",
			Handler:    _RateLimitService_GetGlobalAccessSettings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dns.proto",
}

const (
	RemoteKVService_Get_FullMethodName = "/RemoteKVService/get"
	RemoteKVService_Set_FullMethodName = "/RemoteKVService/set"
)

// RemoteKVServiceClient is the client API for RemoteKVService 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 RemoteKVServiceClient interface {
	// *
	// Get the value for the specified key.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	Get(ctx context.Context, in *RemoteKVGetRequest, opts ...grpc.CallOption) (*RemoteKVGetResponse, error)
	// *
	// Set the value for the specified key.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	// - BadRequestError: If the request is invalid: value size exceeds the 512kb.
	Set(ctx context.Context, in *RemoteKVSetRequest, opts ...grpc.CallOption) (*RemoteKVSetResponse, error)
}

type remoteKVServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRemoteKVServiceClient(cc grpc.ClientConnInterface) RemoteKVServiceClient {
	return &remoteKVServiceClient{cc}
}

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

func (c *remoteKVServiceClient) Set(ctx context.Context, in *RemoteKVSetRequest, opts ...grpc.CallOption) (*RemoteKVSetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RemoteKVSetResponse)
	err := c.cc.Invoke(ctx, RemoteKVService_Set_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RemoteKVServiceServer is the server API for RemoteKVService service.
// All implementations must embed UnimplementedRemoteKVServiceServer
// for forward compatibility.
type RemoteKVServiceServer interface {
	// *
	// Get the value for the specified key.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	Get(context.Context, *RemoteKVGetRequest) (*RemoteKVGetResponse, error)
	// *
	// Set the value for the specified key.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	// - BadRequestError: If the request is invalid: value size exceeds the 512kb.
	Set(context.Context, *RemoteKVSetRequest) (*RemoteKVSetResponse, error)
	mustEmbedUnimplementedRemoteKVServiceServer()
}

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

func (UnimplementedRemoteKVServiceServer) Get(context.Context, *RemoteKVGetRequest) (*RemoteKVGetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedRemoteKVServiceServer) Set(context.Context, *RemoteKVSetRequest) (*RemoteKVSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Set not implemented")
}
func (UnimplementedRemoteKVServiceServer) mustEmbedUnimplementedRemoteKVServiceServer() {}
func (UnimplementedRemoteKVServiceServer) testEmbeddedByValue()                         {}

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

func RegisterRemoteKVServiceServer(s grpc.ServiceRegistrar, srv RemoteKVServiceServer) {
	// If the following call pancis, it indicates UnimplementedRemoteKVServiceServer 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(&RemoteKVService_ServiceDesc, srv)
}

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

func _RemoteKVService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoteKVSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RemoteKVServiceServer).Set(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RemoteKVService_Set_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RemoteKVServiceServer).Set(ctx, req.(*RemoteKVSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RemoteKVService_ServiceDesc is the grpc.ServiceDesc for RemoteKVService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RemoteKVService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "RemoteKVService",
	HandlerType: (*RemoteKVServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "get",
			Handler:    _RemoteKVService_Get_Handler,
		},
		{
			MethodName: "set",
			Handler:    _RemoteKVService_Set_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dns.proto",
}

const (
	CustomDomainService_GetCustomDomainCertificate_FullMethodName = "/CustomDomainService/getCustomDomainCertificate"
)

// CustomDomainServiceClient is the client API for CustomDomainService 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 CustomDomainServiceClient interface {
	// Get certificate for custom domain.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	// - BadRequestError: If the request is invalid: cert_name is empty or no certificate found.
	// - NotFoundError: If the certificate was not found.
	// - RateLimitedError: If the request was made too frequently and the client must wait before retrying.
	GetCustomDomainCertificate(ctx context.Context, in *CustomDomainCertificateRequest, opts ...grpc.CallOption) (*CustomDomainCertificateResponse, error)
}

type customDomainServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCustomDomainServiceClient(cc grpc.ClientConnInterface) CustomDomainServiceClient {
	return &customDomainServiceClient{cc}
}

func (c *customDomainServiceClient) GetCustomDomainCertificate(ctx context.Context, in *CustomDomainCertificateRequest, opts ...grpc.CallOption) (*CustomDomainCertificateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CustomDomainCertificateResponse)
	err := c.cc.Invoke(ctx, CustomDomainService_GetCustomDomainCertificate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CustomDomainServiceServer is the server API for CustomDomainService service.
// All implementations must embed UnimplementedCustomDomainServiceServer
// for forward compatibility.
type CustomDomainServiceServer interface {
	// Get certificate for custom domain.
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	// - BadRequestError: If the request is invalid: cert_name is empty or no certificate found.
	// - NotFoundError: If the certificate was not found.
	// - RateLimitedError: If the request was made too frequently and the client must wait before retrying.
	GetCustomDomainCertificate(context.Context, *CustomDomainCertificateRequest) (*CustomDomainCertificateResponse, error)
	mustEmbedUnimplementedCustomDomainServiceServer()
}

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

func (UnimplementedCustomDomainServiceServer) GetCustomDomainCertificate(context.Context, *CustomDomainCertificateRequest) (*CustomDomainCertificateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCustomDomainCertificate not implemented")
}
func (UnimplementedCustomDomainServiceServer) mustEmbedUnimplementedCustomDomainServiceServer() {}
func (UnimplementedCustomDomainServiceServer) testEmbeddedByValue()                             {}

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

func RegisterCustomDomainServiceServer(s grpc.ServiceRegistrar, srv CustomDomainServiceServer) {
	// If the following call pancis, it indicates UnimplementedCustomDomainServiceServer 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(&CustomDomainService_ServiceDesc, srv)
}

func _CustomDomainService_GetCustomDomainCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CustomDomainCertificateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CustomDomainServiceServer).GetCustomDomainCertificate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: CustomDomainService_GetCustomDomainCertificate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CustomDomainServiceServer).GetCustomDomainCertificate(ctx, req.(*CustomDomainCertificateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CustomDomainService_ServiceDesc is the grpc.ServiceDesc for CustomDomainService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CustomDomainService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "CustomDomainService",
	HandlerType: (*CustomDomainServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "getCustomDomainCertificate",
			Handler:    _CustomDomainService_GetCustomDomainCertificate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dns.proto",
}

const (
	SessionTicketService_GetSessionTickets_FullMethodName = "/SessionTicketService/getSessionTickets"
)

// SessionTicketServiceClient is the client API for SessionTicketService 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 SessionTicketServiceClient interface {
	// Gets session ticket for the current date
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	GetSessionTickets(ctx context.Context, in *SessionTicketRequest, opts ...grpc.CallOption) (*SessionTicketResponse, error)
}

type sessionTicketServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSessionTicketServiceClient(cc grpc.ClientConnInterface) SessionTicketServiceClient {
	return &sessionTicketServiceClient{cc}
}

func (c *sessionTicketServiceClient) GetSessionTickets(ctx context.Context, in *SessionTicketRequest, opts ...grpc.CallOption) (*SessionTicketResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SessionTicketResponse)
	err := c.cc.Invoke(ctx, SessionTicketService_GetSessionTickets_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SessionTicketServiceServer is the server API for SessionTicketService service.
// All implementations must embed UnimplementedSessionTicketServiceServer
// for forward compatibility.
type SessionTicketServiceServer interface {
	// Gets session ticket for the current date
	//
	// This method may return the following errors:
	// - AuthenticationFailedError: If the authentication failed.
	GetSessionTickets(context.Context, *SessionTicketRequest) (*SessionTicketResponse, error)
	mustEmbedUnimplementedSessionTicketServiceServer()
}

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

func (UnimplementedSessionTicketServiceServer) GetSessionTickets(context.Context, *SessionTicketRequest) (*SessionTicketResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSessionTickets not implemented")
}
func (UnimplementedSessionTicketServiceServer) mustEmbedUnimplementedSessionTicketServiceServer() {}
func (UnimplementedSessionTicketServiceServer) testEmbeddedByValue()                              {}

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

func RegisterSessionTicketServiceServer(s grpc.ServiceRegistrar, srv SessionTicketServiceServer) {
	// If the following call pancis, it indicates UnimplementedSessionTicketServiceServer 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(&SessionTicketService_ServiceDesc, srv)
}

func _SessionTicketService_GetSessionTickets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SessionTicketRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SessionTicketServiceServer).GetSessionTickets(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SessionTicketService_GetSessionTickets_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SessionTicketServiceServer).GetSessionTickets(ctx, req.(*SessionTicketRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SessionTicketService_ServiceDesc is the grpc.ServiceDesc for SessionTicketService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SessionTicketService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "SessionTicketService",
	HandlerType: (*SessionTicketServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "getSessionTickets",
			Handler:    _SessionTicketService_GetSessionTickets_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "dns.proto",
}
