// Code generated by protoc-gen-go-http. DO NOT EDIT.
// versions:
// - protoc-gen-go-http v2.8.1
// - protoc             v5.28.2
// source: api/system/v1/sys_dict.proto

package v1

import (
	context "context"
	http "github.com/go-kratos/kratos/v2/transport/http"
	binding "github.com/go-kratos/kratos/v2/transport/http/binding"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the kratos package it is being compiled against.
var _ = new(context.Context)
var _ = binding.EncodeURL

const _ = http.SupportPackageIsVersion1

const OperationSysDictCreateSysDictData = "/api.system.v1.SysDict/CreateSysDictData"
const OperationSysDictCreateSysDictType = "/api.system.v1.SysDict/CreateSysDictType"
const OperationSysDictDeleteSysDictData = "/api.system.v1.SysDict/DeleteSysDictData"
const OperationSysDictDeleteSysDictType = "/api.system.v1.SysDict/DeleteSysDictType"
const OperationSysDictGetSysDictData = "/api.system.v1.SysDict/GetSysDictData"
const OperationSysDictGetSysDictType = "/api.system.v1.SysDict/GetSysDictType"
const OperationSysDictListSysDictData = "/api.system.v1.SysDict/ListSysDictData"
const OperationSysDictListSysDictType = "/api.system.v1.SysDict/ListSysDictType"
const OperationSysDictOptionSelectType = "/api.system.v1.SysDict/OptionSelectType"
const OperationSysDictRefreshCacheSysDict = "/api.system.v1.SysDict/RefreshCacheSysDict"
const OperationSysDictSysDictDataType = "/api.system.v1.SysDict/SysDictDataType"
const OperationSysDictUpdateSysDictData = "/api.system.v1.SysDict/UpdateSysDictData"
const OperationSysDictUpdateSysDictType = "/api.system.v1.SysDict/UpdateSysDictType"

type SysDictHTTPServer interface {
	CreateSysDictData(context.Context, *SysDictDataRep) (*EmptySysDictReply, error)
	CreateSysDictType(context.Context, *SysDictTypeRep) (*EmptySysDictReply, error)
	DeleteSysDictData(context.Context, *DeleteSysDictDataRep) (*EmptySysDictReply, error)
	DeleteSysDictType(context.Context, *DeleteSysDictTypeRep) (*EmptySysDictReply, error)
	GetSysDictData(context.Context, *GetSysDictRep) (*GetSysDictDataReply, error)
	GetSysDictType(context.Context, *GetSysDictRep) (*GetSysDictTypeReply, error)
	ListSysDictData(context.Context, *ListSysDictDataRep) (*ListSysDictDataReply, error)
	ListSysDictType(context.Context, *ListSysDictTypeRep) (*ListSysDictTypeReply, error)
	OptionSelectType(context.Context, *OptionSelectTypeRep) (*OptionSelectTypeReply, error)
	RefreshCacheSysDict(context.Context, *CacheSysDicReq) (*EmptySysDictReply, error)
	SysDictDataType(context.Context, *SysDictDataTypeReq) (*SysDictDataTypeReply, error)
	UpdateSysDictData(context.Context, *SysDictDataRep) (*EmptySysDictReply, error)
	UpdateSysDictType(context.Context, *SysDictTypeRep) (*EmptySysDictReply, error)
}

func RegisterSysDictHTTPServer(s *http.Server, srv SysDictHTTPServer) {
	r := s.Route("/")
	r.GET("/v1/dict/data/{type}", _SysDict_SysDictDataType0_HTTP_Handler(srv))
	r.POST("/v1/dict/type/save", _SysDict_CreateSysDictType0_HTTP_Handler(srv))
	r.PUT("/v1/dict/type/update", _SysDict_UpdateSysDictType0_HTTP_Handler(srv))
	r.DELETE("/v1/dict/type/delete/{id}", _SysDict_DeleteSysDictType0_HTTP_Handler(srv))
	r.GET("/v1/dict/type/info/{id}", _SysDict_GetSysDictType0_HTTP_Handler(srv))
	r.POST("/v1/dict/type/list", _SysDict_ListSysDictType0_HTTP_Handler(srv))
	r.GET("/v1/dict/type/option/select", _SysDict_OptionSelectType0_HTTP_Handler(srv))
	r.POST("/v1/dict/data/save", _SysDict_CreateSysDictData0_HTTP_Handler(srv))
	r.PUT("/v1/dict/data/update", _SysDict_UpdateSysDictData0_HTTP_Handler(srv))
	r.DELETE("/v1/dict/data/delete/{id}", _SysDict_DeleteSysDictData0_HTTP_Handler(srv))
	r.GET("/v1/dict/data/info/{id}", _SysDict_GetSysDictData0_HTTP_Handler(srv))
	r.POST("/v1/dict/data/list", _SysDict_ListSysDictData0_HTTP_Handler(srv))
	r.GET("/v1/dict/type/refresh", _SysDict_RefreshCacheSysDict0_HTTP_Handler(srv))
}

func _SysDict_SysDictDataType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in SysDictDataTypeReq
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		if err := ctx.BindVars(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictSysDictDataType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.SysDictDataType(ctx, req.(*SysDictDataTypeReq))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*SysDictDataTypeReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_CreateSysDictType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in SysDictTypeRep
		if err := ctx.Bind(&in); err != nil {
			return err
		}
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictCreateSysDictType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.CreateSysDictType(ctx, req.(*SysDictTypeRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_UpdateSysDictType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in SysDictTypeRep
		if err := ctx.Bind(&in); err != nil {
			return err
		}
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictUpdateSysDictType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.UpdateSysDictType(ctx, req.(*SysDictTypeRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_DeleteSysDictType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in DeleteSysDictTypeRep
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		if err := ctx.BindVars(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictDeleteSysDictType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.DeleteSysDictType(ctx, req.(*DeleteSysDictTypeRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_GetSysDictType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in GetSysDictRep
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		if err := ctx.BindVars(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictGetSysDictType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.GetSysDictType(ctx, req.(*GetSysDictRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*GetSysDictTypeReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_ListSysDictType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in ListSysDictTypeRep
		if err := ctx.Bind(&in); err != nil {
			return err
		}
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictListSysDictType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.ListSysDictType(ctx, req.(*ListSysDictTypeRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*ListSysDictTypeReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_OptionSelectType0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in OptionSelectTypeRep
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictOptionSelectType)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.OptionSelectType(ctx, req.(*OptionSelectTypeRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*OptionSelectTypeReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_CreateSysDictData0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in SysDictDataRep
		if err := ctx.Bind(&in); err != nil {
			return err
		}
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictCreateSysDictData)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.CreateSysDictData(ctx, req.(*SysDictDataRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_UpdateSysDictData0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in SysDictDataRep
		if err := ctx.Bind(&in); err != nil {
			return err
		}
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictUpdateSysDictData)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.UpdateSysDictData(ctx, req.(*SysDictDataRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_DeleteSysDictData0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in DeleteSysDictDataRep
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		if err := ctx.BindVars(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictDeleteSysDictData)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.DeleteSysDictData(ctx, req.(*DeleteSysDictDataRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_GetSysDictData0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in GetSysDictRep
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		if err := ctx.BindVars(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictGetSysDictData)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.GetSysDictData(ctx, req.(*GetSysDictRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*GetSysDictDataReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_ListSysDictData0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in ListSysDictDataRep
		if err := ctx.Bind(&in); err != nil {
			return err
		}
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictListSysDictData)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.ListSysDictData(ctx, req.(*ListSysDictDataRep))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*ListSysDictDataReply)
		return ctx.Result(200, reply)
	}
}

func _SysDict_RefreshCacheSysDict0_HTTP_Handler(srv SysDictHTTPServer) func(ctx http.Context) error {
	return func(ctx http.Context) error {
		var in CacheSysDicReq
		if err := ctx.BindQuery(&in); err != nil {
			return err
		}
		http.SetOperation(ctx, OperationSysDictRefreshCacheSysDict)
		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
			return srv.RefreshCacheSysDict(ctx, req.(*CacheSysDicReq))
		})
		out, err := h(ctx, &in)
		if err != nil {
			return err
		}
		reply := out.(*EmptySysDictReply)
		return ctx.Result(200, reply)
	}
}

type SysDictHTTPClient interface {
	CreateSysDictData(ctx context.Context, req *SysDictDataRep, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
	CreateSysDictType(ctx context.Context, req *SysDictTypeRep, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
	DeleteSysDictData(ctx context.Context, req *DeleteSysDictDataRep, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
	DeleteSysDictType(ctx context.Context, req *DeleteSysDictTypeRep, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
	GetSysDictData(ctx context.Context, req *GetSysDictRep, opts ...http.CallOption) (rsp *GetSysDictDataReply, err error)
	GetSysDictType(ctx context.Context, req *GetSysDictRep, opts ...http.CallOption) (rsp *GetSysDictTypeReply, err error)
	ListSysDictData(ctx context.Context, req *ListSysDictDataRep, opts ...http.CallOption) (rsp *ListSysDictDataReply, err error)
	ListSysDictType(ctx context.Context, req *ListSysDictTypeRep, opts ...http.CallOption) (rsp *ListSysDictTypeReply, err error)
	OptionSelectType(ctx context.Context, req *OptionSelectTypeRep, opts ...http.CallOption) (rsp *OptionSelectTypeReply, err error)
	RefreshCacheSysDict(ctx context.Context, req *CacheSysDicReq, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
	SysDictDataType(ctx context.Context, req *SysDictDataTypeReq, opts ...http.CallOption) (rsp *SysDictDataTypeReply, err error)
	UpdateSysDictData(ctx context.Context, req *SysDictDataRep, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
	UpdateSysDictType(ctx context.Context, req *SysDictTypeRep, opts ...http.CallOption) (rsp *EmptySysDictReply, err error)
}

type SysDictHTTPClientImpl struct {
	cc *http.Client
}

func NewSysDictHTTPClient(client *http.Client) SysDictHTTPClient {
	return &SysDictHTTPClientImpl{client}
}

func (c *SysDictHTTPClientImpl) CreateSysDictData(ctx context.Context, in *SysDictDataRep, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/data/save"
	path := binding.EncodeURL(pattern, in, false)
	opts = append(opts, http.Operation(OperationSysDictCreateSysDictData))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) CreateSysDictType(ctx context.Context, in *SysDictTypeRep, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/type/save"
	path := binding.EncodeURL(pattern, in, false)
	opts = append(opts, http.Operation(OperationSysDictCreateSysDictType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) DeleteSysDictData(ctx context.Context, in *DeleteSysDictDataRep, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/data/delete/{id}"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictDeleteSysDictData))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) DeleteSysDictType(ctx context.Context, in *DeleteSysDictTypeRep, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/type/delete/{id}"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictDeleteSysDictType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "DELETE", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) GetSysDictData(ctx context.Context, in *GetSysDictRep, opts ...http.CallOption) (*GetSysDictDataReply, error) {
	var out GetSysDictDataReply
	pattern := "/v1/dict/data/info/{id}"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictGetSysDictData))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) GetSysDictType(ctx context.Context, in *GetSysDictRep, opts ...http.CallOption) (*GetSysDictTypeReply, error) {
	var out GetSysDictTypeReply
	pattern := "/v1/dict/type/info/{id}"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictGetSysDictType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) ListSysDictData(ctx context.Context, in *ListSysDictDataRep, opts ...http.CallOption) (*ListSysDictDataReply, error) {
	var out ListSysDictDataReply
	pattern := "/v1/dict/data/list"
	path := binding.EncodeURL(pattern, in, false)
	opts = append(opts, http.Operation(OperationSysDictListSysDictData))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) ListSysDictType(ctx context.Context, in *ListSysDictTypeRep, opts ...http.CallOption) (*ListSysDictTypeReply, error) {
	var out ListSysDictTypeReply
	pattern := "/v1/dict/type/list"
	path := binding.EncodeURL(pattern, in, false)
	opts = append(opts, http.Operation(OperationSysDictListSysDictType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) OptionSelectType(ctx context.Context, in *OptionSelectTypeRep, opts ...http.CallOption) (*OptionSelectTypeReply, error) {
	var out OptionSelectTypeReply
	pattern := "/v1/dict/type/option/select"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictOptionSelectType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) RefreshCacheSysDict(ctx context.Context, in *CacheSysDicReq, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/type/refresh"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictRefreshCacheSysDict))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) SysDictDataType(ctx context.Context, in *SysDictDataTypeReq, opts ...http.CallOption) (*SysDictDataTypeReply, error) {
	var out SysDictDataTypeReply
	pattern := "/v1/dict/data/{type}"
	path := binding.EncodeURL(pattern, in, true)
	opts = append(opts, http.Operation(OperationSysDictSysDictDataType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "GET", path, nil, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) UpdateSysDictData(ctx context.Context, in *SysDictDataRep, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/data/update"
	path := binding.EncodeURL(pattern, in, false)
	opts = append(opts, http.Operation(OperationSysDictUpdateSysDictData))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "PUT", path, in, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}

func (c *SysDictHTTPClientImpl) UpdateSysDictType(ctx context.Context, in *SysDictTypeRep, opts ...http.CallOption) (*EmptySysDictReply, error) {
	var out EmptySysDictReply
	pattern := "/v1/dict/type/update"
	path := binding.EncodeURL(pattern, in, false)
	opts = append(opts, http.Operation(OperationSysDictUpdateSysDictType))
	opts = append(opts, http.PathTemplate(pattern))
	err := c.cc.Invoke(ctx, "PUT", path, in, &out, opts...)
	if err != nil {
		return nil, err
	}
	return &out, nil
}
