// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: validatorstate/validator_state.proto

package validatorstate

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 (
	ValidatorState_GetMinimumHeight_FullMethodName       = "/validatorstate.ValidatorState/GetMinimumHeight"
	ValidatorState_GetCurrentHeight_FullMethodName       = "/validatorstate.ValidatorState/GetCurrentHeight"
	ValidatorState_GetSubnetID_FullMethodName            = "/validatorstate.ValidatorState/GetSubnetID"
	ValidatorState_GetWarpValidatorSets_FullMethodName   = "/validatorstate.ValidatorState/GetWarpValidatorSets"
	ValidatorState_GetWarpValidatorSet_FullMethodName    = "/validatorstate.ValidatorState/GetWarpValidatorSet"
	ValidatorState_GetValidatorSet_FullMethodName        = "/validatorstate.ValidatorState/GetValidatorSet"
	ValidatorState_GetCurrentValidatorSet_FullMethodName = "/validatorstate.ValidatorState/GetCurrentValidatorSet"
)

// ValidatorStateClient is the client API for ValidatorState 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 ValidatorStateClient interface {
	// GetMinimumHeight returns the minimum height of the blocks in the optimal
	// proposal window.
	GetMinimumHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMinimumHeightResponse, error)
	// GetCurrentHeight returns the current height of the P-chain.
	GetCurrentHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetCurrentHeightResponse, error)
	// GetSubnetID returns the subnetID of the provided chain.
	GetSubnetID(ctx context.Context, in *GetSubnetIDRequest, opts ...grpc.CallOption) (*GetSubnetIDResponse, error)
	// GetWarpValidatorSets returns the canonical warp validator set for all
	// subnets at the requested P-chain height. If a subnet doesn't have a valid
	// canonical warp validator set, it is omitted from the response.
	GetWarpValidatorSets(ctx context.Context, in *GetWarpValidatorSetsRequest, opts ...grpc.CallOption) (*GetWarpValidatorSetsResponse, error)
	// GetWarpValidatorSet returns the canonical warp validator set for the
	// provided subnet at the requested P-chain height. If the subnet doesn't have
	// a valid canonical warp validator set, either the returned set will be empty
	// or an error may occur.
	GetWarpValidatorSet(ctx context.Context, in *GetWarpValidatorSetRequest, opts ...grpc.CallOption) (*GetWarpValidatorSetResponse, error)
	// GetValidatorSet returns the weights of the nodeIDs for the provided
	// subnet at the requested P-chain height.
	GetValidatorSet(ctx context.Context, in *GetValidatorSetRequest, opts ...grpc.CallOption) (*GetValidatorSetResponse, error)
	// GetCurrentValidatorSet returns the validator set for the provided subnet at
	// the current P-chain height.
	GetCurrentValidatorSet(ctx context.Context, in *GetCurrentValidatorSetRequest, opts ...grpc.CallOption) (*GetCurrentValidatorSetResponse, error)
}

type validatorStateClient struct {
	cc grpc.ClientConnInterface
}

func NewValidatorStateClient(cc grpc.ClientConnInterface) ValidatorStateClient {
	return &validatorStateClient{cc}
}

func (c *validatorStateClient) GetMinimumHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetMinimumHeightResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetMinimumHeightResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetMinimumHeight_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *validatorStateClient) GetCurrentHeight(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetCurrentHeightResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetCurrentHeightResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetCurrentHeight_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *validatorStateClient) GetSubnetID(ctx context.Context, in *GetSubnetIDRequest, opts ...grpc.CallOption) (*GetSubnetIDResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetSubnetIDResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetSubnetID_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *validatorStateClient) GetWarpValidatorSets(ctx context.Context, in *GetWarpValidatorSetsRequest, opts ...grpc.CallOption) (*GetWarpValidatorSetsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetWarpValidatorSetsResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetWarpValidatorSets_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *validatorStateClient) GetWarpValidatorSet(ctx context.Context, in *GetWarpValidatorSetRequest, opts ...grpc.CallOption) (*GetWarpValidatorSetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetWarpValidatorSetResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetWarpValidatorSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *validatorStateClient) GetValidatorSet(ctx context.Context, in *GetValidatorSetRequest, opts ...grpc.CallOption) (*GetValidatorSetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetValidatorSetResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetValidatorSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *validatorStateClient) GetCurrentValidatorSet(ctx context.Context, in *GetCurrentValidatorSetRequest, opts ...grpc.CallOption) (*GetCurrentValidatorSetResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetCurrentValidatorSetResponse)
	err := c.cc.Invoke(ctx, ValidatorState_GetCurrentValidatorSet_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ValidatorStateServer is the server API for ValidatorState service.
// All implementations must embed UnimplementedValidatorStateServer
// for forward compatibility.
type ValidatorStateServer interface {
	// GetMinimumHeight returns the minimum height of the blocks in the optimal
	// proposal window.
	GetMinimumHeight(context.Context, *emptypb.Empty) (*GetMinimumHeightResponse, error)
	// GetCurrentHeight returns the current height of the P-chain.
	GetCurrentHeight(context.Context, *emptypb.Empty) (*GetCurrentHeightResponse, error)
	// GetSubnetID returns the subnetID of the provided chain.
	GetSubnetID(context.Context, *GetSubnetIDRequest) (*GetSubnetIDResponse, error)
	// GetWarpValidatorSets returns the canonical warp validator set for all
	// subnets at the requested P-chain height. If a subnet doesn't have a valid
	// canonical warp validator set, it is omitted from the response.
	GetWarpValidatorSets(context.Context, *GetWarpValidatorSetsRequest) (*GetWarpValidatorSetsResponse, error)
	// GetWarpValidatorSet returns the canonical warp validator set for the
	// provided subnet at the requested P-chain height. If the subnet doesn't have
	// a valid canonical warp validator set, either the returned set will be empty
	// or an error may occur.
	GetWarpValidatorSet(context.Context, *GetWarpValidatorSetRequest) (*GetWarpValidatorSetResponse, error)
	// GetValidatorSet returns the weights of the nodeIDs for the provided
	// subnet at the requested P-chain height.
	GetValidatorSet(context.Context, *GetValidatorSetRequest) (*GetValidatorSetResponse, error)
	// GetCurrentValidatorSet returns the validator set for the provided subnet at
	// the current P-chain height.
	GetCurrentValidatorSet(context.Context, *GetCurrentValidatorSetRequest) (*GetCurrentValidatorSetResponse, error)
	mustEmbedUnimplementedValidatorStateServer()
}

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

func (UnimplementedValidatorStateServer) GetMinimumHeight(context.Context, *emptypb.Empty) (*GetMinimumHeightResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetMinimumHeight not implemented")
}
func (UnimplementedValidatorStateServer) GetCurrentHeight(context.Context, *emptypb.Empty) (*GetCurrentHeightResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCurrentHeight not implemented")
}
func (UnimplementedValidatorStateServer) GetSubnetID(context.Context, *GetSubnetIDRequest) (*GetSubnetIDResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSubnetID not implemented")
}
func (UnimplementedValidatorStateServer) GetWarpValidatorSets(context.Context, *GetWarpValidatorSetsRequest) (*GetWarpValidatorSetsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetWarpValidatorSets not implemented")
}
func (UnimplementedValidatorStateServer) GetWarpValidatorSet(context.Context, *GetWarpValidatorSetRequest) (*GetWarpValidatorSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetWarpValidatorSet not implemented")
}
func (UnimplementedValidatorStateServer) GetValidatorSet(context.Context, *GetValidatorSetRequest) (*GetValidatorSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSet not implemented")
}
func (UnimplementedValidatorStateServer) GetCurrentValidatorSet(context.Context, *GetCurrentValidatorSetRequest) (*GetCurrentValidatorSetResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetCurrentValidatorSet not implemented")
}
func (UnimplementedValidatorStateServer) mustEmbedUnimplementedValidatorStateServer() {}
func (UnimplementedValidatorStateServer) testEmbeddedByValue()                        {}

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

func RegisterValidatorStateServer(s grpc.ServiceRegistrar, srv ValidatorStateServer) {
	// If the following call pancis, it indicates UnimplementedValidatorStateServer 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(&ValidatorState_ServiceDesc, srv)
}

func _ValidatorState_GetMinimumHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetMinimumHeight(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetMinimumHeight_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetMinimumHeight(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _ValidatorState_GetCurrentHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetCurrentHeight(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetCurrentHeight_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetCurrentHeight(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _ValidatorState_GetSubnetID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetSubnetIDRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetSubnetID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetSubnetID_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetSubnetID(ctx, req.(*GetSubnetIDRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ValidatorState_GetWarpValidatorSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetWarpValidatorSetsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetWarpValidatorSets(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetWarpValidatorSets_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetWarpValidatorSets(ctx, req.(*GetWarpValidatorSetsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ValidatorState_GetWarpValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetWarpValidatorSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetWarpValidatorSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetWarpValidatorSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetWarpValidatorSet(ctx, req.(*GetWarpValidatorSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ValidatorState_GetValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetValidatorSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetValidatorSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetValidatorSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetValidatorSet(ctx, req.(*GetValidatorSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ValidatorState_GetCurrentValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetCurrentValidatorSetRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ValidatorStateServer).GetCurrentValidatorSet(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ValidatorState_GetCurrentValidatorSet_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ValidatorStateServer).GetCurrentValidatorSet(ctx, req.(*GetCurrentValidatorSetRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ValidatorState_ServiceDesc is the grpc.ServiceDesc for ValidatorState service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ValidatorState_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "validatorstate.ValidatorState",
	HandlerType: (*ValidatorStateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMinimumHeight",
			Handler:    _ValidatorState_GetMinimumHeight_Handler,
		},
		{
			MethodName: "GetCurrentHeight",
			Handler:    _ValidatorState_GetCurrentHeight_Handler,
		},
		{
			MethodName: "GetSubnetID",
			Handler:    _ValidatorState_GetSubnetID_Handler,
		},
		{
			MethodName: "GetWarpValidatorSets",
			Handler:    _ValidatorState_GetWarpValidatorSets_Handler,
		},
		{
			MethodName: "GetWarpValidatorSet",
			Handler:    _ValidatorState_GetWarpValidatorSet_Handler,
		},
		{
			MethodName: "GetValidatorSet",
			Handler:    _ValidatorState_GetValidatorSet_Handler,
		},
		{
			MethodName: "GetCurrentValidatorSet",
			Handler:    _ValidatorState_GetCurrentValidatorSet_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "validatorstate/validator_state.proto",
}
