// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v3.21.12
// source: yandex/cloud/searchapi/v2/wordstat_service.proto

package searchapi

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	WordstatService_GetTop_FullMethodName                 = "/yandex.cloud.searchapi.v2.WordstatService/GetTop"
	WordstatService_GetDynamics_FullMethodName            = "/yandex.cloud.searchapi.v2.WordstatService/GetDynamics"
	WordstatService_GetRegionsDistribution_FullMethodName = "/yandex.cloud.searchapi.v2.WordstatService/GetRegionsDistribution"
	WordstatService_GetRegionsTree_FullMethodName         = "/yandex.cloud.searchapi.v2.WordstatService/GetRegionsTree"
)

// WordstatServiceClient is the client API for WordstatService 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.
//
// Not implemented.
// A set of methods for viewing statistics on search queries to Yandex.
type WordstatServiceClient interface {
	// Not implemented.
	// The method returns the last 30 days data about popular queries containing the specified keyword and queries that are similar to the specified one.
	GetTop(ctx context.Context, in *GetTopRequest, opts ...grpc.CallOption) (*GetTopResponse, error)
	// Not implemented.
	// The method returns the frequency of queries over time for a given keyword.
	GetDynamics(ctx context.Context, in *GetDynamicsRequest, opts ...grpc.CallOption) (*GetDynamicsResponse, error)
	// Not implemented.
	// The method returns the distribution of the number of queries containing the given keyword globally by region for the last 30 days.
	GetRegionsDistribution(ctx context.Context, in *GetRegionsDistributionRequest, opts ...grpc.CallOption) (*GetRegionsDistributionResponse, error)
	// Not implemented.
	// The method method returns a tree of Wordstat-supported regions.
	GetRegionsTree(ctx context.Context, in *GetRegionsTreeRequest, opts ...grpc.CallOption) (*GetRegionsTreeResponse, error)
}

type wordstatServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewWordstatServiceClient(cc grpc.ClientConnInterface) WordstatServiceClient {
	return &wordstatServiceClient{cc}
}

func (c *wordstatServiceClient) GetTop(ctx context.Context, in *GetTopRequest, opts ...grpc.CallOption) (*GetTopResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetTopResponse)
	err := c.cc.Invoke(ctx, WordstatService_GetTop_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wordstatServiceClient) GetDynamics(ctx context.Context, in *GetDynamicsRequest, opts ...grpc.CallOption) (*GetDynamicsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetDynamicsResponse)
	err := c.cc.Invoke(ctx, WordstatService_GetDynamics_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wordstatServiceClient) GetRegionsDistribution(ctx context.Context, in *GetRegionsDistributionRequest, opts ...grpc.CallOption) (*GetRegionsDistributionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRegionsDistributionResponse)
	err := c.cc.Invoke(ctx, WordstatService_GetRegionsDistribution_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wordstatServiceClient) GetRegionsTree(ctx context.Context, in *GetRegionsTreeRequest, opts ...grpc.CallOption) (*GetRegionsTreeResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRegionsTreeResponse)
	err := c.cc.Invoke(ctx, WordstatService_GetRegionsTree_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// WordstatServiceServer is the server API for WordstatService service.
// All implementations should embed UnimplementedWordstatServiceServer
// for forward compatibility.
//
// Not implemented.
// A set of methods for viewing statistics on search queries to Yandex.
type WordstatServiceServer interface {
	// Not implemented.
	// The method returns the last 30 days data about popular queries containing the specified keyword and queries that are similar to the specified one.
	GetTop(context.Context, *GetTopRequest) (*GetTopResponse, error)
	// Not implemented.
	// The method returns the frequency of queries over time for a given keyword.
	GetDynamics(context.Context, *GetDynamicsRequest) (*GetDynamicsResponse, error)
	// Not implemented.
	// The method returns the distribution of the number of queries containing the given keyword globally by region for the last 30 days.
	GetRegionsDistribution(context.Context, *GetRegionsDistributionRequest) (*GetRegionsDistributionResponse, error)
	// Not implemented.
	// The method method returns a tree of Wordstat-supported regions.
	GetRegionsTree(context.Context, *GetRegionsTreeRequest) (*GetRegionsTreeResponse, error)
}

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

func (UnimplementedWordstatServiceServer) GetTop(context.Context, *GetTopRequest) (*GetTopResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTop not implemented")
}
func (UnimplementedWordstatServiceServer) GetDynamics(context.Context, *GetDynamicsRequest) (*GetDynamicsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDynamics not implemented")
}
func (UnimplementedWordstatServiceServer) GetRegionsDistribution(context.Context, *GetRegionsDistributionRequest) (*GetRegionsDistributionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRegionsDistribution not implemented")
}
func (UnimplementedWordstatServiceServer) GetRegionsTree(context.Context, *GetRegionsTreeRequest) (*GetRegionsTreeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRegionsTree not implemented")
}
func (UnimplementedWordstatServiceServer) testEmbeddedByValue() {}

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

func RegisterWordstatServiceServer(s grpc.ServiceRegistrar, srv WordstatServiceServer) {
	// If the following call pancis, it indicates UnimplementedWordstatServiceServer 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(&WordstatService_ServiceDesc, srv)
}

func _WordstatService_GetTop_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTopRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WordstatServiceServer).GetTop(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WordstatService_GetTop_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WordstatServiceServer).GetTop(ctx, req.(*GetTopRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WordstatService_GetDynamics_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDynamicsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WordstatServiceServer).GetDynamics(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WordstatService_GetDynamics_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WordstatServiceServer).GetDynamics(ctx, req.(*GetDynamicsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WordstatService_GetRegionsDistribution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRegionsDistributionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WordstatServiceServer).GetRegionsDistribution(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WordstatService_GetRegionsDistribution_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WordstatServiceServer).GetRegionsDistribution(ctx, req.(*GetRegionsDistributionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WordstatService_GetRegionsTree_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRegionsTreeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WordstatServiceServer).GetRegionsTree(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: WordstatService_GetRegionsTree_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WordstatServiceServer).GetRegionsTree(ctx, req.(*GetRegionsTreeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// WordstatService_ServiceDesc is the grpc.ServiceDesc for WordstatService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WordstatService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.searchapi.v2.WordstatService",
	HandlerType: (*WordstatServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetTop",
			Handler:    _WordstatService_GetTop_Handler,
		},
		{
			MethodName: "GetDynamics",
			Handler:    _WordstatService_GetDynamics_Handler,
		},
		{
			MethodName: "GetRegionsDistribution",
			Handler:    _WordstatService_GetRegionsDistribution_Handler,
		},
		{
			MethodName: "GetRegionsTree",
			Handler:    _WordstatService_GetRegionsTree_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/searchapi/v2/wordstat_service.proto",
}
