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

package apiv1

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 (
	UserSettingService_GetUserSetting_FullMethodName    = "/slash.api.v1.UserSettingService/GetUserSetting"
	UserSettingService_UpdateUserSetting_FullMethodName = "/slash.api.v1.UserSettingService/UpdateUserSetting"
)

// UserSettingServiceClient is the client API for UserSettingService 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 UserSettingServiceClient interface {
	// GetUserSetting returns the user setting.
	GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error)
	// UpdateUserSetting updates the user setting.
	UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error)
}

type userSettingServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewUserSettingServiceClient(cc grpc.ClientConnInterface) UserSettingServiceClient {
	return &userSettingServiceClient{cc}
}

func (c *userSettingServiceClient) GetUserSetting(ctx context.Context, in *GetUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UserSetting)
	err := c.cc.Invoke(ctx, UserSettingService_GetUserSetting_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userSettingServiceClient) UpdateUserSetting(ctx context.Context, in *UpdateUserSettingRequest, opts ...grpc.CallOption) (*UserSetting, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(UserSetting)
	err := c.cc.Invoke(ctx, UserSettingService_UpdateUserSetting_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// UserSettingServiceServer is the server API for UserSettingService service.
// All implementations must embed UnimplementedUserSettingServiceServer
// for forward compatibility.
type UserSettingServiceServer interface {
	// GetUserSetting returns the user setting.
	GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error)
	// UpdateUserSetting updates the user setting.
	UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error)
	mustEmbedUnimplementedUserSettingServiceServer()
}

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

func (UnimplementedUserSettingServiceServer) GetUserSetting(context.Context, *GetUserSettingRequest) (*UserSetting, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUserSetting not implemented")
}
func (UnimplementedUserSettingServiceServer) UpdateUserSetting(context.Context, *UpdateUserSettingRequest) (*UserSetting, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateUserSetting not implemented")
}
func (UnimplementedUserSettingServiceServer) mustEmbedUnimplementedUserSettingServiceServer() {}
func (UnimplementedUserSettingServiceServer) testEmbeddedByValue()                            {}

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

func RegisterUserSettingServiceServer(s grpc.ServiceRegistrar, srv UserSettingServiceServer) {
	// If the following call pancis, it indicates UnimplementedUserSettingServiceServer 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(&UserSettingService_ServiceDesc, srv)
}

func _UserSettingService_GetUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUserSettingRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserSettingServiceServer).GetUserSetting(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: UserSettingService_GetUserSetting_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserSettingServiceServer).GetUserSetting(ctx, req.(*GetUserSettingRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserSettingService_UpdateUserSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateUserSettingRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserSettingServiceServer).UpdateUserSetting(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: UserSettingService_UpdateUserSetting_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserSettingServiceServer).UpdateUserSetting(ctx, req.(*UpdateUserSettingRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// UserSettingService_ServiceDesc is the grpc.ServiceDesc for UserSettingService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserSettingService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "slash.api.v1.UserSettingService",
	HandlerType: (*UserSettingServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserSetting",
			Handler:    _UserSettingService_GetUserSetting_Handler,
		},
		{
			MethodName: "UpdateUserSetting",
			Handler:    _UserSettingService_UpdateUserSetting_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/user_setting_service.proto",
}
