// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc             (unknown)
// source: rpc/k8s_ops.proto

package rpc

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	RegionalK8SOperationService_ListGatewayHPAInfos_FullMethodName            = "/rpc.RegionalK8sOperationService/ListGatewayHPAInfos"
	RegionalK8SOperationService_UpdateGatewayHPAMinReplicas_FullMethodName    = "/rpc.RegionalK8sOperationService/UpdateGatewayHPAMinReplicas"
	RegionalK8SOperationService_ListTiDBAutoscalingInfos_FullMethodName       = "/rpc.RegionalK8sOperationService/ListTiDBAutoscalingInfos"
	RegionalK8SOperationService_UpdateTiDBAutoscalingThreshold_FullMethodName = "/rpc.RegionalK8sOperationService/UpdateTiDBAutoscalingThreshold"
	RegionalK8SOperationService_ExecuteCommand_FullMethodName                 = "/rpc.RegionalK8sOperationService/ExecuteCommand"
	RegionalK8SOperationService_RestartTiDBPodsByNamespace_FullMethodName     = "/rpc.RegionalK8sOperationService/RestartTiDBPodsByNamespace"
	RegionalK8SOperationService_RestartTiDBPodsByCluster_FullMethodName       = "/rpc.RegionalK8sOperationService/RestartTiDBPodsByCluster"
)

// RegionalK8SOperationServiceClient is the client API for RegionalK8SOperationService 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.
//
// The RegionalK8sOperationService provides APIs for updating regional k8s
// resources.
type RegionalK8SOperationServiceClient interface {
	// Lists Gateway HPA information across regions
	ListGatewayHPAInfos(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListGatewayHPAInfosResponse, error)
	// Updates the minimum replicas setting for Gateway HPA
	UpdateGatewayHPAMinReplicas(ctx context.Context, in *UpdateGatewayHPAMinReplicasRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Lists TiDB autoscaling information across regions
	ListTiDBAutoscalingInfos(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListTiDBAutoscalingInfosResponse, error)
	// Updates the autoscaling threshold for TiDB based on a specific metric
	UpdateTiDBAutoscalingThreshold(ctx context.Context, in *UpdateTiDBAutoscalingThresholdRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Forwards a pd-ctl command to the ops-service on the specified k8s cluster.
	ExecuteCommand(ctx context.Context, in *OpsExecuteCommandRequest, opts ...grpc.CallOption) (*OpsExecuteCommandResponse, error)
	// Forwards a restart-by-namespace request to the ops-service.
	RestartTiDBPodsByNamespace(ctx context.Context, in *OpsRestartByNamespaceRequest, opts ...grpc.CallOption) (*OpsRestartByNamespaceResponse, error)
	// Forwards a restart-by-keyspace request to the ops-service.
	RestartTiDBPodsByCluster(ctx context.Context, in *OpsRestartByClusterRequest, opts ...grpc.CallOption) (*OpsRestartByClusterResponse, error)
}

type regionalK8SOperationServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRegionalK8SOperationServiceClient(cc grpc.ClientConnInterface) RegionalK8SOperationServiceClient {
	return &regionalK8SOperationServiceClient{cc}
}

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

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

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

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

func (c *regionalK8SOperationServiceClient) ExecuteCommand(ctx context.Context, in *OpsExecuteCommandRequest, opts ...grpc.CallOption) (*OpsExecuteCommandResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OpsExecuteCommandResponse)
	err := c.cc.Invoke(ctx, RegionalK8SOperationService_ExecuteCommand_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionalK8SOperationServiceClient) RestartTiDBPodsByNamespace(ctx context.Context, in *OpsRestartByNamespaceRequest, opts ...grpc.CallOption) (*OpsRestartByNamespaceResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OpsRestartByNamespaceResponse)
	err := c.cc.Invoke(ctx, RegionalK8SOperationService_RestartTiDBPodsByNamespace_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionalK8SOperationServiceClient) RestartTiDBPodsByCluster(ctx context.Context, in *OpsRestartByClusterRequest, opts ...grpc.CallOption) (*OpsRestartByClusterResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OpsRestartByClusterResponse)
	err := c.cc.Invoke(ctx, RegionalK8SOperationService_RestartTiDBPodsByCluster_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RegionalK8SOperationServiceServer is the server API for RegionalK8SOperationService service.
// All implementations must embed UnimplementedRegionalK8SOperationServiceServer
// for forward compatibility
//
// The RegionalK8sOperationService provides APIs for updating regional k8s
// resources.
type RegionalK8SOperationServiceServer interface {
	// Lists Gateway HPA information across regions
	ListGatewayHPAInfos(context.Context, *emptypb.Empty) (*ListGatewayHPAInfosResponse, error)
	// Updates the minimum replicas setting for Gateway HPA
	UpdateGatewayHPAMinReplicas(context.Context, *UpdateGatewayHPAMinReplicasRequest) (*emptypb.Empty, error)
	// Lists TiDB autoscaling information across regions
	ListTiDBAutoscalingInfos(context.Context, *emptypb.Empty) (*ListTiDBAutoscalingInfosResponse, error)
	// Updates the autoscaling threshold for TiDB based on a specific metric
	UpdateTiDBAutoscalingThreshold(context.Context, *UpdateTiDBAutoscalingThresholdRequest) (*emptypb.Empty, error)
	// Forwards a pd-ctl command to the ops-service on the specified k8s cluster.
	ExecuteCommand(context.Context, *OpsExecuteCommandRequest) (*OpsExecuteCommandResponse, error)
	// Forwards a restart-by-namespace request to the ops-service.
	RestartTiDBPodsByNamespace(context.Context, *OpsRestartByNamespaceRequest) (*OpsRestartByNamespaceResponse, error)
	// Forwards a restart-by-keyspace request to the ops-service.
	RestartTiDBPodsByCluster(context.Context, *OpsRestartByClusterRequest) (*OpsRestartByClusterResponse, error)
	mustEmbedUnimplementedRegionalK8SOperationServiceServer()
}

// UnimplementedRegionalK8SOperationServiceServer must be embedded to have forward compatible implementations.
type UnimplementedRegionalK8SOperationServiceServer struct {
}

func (UnimplementedRegionalK8SOperationServiceServer) ListGatewayHPAInfos(context.Context, *emptypb.Empty) (*ListGatewayHPAInfosResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListGatewayHPAInfos not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) UpdateGatewayHPAMinReplicas(context.Context, *UpdateGatewayHPAMinReplicasRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateGatewayHPAMinReplicas not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) ListTiDBAutoscalingInfos(context.Context, *emptypb.Empty) (*ListTiDBAutoscalingInfosResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListTiDBAutoscalingInfos not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) UpdateTiDBAutoscalingThreshold(context.Context, *UpdateTiDBAutoscalingThresholdRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateTiDBAutoscalingThreshold not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) ExecuteCommand(context.Context, *OpsExecuteCommandRequest) (*OpsExecuteCommandResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ExecuteCommand not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) RestartTiDBPodsByNamespace(context.Context, *OpsRestartByNamespaceRequest) (*OpsRestartByNamespaceResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RestartTiDBPodsByNamespace not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) RestartTiDBPodsByCluster(context.Context, *OpsRestartByClusterRequest) (*OpsRestartByClusterResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RestartTiDBPodsByCluster not implemented")
}
func (UnimplementedRegionalK8SOperationServiceServer) mustEmbedUnimplementedRegionalK8SOperationServiceServer() {
}

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

func RegisterRegionalK8SOperationServiceServer(s grpc.ServiceRegistrar, srv RegionalK8SOperationServiceServer) {
	s.RegisterService(&RegionalK8SOperationService_ServiceDesc, srv)
}

func _RegionalK8SOperationService_ListGatewayHPAInfos_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.(RegionalK8SOperationServiceServer).ListGatewayHPAInfos(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_ListGatewayHPAInfos_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).ListGatewayHPAInfos(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionalK8SOperationService_UpdateGatewayHPAMinReplicas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateGatewayHPAMinReplicasRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionalK8SOperationServiceServer).UpdateGatewayHPAMinReplicas(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_UpdateGatewayHPAMinReplicas_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).UpdateGatewayHPAMinReplicas(ctx, req.(*UpdateGatewayHPAMinReplicasRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionalK8SOperationService_ListTiDBAutoscalingInfos_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.(RegionalK8SOperationServiceServer).ListTiDBAutoscalingInfos(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_ListTiDBAutoscalingInfos_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).ListTiDBAutoscalingInfos(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionalK8SOperationService_UpdateTiDBAutoscalingThreshold_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateTiDBAutoscalingThresholdRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionalK8SOperationServiceServer).UpdateTiDBAutoscalingThreshold(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_UpdateTiDBAutoscalingThreshold_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).UpdateTiDBAutoscalingThreshold(ctx, req.(*UpdateTiDBAutoscalingThresholdRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionalK8SOperationService_ExecuteCommand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OpsExecuteCommandRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionalK8SOperationServiceServer).ExecuteCommand(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_ExecuteCommand_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).ExecuteCommand(ctx, req.(*OpsExecuteCommandRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionalK8SOperationService_RestartTiDBPodsByNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OpsRestartByNamespaceRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionalK8SOperationServiceServer).RestartTiDBPodsByNamespace(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_RestartTiDBPodsByNamespace_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).RestartTiDBPodsByNamespace(ctx, req.(*OpsRestartByNamespaceRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionalK8SOperationService_RestartTiDBPodsByCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OpsRestartByClusterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionalK8SOperationServiceServer).RestartTiDBPodsByCluster(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionalK8SOperationService_RestartTiDBPodsByCluster_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionalK8SOperationServiceServer).RestartTiDBPodsByCluster(ctx, req.(*OpsRestartByClusterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RegionalK8SOperationService_ServiceDesc is the grpc.ServiceDesc for RegionalK8SOperationService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RegionalK8SOperationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "rpc.RegionalK8sOperationService",
	HandlerType: (*RegionalK8SOperationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListGatewayHPAInfos",
			Handler:    _RegionalK8SOperationService_ListGatewayHPAInfos_Handler,
		},
		{
			MethodName: "UpdateGatewayHPAMinReplicas",
			Handler:    _RegionalK8SOperationService_UpdateGatewayHPAMinReplicas_Handler,
		},
		{
			MethodName: "ListTiDBAutoscalingInfos",
			Handler:    _RegionalK8SOperationService_ListTiDBAutoscalingInfos_Handler,
		},
		{
			MethodName: "UpdateTiDBAutoscalingThreshold",
			Handler:    _RegionalK8SOperationService_UpdateTiDBAutoscalingThreshold_Handler,
		},
		{
			MethodName: "ExecuteCommand",
			Handler:    _RegionalK8SOperationService_ExecuteCommand_Handler,
		},
		{
			MethodName: "RestartTiDBPodsByNamespace",
			Handler:    _RegionalK8SOperationService_RestartTiDBPodsByNamespace_Handler,
		},
		{
			MethodName: "RestartTiDBPodsByCluster",
			Handler:    _RegionalK8SOperationService_RestartTiDBPodsByCluster_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "rpc/k8s_ops.proto",
}
